We currently wait for the "sessionstore-single-window-restored" notification and
*then* start listening for individual "SSTabRestored" events. This doesn't work
because we may fire those events before we get the chance to create the listener.
Listening for "browser-window-before-show" works consistently, but we need
references to the windows *before* they start restoring, so we have
to manually run the "Restore All Windows" code, instead of clicking the Library
button.
Originally part of the patch stack for bug 1703556.
Differential Revision: https://phabricator.services.mozilla.com/D112887
A document that changes the "multiple" attribute of the <select> element after
the load event (eg., perhaps in response to user action) will crash the browser
since we will attempt to restore data collected for a multi-select into a
single-select.
Differential Revision: https://phabricator.services.mozilla.com/D112057
A document that changes the "multiple" attribute of the <select> element after
the load event (eg., perhaps in response to user action) will crash the browser
since we will attempt to restore data collected for a multi-select into a
single-select.
Differential Revision: https://phabricator.services.mozilla.com/D112057
Modify related test files to test documents with COOP headers enabled.
There are some tests that fail when run with new COOP configurations without
Fission enabled, prior to fixes that come in part 2. This means that some of
the COOP behaviour was already broken. Since fixing non-Fission COOP
behaviour prior to this patch is out of scope, I skipped calling `addCoopTask`
to test COOP documents in non Fission cases for such tests.
Even with COOP headers disabled, some tests fail when the document they load
is served over httpS and not http. For a single test where this behaviour was
occuring prior to fixes in part 2, I skipped testing an HTTPS non-COOP
document and filed 1703351 to fix such behaviour.
Differential Revision: https://phabricator.services.mozilla.com/D110993
These were fixed by bug 1572084 and bug 1597499. Two are still skipped and will
be fixed in bug 1700623 and bug 1703556.
Differential Revision: https://phabricator.services.mozilla.com/D110999
Implement an observer to wait for correct window events in order to restore tab
content. Non-SHIP code restores about:reader scroll position after receiving
"AboutReaderContentReady" event, so to achieve the same thing with session
history in parent enabled, we can wait for "AboutReader:Ready" event.
Differential Revision: https://phabricator.services.mozilla.com/D108712
Bug 1357785 accidentally omitted the flag on the interface itself. This patch makes thing consistent to prevent potential confusion in feature detection.
Differential Revision: https://phabricator.services.mozilla.com/D107742
Bug 1357785 accidentally omitted the flag on the interface itself. This patch makes thing consistent to prevent potential confusion in feature detection.
Differential Revision: https://phabricator.services.mozilla.com/D107742
In bug 1589102, changes were made to how about:blank and about:srcdoc load,
making them go via DocumentChannel and thus slightly increasing documents' load
times. This causes some timing issues in SessionStore code.
When we click to "Reopen all (closed) Windows", undoCloseWindow() is called for
each window that we have to restore. The following scenario can occur - we are
restoring window 1, and undoCloseWindow() has already called restoreWindows,
after receiving the window showing promise, and in the meantime
undoCloseWindow() has been called for window 2, and there is now a promise in
the WINDOW_SHOWING_PROMISES. But now restoreWindows() for window1 calls
_openWindows(), where root.windows length is 0, but WINDOW_SHOWING_PROMISES is
not empty (because of window 2's undoCloseWindow), and the resolve callback for
_openWindows() gets called with wrong arg. To solve this, ensure that the
promises returned from _openWindows() correspond to the windows opened
within the body of the function.
Differential Revision: https://phabricator.services.mozilla.com/D106304
### Story
When a COOP+COEP page is opened, we change the remoteness of the tab. After
changing the remoteness, the tab is then restored by its TabState. However,
we haven't collected userContextId through the current mechanism.
To fix that, this patch changes the way to collect userContextId.
### Test Plan
Test: D98296
Depends on D98296
Differential Revision: https://phabricator.services.mozilla.com/D98468
The telemetry is triggered either when the user is shown the tab crashed page, or when the subframe notification is displayed and the crash occurs in an active tab, or when the user switches to a tab that has a subframe crash notification displayed. The telemetry only applies the first time the tab is switched to. The unsubmitted crashes notification bar appears after 10 minutes or so and is shown in the top-most browser window, if one exists, and telemetry applies once when this occurs.
Differential Revision: https://phabricator.services.mozilla.com/D100349
### Story
When a COOP+COEP page is opened, we change the remoteness of the tab. After
changing the remoteness, the tab is then restored by its TabState. However,
we haven't collected userContextId through the current mechanism.
To fix that, this patch changes the way to collect userContextId.
### Test Plan
Test: D98296
Depends on D98296
Differential Revision: https://phabricator.services.mozilla.com/D98468