Commit Graph

3304 Commits

Author SHA1 Message Date
Kashav Madan
e7ef1c3516 Bug 1705547 - Null check the SessionHistory object before attempting to collect, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D112290
2021-04-16 12:02:17 +00:00
Kashav Madan
e520e16620 Bug 1700963 - Stop relying on the "SessionStore:addSHistoryListener" message, r=nika
We now create the listener after receiving a "browsing-context-did-set-embedder"
and destroy it after receiving "browsing-context-discarded".

Differential Revision: https://phabricator.services.mozilla.com/D110337
2021-04-14 23:36:10 +00:00
Kashav Madan
afd185bd3b Bug 1700963 - Clean up SessionStore's SHistoryListener, r=nika
This does a few things:

1. Gets rid of the listener's `_sHistoryChanges` property, which is possible
   because _sHistoryChanges == false <-> _fromIdx == kNoIndex.
2. Simplifies the code that interacts with SHistoryListener in
   UpdateSessionStoreFromTablistener, and attempts to make that function a
   little more readable.
3. Ensures we're only doing the SessionHistory bit of
   UpdateSessionStoreFromTablistener for toplevel frames, and if SHIP is
   enabled.

Differential Revision: https://phabricator.services.mozilla.com/D110336
2021-04-14 23:36:10 +00:00
Dorel Luca
2cbd35f354 Backed out 3 changesets (bug 1700963) for Browser-chrome failures in docshell/test/browser/browser_bug1309900_crossProcessHistoryNavigation.js. CLOSED TREE
Backed out changeset cda35e554327 (bug 1700963)
Backed out changeset fbafd75b06d3 (bug 1700963)
Backed out changeset 8b922e4f612b (bug 1700963)
2021-04-14 23:26:05 +03:00
Kashav Madan
e672ad7710 Bug 1700963 - Stop relying on the "SessionStore:addSHistoryListener" message, r=nika
We now create the listener after receiving a "browsing-context-did-set-embedder"
and destroy it after receiving "browsing-context-discarded".

Differential Revision: https://phabricator.services.mozilla.com/D110337
2021-04-14 18:53:06 +00:00
Kashav Madan
e8bc18afcf Bug 1700963 - Clean up SessionStore's SHistoryListener, r=nika
This cleans up the SHistoryListener class and does a few things:

1. Gets rid of the listener's `_sHistoryChanges` property, which is possible
   because _sHistoryChanges == false <-> _fromIdx == kNoIndex.
2. Simplifies the code that interacts with SHistoryListener in
   UpdateSessionStoreFromTablistener, and attempts to make that function a
   little more readable.
3. Ensures we're only doing the SessionHistory bit of
   UpdateSessionStoreFromTablistener for toplevel frames.

Differential Revision: https://phabricator.services.mozilla.com/D110336
2021-04-14 18:53:05 +00:00
Kashav Madan
67b28ebc8d Bug 1704553 - Fix browser_frametree.js and browser_sessionHistory.js for BFCache+Fission, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D111685
2021-04-12 17:05:29 +00:00
Anny Gakhokidze
780445a687 Bug 1698601 - Part 1: Extend existing session store test files with COOP document testing, r=smaug
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
2021-04-09 17:46:52 +00:00
Kashav Madan
0d84c0d1e4 Bug 1602687 - Re-enable some sessionstore tests, r=farre
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
2021-04-07 15:30:26 +00:00
Emma Malysz
a5a8f40979 Bug 1692176, add restore previous session to history panel r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D110178
2021-03-31 16:22:52 +00:00
Gijs Kruitbosch
baf37ddb29 Bug 1701202 - fix some browser mochitests to pass with proton enabled, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D109910
2021-03-26 21:37:18 +00:00
Rob Wu
878b74f39d Bug 1698192 - Use correct currentURI during swapping of lazy browsers r=dao
Re-order calls in SessionStore.jsm to invoke the side-effect-free logic
before triggering observable events.

Clear (likely) stale value of the cached currentURI when lazy browsers
are swapped.

And while I was at it, I also fixed a bug that caused a lazy browser to
eagerly be unlazified because the unneeded mute() call on a lazy browser
unlazifies it (discovered when I added complete test coverage for this
change).

