diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml new file mode 100644 index 00000000000..2caa7c7a74b --- /dev/null +++ b/browser/base/content/tabbrowser.xml @@ -0,0 +1,1180 @@ + + + + + +%tabBrowserDTD; +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Components.classes['@mozilla.org/preferences-service;1'] + .getService(Components.interfaces.nsIPrefService) + .getBranch(null); + + + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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, this.mCurrentTab, false); + filter.addProgressListener(listener, Components.interfaces.nsIWebProgress.NOTIFY_ALL); + this.mTabListeners[0] = listener; + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + index) + newIndex = currentIndex-1; + else if (currentIndex < index) + newIndex = currentIndex; + else if (index > 0) + newIndex = index-1; + else + newIndex = index; + + var oldTab = aTab; + + // clean up the before/afterselected attributes before removing the tab + oldTab.selected = false; + + this.mTabContainer.removeChild(oldTab); + this.mPanelContainer.removeChild(oldBrowser); + + this.selectedTab = this.mTabContainer.childNodes[newIndex]; + + if (newIndex == index) { + // No select event is going to fire. We need to just call updateCurrentBrowser() + // by hand. + this.updateCurrentBrowser(); + } + ]]> + + + + + + + + + + + + + + + + + + + + + s. + this.mPanelContainer.addEventListener("DOMLinkAdded", this.onLinkAdded, false); + } + + this.mProgressListeners.push(aListener); + + if (!this.mTabbedMode) { + // 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.mTabBox.selectedTab; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +