… browser/base/content/browser.xul browser/base/content/tabbrowser.xml toolkit/content/widgets/browser.xml toolkit/content/widgets/remote-browser.xml browser/base/content/global-scripts.inc browser/base/content/browser.js browser/base/content/content.js major source files Usually referred as “gBrowser”
is its session history. Session history consists of a flat list of session history entries. Session history entry = URL + state + title + Document + form data + scroll position + …, etc. interface History { readonly attribute long length; readonly attribute any state; void go(optional long delta); void back(); void forward(); void pushState(any data, DOMString title, optional DOMString? url = null); void replaceState(any data, DOMString title, optional DOMString? url = null); };
of two JSObjects: an inner object and an outer object. The inner window object is different for each page a browser window visits. It serves as the "globals" object and provides the JSPrincipals for scripts on that page. The outer window object is the object returned by window.open. It represents the window or tab itself and survives as the user navigates in that window or tab. The inner window => HTML5 Window object. The outer window => HTML5 WindowProxy object.
tree, so as DocLoaders. • nsDocShell inherits nsDocLoader. • Multiple docshell trees with different item types can belong to the same docloader tree. • When looking for root docshell, it usually finds same-type root of a subtree. • DocShellTreeOwner points to a root docshell of a subtree.
responsible for tracking groups of * loads that belong together (images, external scripts, etc) and subdocuments * (<iframe>, <frame>, etc). It is also responsible for sending * nsIWebProgressListener notifications. * XXXbz this interface should go away, we think... */ [scriptable, uuid(bbe961ee-59e9-42bb-be50-0331979bb79f)] interface nsIDocumentLoader : nsISupports { // Stop all loads in the loadgroup of this docloader void stop(); // XXXbz is this needed? For embedding? What this does is does is not // defined by this interface! readonly attribute nsISupports container; // The loadgroup associated with this docloader readonly attribute nsILoadGroup loadGroup; // The defaultLoadRequest of the loadgroup associated with this docloader readonly attribute nsIChannel documentChannel; };
{ /* Definitions for the item types. */ const long typeChrome=0; const long typeContent=1; const long typeContentWrapper=2; const long typeChromeWrapper=3; const long typeAll=0x7FFFFFFF; /* The type this item is. */ attribute long itemType; … } class DocShell { protected: enum FrameType { eFrameTypeRegular, eFrameTypeBrowser, eFrameTypeApp }; … } Tree traversals are often based on: app or browser boundaries. content / chrome item boundaries. tree owner equality.
the session history. • All nsISHEntry of subframes are managed by nsISHistory of the root. • An entry can have children entries, indicate subframes. • When a subframe adds a history entry, the root entry along with all its children are cloned to create a new root entry to the session history.
lifetime of outer window associates to the browsing context. nsFrameLoader is responsible to Create correct type of nsDocShell or e10s TabParent. Hold the message manager for e10s communication. nsIDocShellTreeOwner is used to Find items. Get notification interface for the nsDocShell tree.