commit c814a56f5b23d75327c6016067e77918afd6de7d
parent a1cc6f93467ab4ef6f9a517ec43dceb61675ec68
Author: Cristina Horotan <chorotan@mozilla.com>
Date: Mon, 6 Oct 2025 19:10:03 +0300
Revert "Bug 1968297 - ensure windows that are occluded after session restore draw a taskbar preview (again x2) r=win-reviewers,sessionstore-reviewers,handyman,sfoster" for causing bc failures on browser_637020.js
This reverts commit c1e6f796d4ea069455b5d9c600187cec12fed553.
Diffstat:
2 files changed, 11 insertions(+), 23 deletions(-)
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
@@ -5916,6 +5916,14 @@ var SessionStoreInternal = {
arrowScrollbox.smoothScroll = smoothScroll;
Glean.sessionRestore.restoreWindow.stopAndAccumulate(timerId);
+
+ this._setWindowStateReady(aWindow);
+
+ this._sendWindowRestoredNotification(aWindow);
+
+ Services.obs.notifyObservers(aWindow, NOTIFY_SINGLE_WINDOW_RESTORED);
+
+ this._sendRestoreCompletedNotifications();
},
/**
@@ -5978,11 +5986,9 @@ var SessionStoreInternal = {
_restoreWindowsFeaturesAndTabs(windows) {
// First, we restore window features, so that when users start interacting
// with a window, we don't steal the window focus.
- let resizePromises = [];
for (let window of windows) {
let state = this._statesToRestore[WINDOW_RESTORE_IDS.get(window)];
- // Wait for these promises after we've restored data into them below.
- resizePromises.push(this.restoreWindowFeatures(window, state.windows[0]));
+ this.restoreWindowFeatures(window, state.windows[0]);
}
// Then we restore data into windows.
@@ -5995,20 +6001,6 @@ var SessionStoreInternal = {
);
WINDOW_RESTORE_ZINDICES.delete(window);
}
- for (let resizePromise of resizePromises) {
- resizePromise.then(resizedWindow => {
- this._setWindowStateReady(resizedWindow);
-
- this._sendWindowRestoredNotification(resizedWindow);
-
- Services.obs.notifyObservers(
- resizedWindow,
- NOTIFY_SINGLE_WINDOW_RESTORED
- );
-
- this._sendRestoreCompletedNotifications();
- });
- }
},
/**
@@ -6513,7 +6505,6 @@ var SessionStoreInternal = {
}
}
- let promiseParts = Promise.withResolvers();
aWindow.setTimeout(() => {
this.restoreDimensions(
aWindow,
@@ -6525,9 +6516,7 @@ var SessionStoreInternal = {
aWinData.sizemodeBeforeMinimized || ""
);
this.restoreSidebar(aWindow, aWinData.sidebar, aWinData.isPopup);
- promiseParts.resolve(aWindow);
}, 0);
- return promiseParts.promise;
},
/**
diff --git a/widget/windows/nsWindowGfx.cpp b/widget/windows/nsWindowGfx.cpp
@@ -317,10 +317,9 @@ void nsWindow::NotifyOcclusionState(mozilla::widget::OcclusionState aState) {
if (mFrameState->GetSizeMode() == nsSizeMode_Minimized) {
isFullyOccluded = false;
}
- if (isFullyOccluded && (!mHasBeenShown || nsWindow::sIsRestoringSession)) {
+ if (isFullyOccluded && !mHasBeenShown) {
// Don't mark a newly-created window as occluded until
- // it is finished being restored (including sizing) and has been shown once.
- // (bug 1968297)
+ // it renders a taskbar icon. (bug 1968297)
isFullyOccluded = false;
}