DocShell: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
(Revert spam)
Line 1: Line 1:
'''the 3 wishes'''
= Docshell Documentation =


one day a kid was playing game boy at the school yard.the bell rang evreone came running though the hall.ding,ding,the bell whent off.then the hall was empty.then someone was taping on erasers.hi do you whant to tap theis for me?o.k then i started to tape i saw a clowd of smok come in.
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 + webshell 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]
* 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]
 
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.
 
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) ==
 
* [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 Work ==
 
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

Revision as of 04:17, 22 February 2006

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 + webshell implement the following interfaces

Webshell:

  • nsIWebShell LXR
  • nsIWebShellContainer LXR
  • nsIWebShellServices LXR
  • nsILinkHandler LXR
  • nsIClipboardCommands (why?) LXR

Docshell:

  • 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

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.

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 Work

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