author | Marco Bonardo <mbonardo@mozilla.com> |
Thu, 01 Dec 2011 12:27:41 +0100 | |
changeset 81077 | e07c407ae1b1c5a5f24309881d4808330d09a655 |
parent 81068 | a05df19da5636a493f16cd4478411e9902e5cb5c (current diff) |
parent 81076 | 66a1db69379064a9e087099e168e418555e5ef22 (diff) |
child 81078 | b6811f220aba188ace0bdb8ccf9992531a1d26a5 |
push id | 3714 |
push user | mak77@bonardo.net |
push date | Thu, 01 Dec 2011 11:28:09 +0000 |
treeherder | mozilla-inbound@e07c407ae1b1 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
milestone | 11.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/components/sessionstore/src/nsSessionStore.js +++ b/browser/components/sessionstore/src/nsSessionStore.js @@ -1641,35 +1641,23 @@ SessionStoreService.prototype = { // We might be able to overwrite the existing tabs instead of just adding // the previous session's tabs to the end. This will be set if possible. let canOverwriteTabs = false; // Step 1 of processing: // Inspect extData for Panorama identifiers. If found, then we want to // inspect further. If there is a single group, then we can use this // window. If there are multiple groups then we won't use this window. - let data = this.getWindowValue(aWindow, "tabview-group"); - if (data) { - data = JSON.parse(data); - - // Multiple keys means multiple groups, which means we don't want to use this window. - if (Object.keys(data).length > 1) { + let groupsData = this.getWindowValue(aWindow, "tabview-groups"); + if (groupsData) { + groupsData = JSON.parse(groupsData); + + // If there are multiple groups, we don't want to use this window. + if (groupsData.totalNumber > 1) return [false, false]; - } - else { - // If there is only one group, then we want to ensure that its group id - // is 0. This is how Panorama forces group merging when new tabs are opened. - //XXXzpao This is a hack and the proper fix really belongs in Panorama. - let groupKey = Object.keys(data)[0]; - if (groupKey !== "0") { - data["0"] = data[groupKey]; - delete data[groupKey]; - this.setWindowValue(aWindow, "tabview-groups", JSON.stringify(data)); - } - } } // Step 2 of processing: // If we're still here, then the window is usable. Look at the open tabs in // comparison to home pages. If all the tabs are home pages then we'll end // up overwriting all of them. Otherwise we'll just close the tabs that // match home pages. let homePages = aWindow.gHomeButton.getHomePage().split("|");
--- a/browser/components/tabview/groupitems.js +++ b/browser/components/tabview/groupitems.js @@ -2228,22 +2228,36 @@ let GroupItems = { } } } toClose.forEach(function(groupItem) { // All remaining children in to-be-closed groups are re-used by // session restore. Reconnect them so that they're put into their // right groups. - groupItem.getChildren().forEach(function (tabItem) { + let children = groupItem.getChildren().concat(); + + children.forEach(function (tabItem) { if (tabItem.parent && tabItem.parent.hidden) iQ(tabItem.container).show(); + + // sanity check the tab's groupID + let tabData = Storage.getTabData(tabItem.tab); + let parentGroup = GroupItems.groupItem(tabData.groupID); + + // correct the tab's groupID if necessary + if (!parentGroup || -1 < toClose.indexOf(parentGroup)) { + tabData.groupID = activeGroupId || Object.keys(groupItemData)[0]; + Storage.saveTab(tabItem.tab, tabData); + } + tabItem._reconnected = false; tabItem._reconnect(); }); + groupItem.close({immediately: true}); }); } // set active group item if (activeGroupId) { let activeGroupItem = this.groupItem(activeGroupId); if (activeGroupItem)
--- a/browser/installer/windows/nsis/shared.nsh +++ b/browser/installer/windows/nsis/shared.nsh @@ -696,19 +696,49 @@ RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0024-ABCDEFFEDCBA}" ${EndIf} ${If} ${FileExists} "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0025-ABCDEFFEDCBA}" RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0025-ABCDEFFEDCBA}" ${EndIf} ${If} ${FileExists} "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0026-ABCDEFFEDCBA}" RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0026-ABCDEFFEDCBA}" ${EndIf} + ${If} ${FileExists} "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0027-ABCDEFFEDCBA}" + RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0027-ABCDEFFEDCBA}" + ${EndIf} + ${If} ${FileExists} "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0028-ABCDEFFEDCBA}" + RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0028-ABCDEFFEDCBA}" + ${EndIf} + ${If} ${FileExists} "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0029-ABCDEFFEDCBA}" + RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0029-ABCDEFFEDCBA}" + ${EndIf} + ${If} ${FileExists} "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0030-ABCDEFFEDCBA}" + RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0030-ABCDEFFEDCBA}" + ${EndIf} + ${If} ${FileExists} "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0031-ABCDEFFEDCBA}" + RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0031-ABCDEFFEDCBA}" + ${EndIf} + ${If} ${FileExists} "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0032-ABCDEFFEDCBA}" + RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0016-0000-0032-ABCDEFFEDCBA}" + ${EndIf} ${If} ${FileExists} "$INSTDIR\extensions\{CAFEEFAC-0017-0000-0000-ABCDEFFEDCBA}" RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0017-0000-0000-ABCDEFFEDCBA}" ${EndIf} + ${If} ${FileExists} "$INSTDIR\extensions\{CAFEEFAC-0017-0000-0001-ABCDEFFEDCBA}" + RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0017-0000-0001-ABCDEFFEDCBA}" + ${EndIf} + ${If} ${FileExists} "$INSTDIR\extensions\{CAFEEFAC-0017-0000-0002-ABCDEFFEDCBA}" + RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0017-0000-0002-ABCDEFFEDCBA}" + ${EndIf} + ${If} ${FileExists} "$INSTDIR\extensions\{CAFEEFAC-0017-0000-0003-ABCDEFFEDCBA}" + RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0017-0000-0003-ABCDEFFEDCBA}" + ${EndIf} + ${If} ${FileExists} "$INSTDIR\extensions\{CAFEEFAC-0017-0000-0004-ABCDEFFEDCBA}" + RmDir /r /REBOOTOK "$INSTDIR\extensions\{CAFEEFAC-0017-0000-0004-ABCDEFFEDCBA}" + ${EndIf} !macroend !define RemoveDeprecatedFiles "!insertmacro RemoveDeprecatedFiles" ; Adds a pinned shortcut to Task Bar on update for Windows 7 and above if this ; macro has never been called before and the application is default (see ; PinToTaskBar for more details). !macro MigrateTaskBarShortcut ${GetShortcutsLogPath} $0