%tabBrowserDTD; ]> Components.classes['@mozilla.org/preferences-service;1'] .getService(Components.interfaces.nsIPrefService) .getBranch(null); Components.classes["@mozilla.org/docshell/urifixup;1"] .getService(Components.interfaces.nsIURIFixup); document.getAnonymousNodes(this)[1] this.mTabBox.firstChild this.mStrip.childNodes[2] this.mTabBox.childNodes[1] document.getAnonymousNodes(this)[0] null null null new Array() new Array() false false null null false return !this.mStrip.collapsed; 0) { // Use the filter hooked up in our addProgressListener filter = this.mTabFilters[0]; } else { // create a filter and hook it up to our first browser filter = Components.classes["@mozilla.org/appshell/component/browser-status-filter;1"] .createInstance(Components.interfaces.nsIWebProgress); this.mTabFilters[0] = filter; this.mCurrentBrowser.webProgress.addProgressListener(filter, Components.interfaces.nsIWebProgress.NOTIFY_ALL); } // Remove all our progress listeners from the active browser's filter. if (this.mProgressListeners) { for (var i = 0; i < this.mProgressListeners.length; i++) { var p = this.mProgressListeners[i]; if (p) filter.removeProgressListener(p); } } // Wire up a progress listener to our filter. const listener = this.mTabProgressListener(this.mCurrentTab, this.mCurrentBrowser, false); filter.addProgressListener(listener, Components.interfaces.nsIWebProgress.NOTIFY_ALL); this.mTabListeners[0] = listener; ]]> = 0; --i) { if (childNodes[i] != aTab) this.removeTab(childNodes[i]); } } } ]]> index) newIndex = currentIndex-1; else if (currentIndex < index) newIndex = currentIndex; else if (index == l - 1) newIndex = index-1; else newIndex = index; var oldTab = aTab; // clean up the before/afterselected attributes before removing the tab oldTab.selected = false; // Because of the way XBL works (fields just set JS // properties on the element) and the code we have in place // to preserve the JS objects for any elements that have // JS properties set on them, the browser element won't be // destroyed until the document goes away. So we force a // cleanup ourselves. // This has to happen before we remove the child so that the // XBL implementation of nsIObserver still works. But // clearing focusedWindow happens below because it gets // reset by updateCurrentBrowser. oldBrowser.destroy(); this.mTabContainer.removeChild(oldTab); this.mPanelContainer.removeChild(this.mPanelContainer.childNodes[index]); this.selectedTab = this.mTabContainer.childNodes[newIndex]; this.mPanelContainer.selectedIndex = newIndex; this.updateCurrentBrowser(); // see comment above destroy above oldBrowser.focusedWindow = null; oldBrowser.focusedElement = null; } ]]> s. this.mPanelContainer.addEventListener("DOMLinkAdded", this.onLinkAdded, false); } if (!this.mTabbedMode && this.mProgressListeners.length == 1) { // If we are adding a 2nd progress listener, we need to enter tabbed mode // because the browser status filter can only handle one progress listener. // In tabbed mode, mTabProgressListener is used which will iterate over all listeners. this.enterTabbedMode(); } this.mProgressListeners.push(aListener); if (!this.mTabbedMode) { // If someone does this: // addProgressListener, removeProgressListener, addProgressListener // don't create a new filter; reuse the existing filter. if (this.mTabFilters.length == 0) { // hook a filter up to our first browser const filter = Components.classes["@mozilla.org/appshell/component/browser-status-filter;1"] .createInstance(Components.interfaces.nsIWebProgress); this.mTabFilters[0] = filter; this.mCurrentBrowser.webProgress.addProgressListener(filter, Components.interfaces.nsIWebProgress.NOTIFY_ALL); } // Directly hook the listener up to the filter for better performance this.mTabFilters[0].addProgressListener(aListener, aMask); } ]]> return this.mTabContainer; return this.mTabBox.selectedTab; null