From a867bf319c2cf0bf34029fd485b7097b591cbec6 Mon Sep 17 00:00:00 2001 From: Marco Bonardo Date: Wed, 3 Aug 2011 20:39:51 +0200 Subject: [PATCH] Backout changeset ef79a5b41697 (bug 663395) --- browser/base/content/tabbrowser.xml | 10 +++------- browser/base/content/test/browser_relatedTabs.js | 9 --------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 3cde2cd05a3..a23a89c7e7d 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -1372,19 +1372,15 @@ // aReferrerURI is null or undefined if the tab is opened from // an external application or bookmark, i.e. somewhere other // than the current tab. - if (aRelatedToCurrent == null ? aReferrerURI : aRelatedToCurrent) { + if ((aRelatedToCurrent == null ? aReferrerURI : aRelatedToCurrent) && + Services.prefs.getBoolPref("browser.tabs.insertRelatedAfterCurrent")) { let newTabPos = (this._lastRelatedTab || this.selectedTab)._tPos + 1; - if (this._lastRelatedTab) this._lastRelatedTab.owner = null; else t.owner = this.selectedTab; - - if (!this.selectedTab.pinned && - Services.prefs.getBoolPref("browser.tabs.insertRelatedAfterCurrent")) - this.moveTabTo(t, newTabPos); - + this.moveTabTo(t, newTabPos); this._lastRelatedTab = t; } diff --git a/browser/base/content/test/browser_relatedTabs.js b/browser/base/content/test/browser_relatedTabs.js index e08291ba031..893f1657055 100644 --- a/browser/base/content/test/browser_relatedTabs.js +++ b/browser/base/content/test/browser_relatedTabs.js @@ -78,14 +78,5 @@ function test() { testPosition(7, 8, "blank tab without referrer opens at the end"); testPosition(8, 9, "tab without referrer opens at the end"); - gBrowser.selectedTab = tabs[0]; - gBrowser.pinTab(gBrowser.selectedTab); - addTab("http://mochi.test:8888/#8", gBrowser.currentURI); - testPosition(9, 10, "tab with referrer should open at the end when the selected tab is pinned"); - gBrowser.selectedTab = tabs[9]; - gBrowser.removeTab(tabs.pop()); - is(gBrowser.selectedTab, tabs[0], - "opening a tab from a pinned tab, selecting it and closing it should go back to the pinned tab"); - tabs.forEach(gBrowser.removeTab, gBrowser); }