DocShell: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
m (completed work)
(Page moved)
 
(45 intermediate revisions by 25 users not shown)
Line 9: Line 9:


* [http://www.mozilla.org/projects/embedding/docshell.html About] (What actually is docshell?)
* [http://www.mozilla.org/projects/embedding/docshell.html About] (What actually is docshell?)
* [[DocShell/Fastback|How fastback is implemented]]


== Interfaces Implemented by Docshell ==
== Interfaces Implemented by Docshell ==


Docshell + webshell implement the following interfaces
Docshell implement the following interfaces
 
Webshell:
 
* nsIWebShell                [http://lxr.mozilla.org/mozilla/source/webshell/public/nsIWebShell.h#75 LXR]
* nsIWebShellContainer        [http://lxr.mozilla.org/mozilla/source/webshell/public/nsIWebShell.h#66 LXR]
* nsIWebShellServices        [http://lxr.mozilla.org/mozilla/source/webshell/public/nsIWebShellServices.h#52 LXR]
* nsILinkHandler              [http://lxr.mozilla.org/mozilla/source/webshell/public/nsILinkHandler.h#70 LXR]
* nsIClipboardCommands (why?) [http://lxr.mozilla.org/mozilla/source/webshell/public/nsIClipboardCommands.idl#42 LXR]
 
Docshell:


* nsIDocShell                [http://lxr.mozilla.org/mozilla/source/docshell/base/nsIDocShell.idl#68 LXR]
* nsIDocShell                [http://lxr.mozilla.org/mozilla/source/docshell/base/nsIDocShell.idl#68 LXR]
Line 40: Line 31:
* nsIEditorDocShell          [http://lxr.mozilla.org/mozilla/source/docshell/base/nsIEditorDocShell.idl#45 LXR]
* nsIEditorDocShell          [http://lxr.mozilla.org/mozilla/source/docshell/base/nsIEditorDocShell.idl#45 LXR]
* nsIWebPageDescriptor        [http://lxr.mozilla.org/mozilla/source/docshell/base/nsIWebPageDescriptor.idl#38 LXR]
* nsIWebPageDescriptor        [http://lxr.mozilla.org/mozilla/source/docshell/base/nsIWebPageDescriptor.idl#38 LXR]
* nsIWebShellServices        [http://lxr.mozilla.org/mozilla/source/webshell/public/nsIWebShellServices.h#52 LXR]
* nsILinkHandler              [http://lxr.mozilla.org/mozilla/source/webshell/public/nsILinkHandler.h#70 LXR]
* nsIClipboardCommands (why?) [http://lxr.mozilla.org/mozilla/source/webshell/public/nsIClipboardCommands.idl#42 LXR]


In my view, nsIDocShellTree* and nsIWebShellContainer should all be merged into a single "tree node" interface.  nsIWebShell should merge into nsIDocShell.  nsILinkHandler, not sure.  nsIContentViewerContainer and nsIScriptGlobalObjectOwner, do we really need those?  nsIRefreshURI is probably something to merge into nsIDocShell (or even nsIWebNavigation?).  nsIEditorDocshell also doesn't really need to be a separate interface.
nsIContentViewerContainer and nsIScriptGlobalObjectOwner, do we really need those?  nsIRefreshURI is probably something to merge into nsIDocShell (or even nsIWebNavigation?).  nsIEditorDocshell also doesn't really need to be a separate interface.


Then again, do we want to just dump all sorts of stuff onto nsIDocShell?  Not sure about that.  Maybe we should look at who uses nsIDocShell and these other interfaces and why?
Then again, do we want to just dump all sorts of stuff onto nsIDocShell?  Not sure about that.  Maybe we should look at who uses nsIDocShell and these other interfaces and why?


== Session history (needs work) ==
== Session history (needs work) ==
== URI loading (needs work) ==
 
<h2> URI loading (needs work) </h2>
 
== Progress notifications (needs work) ==
== Progress notifications (needs work) ==


Line 56: Line 52:
== Current plans for docshell ==
== Current plans for docshell ==


nsIWebShell and nsIWebShellContainer will be eliminated ([https://bugzilla.mozilla.org/show_bug.cgi?id=273319 bug 273319])
[[DocShell/IRC_Logs]] has some IRC discussions concerning the future direction of docshell and docloader


nsWebShell should be merged into nsDocShell


[https://bugzilla.mozilla.org/show_bug.cgi?id=261086 bug 261086] - docshell does not need quite as many things in its GetInterface implementation
Can we eliminate mOSHE/mLSHE in favor of just accessing the shistory's entry for mIndex/mRequestedIndex?


[[DocShell:IRC_Logs]] has some IRC discussions concerning the future direction of docshell and docloader
== Window targeting ==


== Completed Work ==
Current and proposed setup discussed at [[DocShell/Window targeting]].
 
== Completed Works ==


nsIWebShell removed. Thanks to bz!  -- [http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-01-03+14%3A49&maxdate=2005-01-03+14%3A51&cvsroot=%2Fcvsroot Bonsai]
nsIWebShell removed. Thanks to bz!  -- [http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-01-03+14%3A49&maxdate=2005-01-03+14%3A51&cvsroot=%2Fcvsroot Bonsai]


nsDocLoaderImpl ([http://lxr.mozilla.org/mozilla/source/uriloader/base/nsDocLoader.cpp nsDocLoader.cpp]) will be merged into nsDocShell; or rather, nsDocShell will become a subclass of nsDocLoaderImpl (<s>[https://bugzilla.mozilla.org/show_bug.cgi?id=272471 bug 272471]</s>)
nsIWebShell and nsIWebShellContainer were eliminated (<s>[https://bugzilla.mozilla.org/show_bug.cgi?id=273319 bug 273319]</s>)


nsDocLoaderImpl ([http://lxr.mozilla.org/mozilla/source/uriloader/base/nsDocLoader.cpp nsDocLoader.cpp]) will be merged into nsDocShell; or rather, nsDocShell will become a subclass of nsDocLoaderImpl ([https://bugzilla.mozilla.org/show_bug.cgi?id=272471 bug 272471])
<s>[https://bugzilla.mozilla.org/show_bug.cgi?id=261086 bug 261086]</s> - docshell does not need quite as many things in its GetInterface implementation

Latest revision as of 01:51, 12 May 2015

Docshell Documentation

The goal of this page is to serve as a dumping/organization ground for docshell docs. When someone finds out something, it should be added here in a reasonable way. By the time this gets unwieldy, hopefully we will have enough material for several actual docs on what docshell does and why.

Some of these sections need writing, and we may need other sections... Feel free to rearrange as needed

Interfaces Implemented by Docshell

Docshell implement the following interfaces

  • nsIDocShell LXR
  • nsIDocShellTreeItem LXR
  • nsIDocShellTreeNode LXR
  • nsIDocShellHistory LXR
  • nsIWebNavigation LXR
  • nsIBaseWindow LXR
  • nsIScrollable LXR
  • nsITextScroll LXR
  • nsIDocCharset LXR
  • nsIContentViewerContainer LXR
  • nsIInterfaceRequestor LXR
  • nsIScriptGlobalObjectOwner LXR
  • nsIRefreshURI LXR
  • nsIWebProgressListener LXR
  • nsIEditorDocShell LXR
  • nsIWebPageDescriptor LXR
  • nsIWebShellServices LXR
  • nsILinkHandler LXR
  • nsIClipboardCommands (why?) LXR

nsIContentViewerContainer and nsIScriptGlobalObjectOwner, do we really need those? nsIRefreshURI is probably something to merge into nsIDocShell (or even nsIWebNavigation?). nsIEditorDocshell also doesn't really need to be a separate interface.

Then again, do we want to just dump all sorts of stuff onto nsIDocShell? Not sure about that. Maybe we should look at who uses nsIDocShell and these other interfaces and why?

Session history (needs work)

URI loading (needs work)

Progress notifications (needs work)

Bugs that could need some Docshell cleanup (needs work)

  • bug 249751 Links whose onclick closes the window fail to trigger link
  • bug 84833 Calling self.close() right after calling submit() cancels submission

Current plans for docshell

DocShell/IRC_Logs has some IRC discussions concerning the future direction of docshell and docloader


Can we eliminate mOSHE/mLSHE in favor of just accessing the shistory's entry for mIndex/mRequestedIndex?

Window targeting

Current and proposed setup discussed at DocShell/Window targeting.

Completed Works

nsIWebShell removed. Thanks to bz! -- Bonsai

nsDocLoaderImpl (nsDocLoader.cpp) will be merged into nsDocShell; or rather, nsDocShell will become a subclass of nsDocLoaderImpl (bug 272471)

nsIWebShell and nsIWebShellContainer were eliminated (bug 273319)

bug 261086 - docshell does not need quite as many things in its GetInterface implementation