forked from pool/MozillaFirefox
6a20f50d7f
* MFSA 2013-21/CVE-2013-0783/2013-0784 Miscellaneous memory safety hazards * MFSA 2013-22/CVE-2013-0772 (bmo#801366) Out-of-bounds read in image rendering * MFSA 2013-23/CVE-2013-0765 (bmo#830614) Wrapped WebIDL objects can be wrapped again * MFSA 2013-24/CVE-2013-0773 (bmo#809652) Web content bypass of COW and SOW security wrappers * MFSA 2013-25/CVE-2013-0774 (bmo#827193) Privacy leak in JavaScript Workers * MFSA 2013-26/CVE-2013-0775 (bmo#831095) Use-after-free in nsImageLoadingContent * MFSA 2013-27/CVE-2013-0776 (bmo#796475) Phishing on HTTPS connection through malicious proxy * MFSA 2013-28/CVE-2013-0780/CVE-2013-0782/CVE-2013-0777/ CVE-2013-0778/CVE-2013-0779/CVE-2013-0781 Use-after-free, out of bounds read, and buffer overflow issues found using Address Sanitizer - removed obsolete patches * mozilla-webrtc.patch * mozilla-gstreamer-803287.patch - added patch to fix session restore window order (bmo#712763) OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=319
96 lines
4.2 KiB
Diff
96 lines
4.2 KiB
Diff
# HG changeset patch
|
|
# User Tim Taubert <ttaubert@mozilla.com>
|
|
# Date 1358185823 -3600
|
|
# Node ID f7a2af238d06c17d10c49c94ef860434d5b76758
|
|
Bug 712763 - Backout changes from bug 669272 to keep original window order when restoring a session
|
|
|
|
diff --git a/browser/components/sessionstore/src/SessionStore.jsm b/browser/components/sessionstore/src/SessionStore.jsm
|
|
--- a/browser/components/sessionstore/src/SessionStore.jsm
|
|
+++ b/browser/components/sessionstore/src/SessionStore.jsm
|
|
@@ -1757,23 +1757,16 @@ let SessionStoreInternal = {
|
|
|
|
// We want to re-use the last opened window instead of opening a new one in
|
|
// the case where it's "empty" and not associated with a window in the session.
|
|
// We will do more processing via _prepWindowToRestoreInto if we need to use
|
|
// the lastWindow.
|
|
let lastWindow = this._getMostRecentBrowserWindow();
|
|
let canUseLastWindow = lastWindow &&
|
|
!lastWindow.__SS_lastSessionWindowID;
|
|
- let lastSessionFocusedWindow = null;
|
|
- this.windowToFocus = lastWindow;
|
|
-
|
|
- // move the last focused window to the start of the array so that we
|
|
- // minimize window movement (see bug 669272)
|
|
- lastSessionState.windows.unshift(
|
|
- lastSessionState.windows.splice(lastSessionState.selectedWindow - 1, 1)[0]);
|
|
|
|
// Restore into windows or open new ones as needed.
|
|
for (let i = 0; i < lastSessionState.windows.length; i++) {
|
|
let winState = lastSessionState.windows[i];
|
|
let lastSessionWindowID = winState.__lastSessionWindowID;
|
|
// delete lastSessionWindowID so we don't add that to the window again
|
|
delete winState.__lastSessionWindowID;
|
|
|
|
@@ -1801,28 +1794,19 @@ let SessionStoreInternal = {
|
|
// Restore into that window - pretend it's a followup since we'll already
|
|
// have a focused window.
|
|
//XXXzpao This is going to merge extData together (taking what was in
|
|
// winState over what is in the window already. The hack we have
|
|
// in _preWindowToRestoreInto will prevent most (all?) Panorama
|
|
// weirdness but we will still merge other extData.
|
|
// Bug 588217 should make this go away by merging the group data.
|
|
this.restoreWindow(windowToUse, { windows: [winState] }, canOverwriteTabs, true);
|
|
- if (i == 0)
|
|
- lastSessionFocusedWindow = windowToUse;
|
|
-
|
|
- // if we overwrote the tabs for our last focused window, we should
|
|
- // give focus to the window that had it in the previous session
|
|
- if (canOverwriteTabs && windowToUse == lastWindow)
|
|
- this.windowToFocus = lastSessionFocusedWindow;
|
|
}
|
|
else {
|
|
- let win = this._openWindowWithState({ windows: [winState] });
|
|
- if (i == 0)
|
|
- lastSessionFocusedWindow = win;
|
|
+ this._openWindowWithState({ windows: [winState] });
|
|
}
|
|
}
|
|
|
|
// Merge closed windows from this session with ones from last session
|
|
if (lastSessionState._closedWindows) {
|
|
this._closedWindows = this._closedWindows.concat(lastSessionState._closedWindows);
|
|
this._capClosedWindows();
|
|
}
|
|
@@ -2735,27 +2719,27 @@ let SessionStoreInternal = {
|
|
this._setWindowStateBusy(aWindow);
|
|
|
|
if (root._closedWindows)
|
|
this._closedWindows = root._closedWindows;
|
|
|
|
var winData;
|
|
if (!root.selectedWindow || root.selectedWindow > root.windows.length) {
|
|
root.selectedWindow = 0;
|
|
- } else {
|
|
- // put the selected window at the beginning of the array to ensure that
|
|
- // it gets restored first
|
|
- root.windows.unshift(root.windows.splice(root.selectedWindow - 1, 1)[0]);
|
|
}
|
|
+
|
|
// open new windows for all further window entries of a multi-window session
|
|
// (unless they don't contain any tab data)
|
|
for (var w = 1; w < root.windows.length; w++) {
|
|
winData = root.windows[w];
|
|
if (winData && winData.tabs && winData.tabs[0]) {
|
|
var window = this._openWindowWithState({ windows: [winData] });
|
|
+ if (w == root.selectedWindow - 1) {
|
|
+ this.windowToFocus = window;
|
|
+ }
|
|
}
|
|
}
|
|
winData = root.windows[0];
|
|
if (!winData.tabs) {
|
|
winData.tabs = [];
|
|
}
|
|
// don't restore a single blank tab when we've had an external
|
|
// URL passed in for loading at startup (cf. bug 357419)
|