split TreeStyleTabBrowser.prototype.restoreClosedSet() to two methods

This commit is contained in:
Piro / SHIMODA Hiroshi 2010-11-10 23:02:53 +09:00
parent a22c847f03
commit 238070965d

View File

@ -2859,12 +2859,17 @@ TreeStyleTabBrowser.prototype = {
indexes.length+1 < count && indexes.length+1 < count &&
behavior & this.kUNDO_CLOSE_FULL_SET behavior & this.kUNDO_CLOSE_FULL_SET
) || ) ||
!((behavior = this.undoCloseTabSetBehavior(indexes.length, false)) & this.kUNDO_CLOSE_SET) || !((behavior = this.undoCloseTabSetBehavior(indexes.length, false)) & this.kUNDO_CLOSE_SET)
(
'_confirmOpenInTabs' in PlacesUIUtils &&
PlacesUIUtils._confirmOpenInTabs &&
!PlacesUIUtils._confirmOpenInTabs(indexes.length)
) )
return;
this.doRestoreClosedSet(aRestoredTab, indexes);
},
doRestoreClosedSet : function TSTBrowser_doRestoreClosedSet(aRestoredTab, aIndexes)
if (
'_confirmOpenInTabs' in PlacesUIUtils &&
PlacesUIUtils._confirmOpenInTabs &&
!PlacesUIUtils._confirmOpenInTabs(aIndexes.length)
) )
return; return;
@ -2874,7 +2879,7 @@ TreeStyleTabBrowser.prototype = {
TreeStyleTabService.restoringTree = true; TreeStyleTabService.restoringTree = true;
var offset = 0; var offset = 0;
indexes.forEach(function(aIndex) { aIndexes.forEach(function(aIndex) {
undoCloseTab(aIndex - (offset++)); undoCloseTab(aIndex - (offset++));
}); });