diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 5115a51a6f9..6e15add103d 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -8800,7 +8800,7 @@ function switchToTabHavingURI(aURI, aOpenNew) { if (isBrowserWindow && isTabEmpty(gBrowser.selectedTab)) gBrowser.selectedBrowser.loadURI(aURI.spec); else - openUILinkIn(aURI.spec, "tab", { inBackground: false }); + openUILinkIn(aURI.spec, "tab"); } return false; @@ -8910,20 +8910,16 @@ function duplicateTabIn(aTab, where, delta) { .getService(Ci.nsISessionStore) .duplicateTab(window, aTab, delta); - var loadInBackground = - getBoolPref("browser.tabs.loadBookmarksInBackground", false); - switch (where) { case "window": gBrowser.hideTab(newTab); gBrowser.replaceTabWithWindow(newTab); break; case "tabshifted": - loadInBackground = !loadInBackground; - // fall through + // A background tab has been opened, nothing else to do here. + break; case "tab": - if (!loadInBackground) - gBrowser.selectedTab = newTab; + gBrowser.selectedTab = newTab; break; } } diff --git a/browser/base/content/test/browser_bug594131.js b/browser/base/content/test/browser_bug594131.js index 9ad994506c0..8447d432d81 100644 --- a/browser/base/content/test/browser_bug594131.js +++ b/browser/base/content/test/browser_bug594131.js @@ -35,24 +35,19 @@ * ***** END LICENSE BLOCK ***** */ function test() { - let backgroundPref = "browser.tabs.loadBookmarksInBackground"; let newTab = gBrowser.addTab("http://example.com"); waitForExplicitFinish(); newTab.linkedBrowser.addEventListener("load", mainPart, true); - - Services.prefs.setBoolPref(backgroundPref, true); - + function mainPart() { newTab.linkedBrowser.removeEventListener("load", mainPart, true); gBrowser.pinTab(newTab); gBrowser.selectedTab = newTab; - - openUILinkIn("http://example.org/", "current"); + + openUILinkIn("http://example.org/", "current", { inBackground: true }); isnot(gBrowser.selectedTab, newTab, "shouldn't load in background"); - - if (Services.prefs.prefHasUserValue(backgroundPref)) - Services.prefs.clearUserPref(backgroundPref); + gBrowser.removeTab(newTab); gBrowser.removeTab(gBrowser.tabs[1]); // example.org tab finish(); diff --git a/browser/base/content/urlbarBindings.xml b/browser/base/content/urlbarBindings.xml index 5082cdfa65e..87287308785 100644 --- a/browser/base/content/urlbarBindings.xml +++ b/browser/base/content/urlbarBindings.xml @@ -363,8 +363,6 @@ } else { this.handleRevert(); let params = { allowThirdPartyFixup: true, postData: postData }; - if (altEnter) - params.inBackground = false; if (!this.valueIsTyped) params.isUTF8 = true; openUILinkIn(url, where, params); diff --git a/browser/base/content/utilityOverlay.js b/browser/base/content/utilityOverlay.js index 78c01427e99..99138fac22d 100644 --- a/browser/base/content/utilityOverlay.js +++ b/browser/base/content/utilityOverlay.js @@ -100,12 +100,7 @@ function openUILink( url, e, ignoreButton, ignoreAlt, allowKeywordFixup, postDat * Ctrl+Shift new tab, in background * Alt save * - * You can swap Ctrl and Ctrl+shift by toggling the hidden pref - * browser.tabs.loadBookmarksInBackground (not browser.tabs.loadInBackground, which - * is for content area links). - * - * Middle-clicking is the same as Ctrl+clicking (it opens a new tab) and it is - * subject to the shift modifier and pref in the same way. + * Middle-clicking is the same as Ctrl+clicking (it opens a new tab). * * Exceptions: * - Alt is ignored for menu items selected using the keyboard so you don't accidentally save stuff. @@ -249,7 +244,7 @@ function openLinkIn(url, where, params) { let loadInBackground = aInBackground; if (loadInBackground == null) { loadInBackground = aFromChrome ? - getBoolPref("browser.tabs.loadBookmarksInBackground") : + false : getBoolPref("browser.tabs.loadInBackground"); } diff --git a/browser/components/places/src/PlacesUIUtils.jsm b/browser/components/places/src/PlacesUIUtils.jsm index 0b63574b53c..7368d9214cf 100644 --- a/browser/components/places/src/PlacesUIUtils.jsm +++ b/browser/components/places/src/PlacesUIUtils.jsm @@ -729,7 +729,9 @@ var PlacesUIUtils = { } } } - aWindow.openUILinkIn(aNode.uri, aWhere); + aWindow.openUILinkIn(aNode.uri, aWhere, { + inBackground: Services.prefs.getBoolPref("browser.tabs.loadBookmarksInBackground") + }); } },