author | Abdoulaye O. Ly <ablayelyfondou@gmail.com> |
Fri, 31 Aug 2018 05:11:34 +0000 | |
changeset 434194 | 06af1619a7998038ce334196cf6e8790d26007c2 |
parent 434193 | a37beca7fec4076855f181b0a1d1acf849176e70 |
child 434195 | b073a55c2be73fc6e5ba1a0f2bcef7c61d4d68ef |
push id | 68584 |
push user | jwein@mozilla.com |
push date | Fri, 31 Aug 2018 05:12:15 +0000 |
treeherder | autoland@06af1619a799 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jaws |
bugs | 1483786 |
milestone | 63.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/browser/base/content/tabbrowser.js +++ b/browser/base/content/tabbrowser.js @@ -3497,30 +3497,30 @@ window._gBrowser = { return window.openDialog(AppConstants.BROWSER_CHROME_URL, "_blank", options, aTab); }, /** * Move contextTab (or selected tabs in a mutli-select context) * to a new browser window, unless it is (they are) already the only tab(s) * in the current window, in which case this will do nothing. */ - replaceTabsWithWindow(contextTab) { + replaceTabsWithWindow(contextTab, aOptions) { let tabs; if (contextTab.multiselected) { tabs = this.selectedTabs; } else { tabs = [contextTab]; } if (this.tabs.length == tabs.length) { return null; } if (tabs.length == 1) { - return this.replaceTabWithWindow(tabs[0]); + return this.replaceTabWithWindow(tabs[0], aOptions); } // The order of the tabs is reserved. // To avoid mutliple tab-switch, the active tab is "moved" lastly, if applicable. // If applicable, the active tab remains active in the new window. let activeTab = gBrowser.selectedTab; let inactiveTabs = tabs.filter(t => t != activeTab); let activeTabNewIndex = tabs.indexOf(activeTab); @@ -3548,17 +3548,17 @@ window._gBrowser = { // Restore tab selection let winVisibleTabs = win.gBrowser.visibleTabs; let winTabLength = winVisibleTabs.length; win.gBrowser.addRangeToMultiSelectedTabs(winVisibleTabs[0], winVisibleTabs[winTabLength - 1]); }, { once: true }); - win = this.replaceTabWithWindow(firstInactiveTab); + win = this.replaceTabWithWindow(firstInactiveTab, aOptions); return win; }, _updateTabsAfterInsert() { for (let i = 0; i < this.tabs.length; i++) { this.tabs[i]._tPos = i; this.tabs[i]._selected = false; }