Port Bug 615394 [Session Restore should notify when it is beginning and ending a restore]

RESOLVED FIXED in seamonkey2.1b3

Status

SeaMonkey
Session Restore
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: Misak Khachatryan, Assigned: Misak Khachatryan)

Tracking

Trunk
seamonkey2.1b3
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

24.12 KB, patch
neil@parkwaycc.co.uk
: review+
Details | Diff | Splinter Review
(Assignee)

Description

7 years ago
Created attachment 511946 [details] [diff] [review]
patch

From parent bug:

This should cover setWindowState, as well as other restore triggers. This is
necessary for Panorama to properly handle session restore. We need this sooner
than later, as it blocks a number of Panorama bugs.

So we really want to make it clear when we're adding/replacing state.

This can be done via restoreLastSession, setBrowserState, setWindowState,
setTabState, duplicateTab, undoCloseTab, undoCloseWindow.

Of those, restoreLastSession & setBrowserState will send
sessionstore-browser-state-restored when finished.

setWindowState will fire SSTabRestoring on each tab it's restoring.
setTabState, undoCloseTab, duplicateTab should also be firing a single
SSTabRestoring.

undoCloseWindow will open a new window so doesn't actually matter to Panorama
right now.

So what I'm thinking right now is that we fire an event on the window when we
start modifying state then fire another event indicating that we're ready for
that state to be inspected/modified. Something like SSWindowStateBusy and
SSWindowStateReady?

That might be a bit too much of a wide angle approach, but I think it achieves
what we want and is enough for Panorama to know not to just start doing things
on TabOpen.
Attachment #511946 - Flags: review?(neil)

Comment 1

7 years ago
Comment on attachment 511946 [details] [diff] [review]
patch

>+  _sendWindowStateEvent: function sss__sendWindowStateEvent(aWindow, aType) {
At some point I'm going to regret asking for single underscores.
But not just yet ;-)
Attachment #511946 - Flags: review?(neil) → review+
(Assignee)

Comment 2

7 years ago
Pushed with nit fixed: http://hg.mozilla.org/comm-central/rev/c18dddea67de
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Assignee: nobody → misak.bugzilla
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.