Differential Revision: https://phabricator.services.mozilla.com/D108260
2021-03-26 19:51:15 +00:00
Csoregi Natalia
e4acbbb296 Backed out changeset d885acd20f7e (bug 1701202) for causing failures on browser_synced_tabs_menu.js. CLOSED TREE 2021-03-26 21:42:09 +02:00
Gijs Kruitbosch
31c59a7040 Bug 1701202 - fix some browser mochitests to pass with proton enabled, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D109910
2021-03-26 17:13:27 +00:00
Andreas Farre
2d0871a066 Bug 1572084 - Part 2: Make Session Store data collection work with fission. r=nika
Instead of collecting data from the entire tree of documents, we
collect data per document. The collected data is sent to the
corresponding parent window context and is applied incrementally to
the tab state cache.

Differential Revision: https://phabricator.services.mozilla.com/D107814
2021-03-26 08:59:33 +00:00
Bogdan Tara
6ed704c1ea Backed out 3 changesets (bug 1572084) for WindowGlobalParent.cpp related failures CLOSED TREE
Backed out changeset d42a68132e7e (bug 1572084)
Backed out changeset 4d5a5ac074e6 (bug 1572084)
Backed out changeset 5aa59e106a42 (bug 1572084)
2021-03-25 18:56:02 +02:00
Andreas Farre
e8713aa001 Bug 1572084 - Part 2: Make Session Store data collection work with fission. r=nika
Instead of collecting data from the entire tree of documents, we
collect data per document. The collected data is sent to the
corresponding parent window context and is applied incrementally to
the tab state cache.

Differential Revision: https://phabricator.services.mozilla.com/D107814
2021-03-25 15:36:38 +00:00
ankur
0b7d4e68ba Bug 1695253 - Replaced DTD/xhtml1-strict.dtd which lead to broken network loads. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D109379
2021-03-24 16:52:06 +00:00
Anny Gakhokidze
af797a1153 Bug 1698104 - Fix session restore for about:reader, r=nika,kashav
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
2021-03-23 18:01:23 +00:00
Kashav Madan
86731a9e7f Bug 1597499 - Enable some sessionstore Fission/SHIP tests, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D108693
2021-03-23 18:01:22 +00:00
Kashav Madan
b912b90222 Bug 1597499 - Make Session Restore work in Fission, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D107883
2021-03-23 18:01:21 +00:00
smolnar
ede838631a Backed out 4 changesets (bug 1597499) for causing Fission crashes (bug 1699349). a=backout
Backed out changeset 0df7b8660446 (bug 1597499)
Backed out changeset d015ba9097c5 (bug 1597499)
Backed out changeset e84054ccadb0 (bug 1597499)
Backed out changeset 12762a25c4fa (bug 1597499)
2021-03-18 11:29:08 +02:00
Florian Quèze
ad3686bdc1 Bug 1689570 - browser/components/sessionstore/test/browser_590563.js should not rely on an implicit timer from waitForCondition, r=Gijs.
Depends on D108017

Differential Revision: https://phabricator.services.mozilla.com/D108018
2021-03-17 17:39:33 +00:00
Kashav Madan
18a73aabff Bug 1597499 - Enable some sessionstore Fission/SHIP tests, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D108693
2021-03-17 16:43:05 +00:00
Kashav Madan
ad57811557 Bug 1597499 - Make Session Restore work in Fission, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D107883
2021-03-17 16:43:05 +00:00
Paul Bone
b1e1ee5aed Bug 1697738 - Some refactoring in SessionStore.jsm r=nika
* Remove lastKnownURI from SHistoryListener
 * Remove some dead code
 * Move some code out of a condition

