%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.childNodes[1] this.mStrip.childNodes[2] this.mTabBox.childNodes[2] this.mTabContainer.childNodes document.getAnonymousNodes(this)[0] null null null new Array() new Array() false false null null false #ifdef XP_MACOSX true #else false #endif 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(oldBrowser.parentNode); this.selectedTab = this.mTabContainer.childNodes[newIndex]; var i; for (i = oldTab._tPos; i < this.mTabContainer.childNodes.length; i++) { this.mTabContainer.childNodes[i]._tPos = i; } this.mTabBox.selectedPanel = this.getBrowserForTab(this.mCurrentTab).parentNode; this.mCurrentTab.selected = true; 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; ' + aEvent.target.label + ''); } } ]]> aXferData.data) newIndex--; if (newIndex != aXferData.data) this.moveTabTo(this.mTabs[aXferData.data], newIndex); } else { var url = transferUtils.retrieveURLFromData(aXferData.data, aXferData.flavour.contentType); // valid urls don't contain spaces ' '; if we have a space it isn't a valid url. // Also disallow dropping javascript: or data: urls--bail out if (!url || !url.length || url.indexOf(" ", 0) != -1 || /^\s*(javascript|data):/.test(url)) return; this.dragDropSecurityCheck(aEvent, aDragSession, url); var bgLoad = this.mPrefs.getBoolPref("browser.tabs.loadInBackground"); var tab = null; if (aEvent.originalTarget.localName != "tab") { // We're adding a new tab. tab = this.addTab(getShortcutOrURI(url)); } else { // Load in an existing tab. tab = aEvent.originalTarget; this.getBrowserForTab(tab).loadURI(getShortcutOrURI(url)); } if (this.mCurrentTab != tab && !bgLoad) this.selectedTab = tab; } ]]> this.mTabs[i].boxObject.x + this.mTabs[i].boxObject.width / 2) return i; } return this.mTabs.length; ]]> 0) { this.moveTabTo(this.mCurrentTab, tabPos - 1); this.mCurrentTab.focus(); } else if (this.arrowKeysShouldWrap) this.moveTabToEnd(); ]]> 0) { this.moveTabTo(this.mCurrentTab, 0); this.mCurrentTab.focus(); } ]]> null