DocShell: Difference between revisions

4,903 bytes added ,  12 May 2015
Page moved
No edit summary
(Page moved)
 
(30 intermediate revisions by 22 users not shown)
Line 1: Line 1:
= 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
* [http://www.mozilla.org/projects/embedding/docshell.html About] (What actually is docshell?)
* [[DocShell/Fastback|How fastback is implemented]]
== Interfaces Implemented by Docshell ==
Docshell implement the following interfaces
* nsIDocShell                [http://lxr.mozilla.org/mozilla/source/docshell/base/nsIDocShell.idl#68 LXR]
* nsIDocShellTreeItem        [http://lxr.mozilla.org/mozilla/source/docshell/base/nsIDocShellTreeItem.idl#45 LXR]
* nsIDocShellTreeNode        [http://lxr.mozilla.org/mozilla/source/docshell/base/nsIDocShellTreeNode.idl#44 LXR]
* nsIDocShellHistory          [http://lxr.mozilla.org/mozilla/source/docshell/base/nsIDocShellHistory.idl#42 LXR]
* nsIWebNavigation            [http://lxr.mozilla.org/mozilla/source/docshell/base/nsIWebNavigation.idl#42 LXR]
* nsIBaseWindow              [http://lxr.mozilla.org/mozilla/source/widget/public/nsIBaseWindow.idl#51 LXR]
* nsIScrollable              [http://lxr.mozilla.org/mozilla/source/docshell/base/nsIScrollable.idl#42 LXR]
* nsITextScroll              [http://lxr.mozilla.org/mozilla/source/docshell/base/nsITextScroll.idl#43 LXR]
* nsIDocCharset              [http://lxr.mozilla.org/mozilla/source/intl/chardet/public/nsIDocCharset.idl#41 LXR]
* nsIContentViewerContainer  [http://lxr.mozilla.org/mozilla/source/webshell/public/nsIContentViewerContainer.idl#43 LXR]
* nsIInterfaceRequestor      [http://lxr.mozilla.org/mozilla/source/xpcom/base/nsIInterfaceRequestor.idl#42 LXR]
* nsIScriptGlobalObjectOwner  [http://lxr.mozilla.org/mozilla/source/dom/public/nsIScriptGlobalObjectOwner.h#50 LXR]
* nsIRefreshURI              [http://lxr.mozilla.org/mozilla/source/webshell/public/nsIRefreshURI.idl#43 LXR]
* nsIWebProgressListener      [http://lxr.mozilla.org/mozilla/source/uriloader/base/nsIWebProgressListener.idl#47 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]
* 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]
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) ==
<h2> URI loading (needs work) </h2>
== Progress notifications (needs work) ==
== Bugs that could need some Docshell cleanup (needs work) ==
* [https://bugzilla.mozilla.org/show_bug.cgi?id=249751 bug 249751] Links whose onclick closes the window fail to trigger link
* [https://bugzilla.mozilla.org/show_bug.cgi?id=84833 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!  -- [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>)
<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
canmove, Confirmed users, Bureaucrats and Sysops emeriti
960

edits