зеркало из https://github.com/mozilla/pjs.git
Bug 359682: remove redundant code that check's gBrowser's localName, r=mano
This commit is contained in:
Родитель
f0fe47ddde
Коммит
661352e191
|
@ -1854,16 +1854,13 @@ function BrowserCloseTabOrWindow()
|
|||
}
|
||||
#endif
|
||||
|
||||
// XXXzeniko why do we check for gBrowser's localName (it's rather undefined
|
||||
// than actually a different element, isn't it)?
|
||||
if (gBrowser.localName == "tabbrowser" &&
|
||||
gBrowser.tabContainer.childNodes.length > 1) {
|
||||
if (gBrowser.tabContainer.childNodes.length > 1) {
|
||||
// Just close up a tab.
|
||||
gBrowser.removeCurrentTab();
|
||||
return;
|
||||
}
|
||||
#ifndef XP_MACOSX
|
||||
if (gBrowser.localName == "tabbrowser" && window.toolbar.visible &&
|
||||
if (window.toolbar.visible &&
|
||||
!gPrefService.getBoolPref("browser.tabs.autoHide")) {
|
||||
// Replace the remaining tab with a blank one and focus the address bar
|
||||
gBrowser.removeCurrentTab();
|
||||
|
|
|
@ -112,10 +112,7 @@ function open()
|
|||
url, postData.value, null, null, true);
|
||||
break;
|
||||
case "3":
|
||||
if (browser.getBrowser && browser.getBrowser().localName == "tabbrowser")
|
||||
browser.delayedOpenTab(url, null, null, postData.value, true);
|
||||
else
|
||||
browser.loadURI(url, null, postData.value, true); // Just do a normal load.
|
||||
browser.delayedOpenTab(url, null, null, postData.value, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче