61
edits
Freesamael (talk | contribs) (Add nsIWebNavigation) |
Freesamael (talk | contribs) (Mention frameloader) |
||
Line 46: | Line 46: | ||
context (see layout). | context (see layout). | ||
[[File:WebNavigation.png|thumb|400px|<xul:browser> and docshell in | [[File:WebNavigation.png|thumb|400px|<xul:browser>, frameloader and docshell in single process configuration]] | ||
Docshells are organized into a tree. If a docshell has a non-null parent, then it corresponds to a subframe in whatever page is currently loaded in the parent docshell, and the corresponding subframe element (for example, an iframe) is called a '''browsing context container'''. In | Docshells are organized into a tree. If a docshell has a non-null parent, then it corresponds to a subframe in whatever page is currently loaded in the parent docshell, and the corresponding subframe element (for example, an iframe) is called a '''browsing context container'''. In Gecko, a browsing context container would implement <code>[https://dxr.mozilla.org/mozilla-central/rev/f9a5e9ed62103c84e4cde915f4d08f1ce71be83e/dom/base/nsIFrameLoader.idl#271 nsIFrameLoaderOwner]</code> to hold a '''frameloader''', which holds and manages the docshell. | ||
One of the most interfaces docshell implemented is <code>[https://dxr.mozilla.org/mozilla-central/source/docshell/base/nsIWebNavigation.idl nsIWebNavigation]</code>. It defines major functions of a browsing context, such as <code>loadURI</code> / <code>goBack</code> / <code>goForward</code> and <code>reload</code>. In | One of the most interfaces docshell implemented is <code>[https://dxr.mozilla.org/mozilla-central/source/docshell/base/nsIWebNavigation.idl nsIWebNavigation]</code>. It defines major functions of a browsing context, such as <code>loadURI</code> / <code>goBack</code> / <code>goForward</code> and <code>reload</code>. In single process configuration of desktop Firefox, <code><xul:browser></code> (which represents a tab) operates on docshell through <code>nsIWebNavigation</code>, as shown in the right figure. | ||
In order to keep the session history of subframes after the root document has been unloaded, only the root docshell of a docshell tree manages the session history (this does not match the conceptual model in the HTML5 spec and may be subject to change). | |||
* code: mozilla/docshell/ | * code: mozilla/docshell/ |
edits