From 238070965db76792d440f2efd2542078256479db Mon Sep 17 00:00:00 2001 From: Piro / SHIMODA Hiroshi Date: Wed, 10 Nov 2010 23:02:53 +0900 Subject: [PATCH] split TreeStyleTabBrowser.prototype.restoreClosedSet() to two methods --- content/treestyletab/treestyletabbrowser.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 55f0067d..201e016e 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -2859,12 +2859,17 @@ TreeStyleTabBrowser.prototype = { indexes.length+1 < count && behavior & this.kUNDO_CLOSE_FULL_SET ) || - !((behavior = this.undoCloseTabSetBehavior(indexes.length, false)) & this.kUNDO_CLOSE_SET) || - ( - '_confirmOpenInTabs' in PlacesUIUtils && - PlacesUIUtils._confirmOpenInTabs && - !PlacesUIUtils._confirmOpenInTabs(indexes.length) + !((behavior = this.undoCloseTabSetBehavior(indexes.length, false)) & this.kUNDO_CLOSE_SET) ) + return; + + this.doRestoreClosedSet(aRestoredTab, indexes); + }, + doRestoreClosedSet : function TSTBrowser_doRestoreClosedSet(aRestoredTab, aIndexes) + if ( + '_confirmOpenInTabs' in PlacesUIUtils && + PlacesUIUtils._confirmOpenInTabs && + !PlacesUIUtils._confirmOpenInTabs(aIndexes.length) ) return; @@ -2874,7 +2879,7 @@ TreeStyleTabBrowser.prototype = { TreeStyleTabService.restoringTree = true; var offset = 0; - indexes.forEach(function(aIndex) { + aIndexes.forEach(function(aIndex) { undoCloseTab(aIndex - (offset++)); });