%tabBrowserDTD; %globalDTD; ]> document.getAnonymousElementByAttribute(this, "anonid", "arrowscrollbox"); 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.getAnonymousElementByAttribute(this, "anonid", "tabbox"); this.mTabBox.childNodes[0] document.getAnonymousElementByAttribute(this, "anonid", "strip"); document.getAnonymousElementByAttribute(this, "anonid", "tabcontainer"); document.getAnonymousElementByAttribute(this, "anonid", "panelcontainer"); this.mTabContainer.childNodes document.getAnonymousElementByAttribute(this, "anonid", "tbstringbundle"); null null [] new Array() new Array() false false null null false false false null false 0 && aStatus == NS_ERROR_UNKNOWN_HOST) { // to prevent bug 235825: wait for the request handled // by the automatic keyword resolver return; } // since we (try to) only handle STATE_STOP of the last request, // the count of open requests should now be 0 this.mRequestCount = 0; } if (aStateFlags & nsIWebProgressListener.STATE_START && aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) { // It's okay to clear what the user typed when we start // loading a document. If the user types, this counter gets // set to zero, if the document load ends without an // onLocationChange, this counter gets decremented // (so we keep it while switching tabs after failed loads) if (aWebProgress.DOMWindow == this.mBrowser.contentWindow) this.mBrowser.userTypedClear++; if (!this.mBlank) { this.mTab.setAttribute("busy", "true"); this.mTabBrowser.updateIcon(this.mTab); this.mTabBrowser.setTabTitleLoading(this.mTab); if (this.mTabBrowser.mCurrentTab == this.mTab) this.mTabBrowser.mIsBusy = true; } } else if (aStateFlags & nsIWebProgressListener.STATE_STOP && aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) { if (aWebProgress.DOMWindow == this.mBrowser.contentWindow) { // The document is done loading, we no longer want the // value cleared. if (this.mBrowser.userTypedClear > 0) this.mBrowser.userTypedClear--; if (!this.mBrowser.mIconURL) this.mTabBrowser.useDefaultIcon(this.mTab); } if (this.mBlank) this.mBlank = false; this.mTab.removeAttribute("busy"); this.mTabBrowser.updateIcon(this.mTab); var location = aRequest.QueryInterface(nsIChannel).URI; // For keyword URIs clear the user typed value since they will be changed into real URIs if (location.scheme == "keyword") this.mBrowser.userTypedValue = null; if (this.mTab.label == this.mTabBrowser.mStringBundle.getString("tabs.loading")) this.mTabBrowser.setTabTitle(this.mTab); if (this.mTabBrowser.mCurrentTab == this.mTab) this.mTabBrowser.mIsBusy = false; } if (this.mTabBrowser.mCurrentTab == this.mTab) { for (var i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) { var p = this.mTabBrowser.mProgressListeners[i]; if (p && !oldBlank) p.onStateChange(aWebProgress, aRequest, aStateFlags, aStatus); // make sure that the visible status of new blank tabs is correctly set else if (p && "onUpdateCurrentBrowser" in p) p.onUpdateCurrentBrowser(aStateFlags, aStatus, "", 0); } } if (aStateFlags & (nsIWebProgressListener.STATE_START | nsIWebProgressListener.STATE_STOP)) { // reset cached temporary values at beginning and end this.mMessage = ""; this.mTotalProgress = 0; } this.mStateFlags = aStateFlags; this.mStatus = aStatus; }, onLocationChange : function(aWebProgress, aRequest, aLocation) { // The document loaded correctly, clear the value if we should if (this.mBrowser.userTypedClear > 0 && aRequest) this.mBrowser.userTypedValue = null; if (aWebProgress.DOMWindow == this.mBrowser.contentWindow && aWebProgress.isLoadingDocument) this.mTabBrowser.setIcon(this.mTab, null); // changing location, clear out the missing plugins list this.mTab.missingPlugins = null; if (!this.mBlank && this.mTabBrowser.mCurrentTab == this.mTab) { for (var i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) { var p = this.mTabBrowser.mProgressListeners[i]; if (p) p.onLocationChange(aWebProgress, aRequest, aLocation); } } }, onStatusChange : function(aWebProgress, aRequest, aStatus, aMessage) { if (this.mBlank) return; if (this.mTabBrowser.mCurrentTab == this.mTab) { for (var i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) { var p = this.mTabBrowser.mProgressListeners[i]; if (p) p.onStatusChange(aWebProgress, aRequest, aStatus, aMessage); } } this.mMessage = aMessage; }, onSecurityChange : function(aWebProgress, aRequest, aState) { if (this.mTabBrowser.mCurrentTab == this.mTab) { for (var i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) { var p = this.mTabBrowser.mProgressListeners[i]; if (p) p.onSecurityChange(aWebProgress, aRequest, aState); } } }, QueryInterface : function(aIID) { if (aIID.equals(Components.interfaces.nsIWebProgressListener) || aIID.equals(Components.interfaces.nsISupportsWeakReference) || aIID.equals(Components.interfaces.nsISupports)) return this; throw Components.results.NS_NOINTERFACE; } }); ]]> sz || req.image.height > sz) return; this.setIcon(aTab, browser.currentURI.spec); } catch (e) { } } } else if (this.shouldLoadFavIcon(browser.currentURI)) { var url = browser.currentURI.prePath + "/favicon.ico"; if (!this.isIconKnownMissing(url)) this.setIcon(aTab, url); } ]]> 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. 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; ]]> 1 false/true NO var owner = (aURIs.length > 1) || aLoadInBackground ? null : gBrowser.selectedTab; var firstTabAdded = null; if (aReplace) this.loadURI(aURIs[0], null, null); else firstTabAdded = gBrowser.addTab(aURIs[0], null, null, null, owner, false); var tabNum = this.mTabContainer.selectedIndex; for (var i = 1; i < aURIs.length; ++i) { var tab = gBrowser.addTab(aURIs[i]); if (aReplace) this.moveTabTo(tab, ++tabNum); } if (!aLoadInBackground) { if (firstTabAdded) { // .selectedTab setter focuses the content area this.selectedTab = firstTabAdded; } else window.content.focus(); } ]]> = 0; --i) { if (childNodes[i] != aTab) this.removeTab(childNodes[i]); } } ]]> index) newIndex = currentIndex-1; else if (currentIndex < index) newIndex = currentIndex; else { if ("owner" in oldTab && oldTab.owner && this.mPrefs.getBoolPref("browser.tabs.selectOwnerOnClose")) { for (i = 0; i < this.mTabContainer.childNodes.length; ++i) { tab = this.mTabContainer.childNodes[i]; if (tab == oldTab.owner) { newIndex = i; break; } } } if (newIndex == -1) newIndex = (index == l - 1) ? index - 1 : index; } // Select the new tab this.selectedTab = this.mTabContainer.childNodes[newIndex]; 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; ]]> return this.mTabContainer; return this.mTabBox.selectedTab; ' + aEvent.target.label + ''); } else { aXferData.data.addDataForFlavour("text/unicode", "about:blank"); } } ]]> = aDragSession.sourceNode.boxObject.screenX && aEvent.screenX <= (aDragSession.sourceNode.boxObject.screenX + aDragSession.sourceNode.boxObject.width))) return false;*/ return true; ]]> oldIndex) newIndex--;*/ if (newIndex != oldIndex) this.moveTabTo(this.mTabs[oldIndex], newIndex); var tn=this.mTabs[newIndex].label; this.mTabs[newIndex].label= ''; this.mTabs[newIndex].label= tn; } 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 = true; try { bgLoad = this.mPrefs.getBoolPref("browser.tabs.loadInBackground"); } catch (e) { } if (aEvent.shiftKey) bgLoad = !bgLoad; if (document.getBindingParent(aEvent.originalTarget).localName != "tab") { // We're adding a new tab. this.loadOneTab(getShortcutOrURI(url), null, null, null, bgLoad, false); } else { // Load in an existing tab. var tab = aEvent.target; try { this.getBrowserForTab(tab).loadURI(getShortcutOrURI(url)); if (this.mCurrentTab != tab && !bgLoad) this.selectedTab = tab; } catch(ex) { // Just ignore invalid urls } } } ]]> this.mTabs[i].boxObject.screenX + 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 \(0_0)/ null document.getAnonymousElementByAttribute(this,'anonid','tabtext').textContent= this.label;