Merge pull request #1069 from jryans/tear-off-tabs

Repair tearing off a tree of multiple tabs
This commit is contained in:
YUKI "Piro" Hiroshi 2016-02-17 10:03:57 +09:00
commit 5516b752b1
2 changed files with 2 additions and 3 deletions

View File

@ -114,7 +114,7 @@ var TreeStyleTabWindowHelper = {
gBrowser.__treestyletab__swapBrowsersAndCloseOther = gBrowser.swapBrowsersAndCloseOther; gBrowser.__treestyletab__swapBrowsersAndCloseOther = gBrowser.swapBrowsersAndCloseOther;
gBrowser.swapBrowsersAndCloseOther = function(...args) { gBrowser.swapBrowsersAndCloseOther = function(...args) {
if (TreeStyleTabWindowHelper.runningDelayedStartup && if (TreeStyleTabWindowHelper.runningDelayedStartup &&
TreeStyleTabService.tearOffSubtreeFromRemote()) TreeStyleTabService.tearOffSubtreeFromRemote(...args))
return; return;
return gBrowser.__treestyletab__swapBrowsersAndCloseOther.apply(this, args); return gBrowser.__treestyletab__swapBrowsersAndCloseOther.apply(this, args);
}; };

View File

@ -1870,10 +1870,9 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
}, },
_tabFocusAllowance : [], _tabFocusAllowance : [],
tearOffSubtreeFromRemote : function TSTWindow_tearOffSubtreeFromRemote() tearOffSubtreeFromRemote : function TSTWindow_tearOffSubtreeFromRemote(ourTab, remoteTab)
{ {
var w = this.window; var w = this.window;
var remoteTab = w.arguments[0];
var remoteWindow = remoteTab.ownerDocument.defaultView; var remoteWindow = remoteTab.ownerDocument.defaultView;
var remoteService = remoteWindow.TreeStyleTabService; var remoteService = remoteWindow.TreeStyleTabService;
var remoteMultipleTabService = remoteWindow.MultipleTabService; var remoteMultipleTabService = remoteWindow.MultipleTabService;