Differential Revision: https://phabricator.services.mozilla.com/D107974
2021-03-15 02:08:41 +00:00
Paul Bone
bb4e53396b Bug 1691135 - pt 1. SHistoryListeners track browser ID as it is constant r=nika
Differential Revision: https://phabricator.services.mozilla.com/D106841
2021-03-12 01:16:15 +00:00
Kagami Sascha Rosylight
b2e70ed01b Bug 1697253 - Hide VisualViewport interface behind the existing pref r=edgar
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
2021-03-11 20:51:51 +00:00
Dorel Luca
d87de7d014 Backed out changeset e780bd8fa66a (bug 1697253) for Mochitest failures in dom/base/test/test_domwindowutils.html. CLOSED TREE 2021-03-11 01:24:46 +02:00
Kagami Sascha Rosylight
cd5a6a8a43 Bug 1697253 - Hide VisualViewport interface behind the existing pref r=edgar
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
2021-03-10 21:20:30 +00:00
Anny Gakhokidze
c52cdbd749 Bug 1692501 - Fix timing issues when reopening all closed windows, r=kashav
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
2021-03-01 19:44:13 +00:00
Tom Tung
561095f59d Bug 1666584 - Remove the code for updating _lastKnownUserContextId because it's not needed; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D105334
2021-02-23 08:28:57 +00:00
Tom Tung
b4f2f352b8 Bug 1665942 - Collect userContextId from tab in _collectBaseTabData and stop collecting it in the session history collection; r=nika,geckoview-reviewers,agi
### 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
2021-02-23 08:28:57 +00:00
Tom Tung
9a732b018b Bug 1683713 - Ensure the restoring tab is not reused in addMultipleTabs; r=dao
Differential Revision: https://phabricator.services.mozilla.com/D100249
2021-02-23 08:28:56 +00:00
Neil Deakin
2991c9affc Bug 1676943, add telemetry for how often tab or subframe crash ui is presented to the user. In addition, add telemetry to indicate that the user is shown the unsubmitted crashes notification bar, r=mconley
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
2021-02-19 19:24:17 +00:00
Csoregi Natalia
133796a67b Backed out 2 changesets (bug 1665942, bug 1683713) for failures on browser_cookies_legacy.js. CLOSED TREE
Backed out changeset d2f4a6c7e9ca (bug 1665942)
Backed out changeset b04fe74185a0 (bug 1683713)
2021-02-17 13:28:09 +02:00
Tom Tung
ad4752a452 Bug 1665942 - Collect userContextId from tab in _collectBaseTabData and stop collecting it in the session history collection; r=nika,geckoview-reviewers,agi
### 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
2021-02-17 07:45:13 +00:00
Tom Tung
2bd4876456 Bug 1683713 - Ensure the restoring tab is not reused in addMultipleTabs; r=dao
Differential Revision: https://phabricator.services.mozilla.com/D100249
2021-02-17 07:45:12 +00:00
Mike Conley
7b78f723f5 Bug 1692522 - Temporarily re-introduce keyboard shortcut display in Recently Closed Win/Tab submenu. r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D105336
2021-02-16 16:48:18 +00:00
Mark Banner
3475182904 Bug 1608272 - Remove 'this' as the second argument to 'ChromeUtils.import', use object destructuring instead (application changes). r=geckoview-reviewers,Gijs,agi
Differential Revision: https://phabricator.services.mozilla.com/D104684
2021-02-11 22:02:15 +00:00
Mark Banner
c991d8611e Bug 1608272 - Remove 'this' as the second argument to 'ChromeUtils.import', use object destructuring instead (test-only changes). r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D104683
2021-02-11 22:02:15 +00:00
Butkovits Atila
88297e170f Bug 1677540 - disable test browser_async_remove_tab.js for frequent failures. r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D104539
2021-02-09 18:47:29 +00:00
Yura Zenevich
7c41815519 Bug 1689445 - revert EventUtils.sendMouseEvent back to being sync. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D104127
2021-02-09 01:30:08 +00:00
Emma Malysz
a5a39f1ac6 Bug 1689378: update recently closed windows and tabs panels r=mconley,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D103962
2021-02-09 01:08:38 +00:00
Mihai Alexandru Michis
b6dbc3ce92 Backed out 2 changesets (bug 1689445) for causing bc failures in browser_search.js
Backed out changeset 2b1ec882c4c1 (bug 1689445)
Backed out changeset bcb4ba398ee0 (bug 1689445)
2021-02-06 05:33:02 +02:00
Yura Zenevich
8ad4b058e3 Bug 1689445 - revert EventUtils.sendMouseEvent back to being sync. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D104127
2021-02-05 21:26:54 +00:00
Kris Maglione
4543a4a98a Bug 1602501: Update TabListener owner content when swapping frame loaders. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D103722
2021-02-03 19:28:06 +00:00
Randell Jesup
0971b4bc82 Bug 1673617 - Refactor how session restore works with SHIP, r=nika
With mods from kashav's last Try run

Differential Revision: https://phabricator.services.mozilla.com/D99461
2021-02-01 22:57:14 +00:00
Kashav Madan
f7e6033cd2 Bug 1673617 - Avoid registering multiple listeners on the same browser element, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D95227
2021-02-01 22:57:04 +00:00
Kris Maglione
caf1d0e771 Bug 1685801: Part 6 - Move some front-end code from BrowserUtils to a separate module. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D101486
2021-01-28 20:58:43 +00:00