%messengerDTD; %globalDTD; ]> Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); null new Object() new Object() null new Array() document.getAnonymousElementByAttribute(this, "anonid", "strip"); document.getAnonymousElementByAttribute(this, "anonid", "tabcontainer"); document.getElementById(this.getAttribute("panelcontainer")); null false new Array() = 0) this.tabMonitors.splice(this.tabMonitors.indexOf(aTabMonitor), 1); ]]> = 0) { this.selectTabByIndex(tabIndex); return; } } // we need to save the state before it gets corrupted this.saveCurrentTabState(); let tabInfo = {mode: tabMode, canClose: true}; tabMode.tabs.push(tabInfo); let t = document.createElementNS( "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "tab"); t.setAttribute("crop", "end"); t.maxWidth = this.tabContainer.mTabMaxWidth; t.minWidth = this.tabContainer.mTabMinWidth; t.width = 0; t.setAttribute("flex", "100"); t.setAttribute("validate", "never"); t.className = "tabbrowser-tab tabmail-tab icon-holder"; // for styling purposes, apply the type to the tab // (this attribute may be overwritten by mode functions) t.setAttribute("type", tabInfo.mode.type); this.tabContainer.appendChild(t); if (!this.mStripVisible) { this.mStripVisible = true; this.tabContainer.adjustTabstrip(); } let oldPanel = this.panelContainer.selectedPanel; // Open new tabs in the background? let switchToNewTab = !this.mPrefs.getBoolPref("browser.tabs.loadInBackground"); tabInfo.switchToNewTab = switchToNewTab; // the order of the following statements is important let oldTabInfo = this.currentTabInfo; this.tabInfo[this.tabContainer.childNodes.length - 1] = tabInfo; if (switchToNewTab) { this.currentTabInfo = tabInfo; // this has a side effect of calling updateCurrentTab, but our // setting currentTabInfo above will cause it to take no action. this.tabContainer.selectedIndex = this.tabContainer.childNodes.length - 1; } // make sure we are on the right panel let selectedPanel; if (tabInfo.mode.tabType.perTabPanel) { // should we create the element for them, or will they do it? if (typeof(tabInfo.mode.tabType.perTabPanel) == "string") { tabInfo.panel = document.createElementNS( "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", tabInfo.mode.tabType.perTabPanel); } else { tabInfo.panel = tabInfo.mode.tabType.perTabPanel(tabInfo); } this.panelContainer.appendChild(tabInfo.panel); selectedPanel = tabInfo.panel; } else { selectedPanel = tabInfo.mode.tabType.panel; } if (switchToNewTab) this.panelContainer.selectedPanel = selectedPanel; oldPanel.removeAttribute("selected"); this.panelContainer.selectedPanel.setAttribute("selected", "true"); let tabOpenFunc = tabInfo.mode.openTab || tabInfo.mode.tabType.openTab; let args = [tabInfo].concat(Array.prototype.slice.call(arguments, 1)); if (tabOpenFunc) tabOpenFunc.apply(tabInfo.mode.tabType, args); if (!switchToNewTab) { // if the new tab isn't made current, // its title won't change automatically this.setTabTitle(tabInfo); } if (this.tabMonitors.length) { if (switchToNewTab) for (let tabMonitor of this.tabMonitors) tabMonitor.onTabSwitched(tabInfo, oldTabInfo); } t.setAttribute("label", tabInfo.title); if (switchToNewTab) { let docTitle = tabInfo.title; if (!/Mac/.test(navigator.platform)) docTitle += " - " + gBrandBundle.getString("brandFullName"); document.title = docTitle; // Update the toolbar status - we don't need to do menus as they // do themselves when we open them. UpdateMailToolbar("tabmail"); } ]]> = 0 && aIndex < this.tabInfo.length && aIndex != this.tabContainer.selectedIndex) { this.tabContainer.selectedIndex = aIndex; } if (aEvent) { aEvent.preventDefault(); aEvent.stopPropagation(); } ]]> null document.getAnonymousElementByAttribute(this, "anonid", "down-box"); document.getAnonymousElementByAttribute(this, "anonid", "down-box-animate"); Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); 0 document.getAnonymousElementByAttribute(this, "anonid", "arrowscrollbox"); document.getAnonymousElementByAttribute(this, "anonid", "tabstrip-closebutton"); 100 250 140 3 this.mTabClipWidth || width == 0) this.setAttribute("closebuttons", "alltabs"); else this.setAttribute("closebuttons", "activetab"); break; case 2: this.setAttribute("closebuttons", "noclose"); break; case 3: this.setAttribute("closebuttons", "closeatend"); break; } this.mTabstripClosebutton.collapsed = this.mCloseButtons != 3; ]]> document.getAnonymousElementByAttribute(this, "anonid", "alltabs-popup"); document.getAnonymousElementByAttribute(this, "anonid", "alltabs-box-animate"); this.mTabstrip._scrollButtonDownBoxAnimate; document.getAnonymousElementByAttribute(this, "anonid", "alltabs-button"); null -1 25 [1.00, 0.85, 0.80, 0.75, 0.71, 0.68, 0.65, 0.62, 0.59, 0.57, 0.54, 0.52, 0.50, 0.47, 0.45, 0.44, 0.42, 0.40, 0.38, 0.37, 0.35, 0.34, 0.32, 0.31, 0.30, 0.29, 0.28, 0.27, 0.26, 0.25, 0.24, 0.23, 0.23, 0.22, 0.22, 0.21, 0.21, 0.21, 0.20, 0.20, 0.20, 0.20, 0.20, 0.20, 0.20, 0.20, 0.19, 0.19, 0.19, 0.18, 0.18, 0.17, 0.17, 0.16, 0.15, 0.14, 0.13, 0.11, 0.09, 0.06] ctboStart || ctboEnd > tsboEnd) { this._animateStep = 0; if (!this._animateTimer) this._animateTimer = Components.classes["@mozilla.org/timer;1"] .createInstance(Components.interfaces.nsITimer); else this._animateTimer.cancel(); this._animateTimer.initWithCallback(this, this._animateDelay, Components.interfaces.nsITimer.TYPE_REPEATING_SLACK); } ]]> = tabstripBO.screenX && curTabBO.screenX + curTabBO.width <= tabstripBO.screenX + tabstripBO.width) this.childNodes[i].removeAttribute("tabIsScrolled"); else this.childNodes[i].setAttribute("tabIsScrolled", "true"); } ]]> 1) return; tabmail.removeTab(bindingParent); tabmail._blockDblClick = true; /* XXXmano hack (see bug 343628): * Since we're removing the event target, if the user * double-clicks this button, the dblclick event will be dispatched * with the tabbar as its event target (and explicit/originalTarget), * which treats that as a mouse gesture for opening a new tab. * In this context, we're manually blocking the dblclick event * (see onTabBarDblClick). */ let clickedOnce = false; function enableDblClick(event) { var target = event.originalTarget; if (target.className == "tab-close-button") target._ignoredClick = true; if (!clickedOnce) { clickedOnce = true; return; } tabContainer._blockDblClick = false; tabContainer.removeEventListener("click", enableDblClick, true); } tabContainer.addEventListener("click", enableDblClick, true); } else { // "tabs" tabmail.removeCurrentTab(); } } ]]>