Commit graph

2957 commits

Author SHA1 Message Date
Kris Maglione
ae436f55ec Bug 1646560: Part 2 - Move allowJavascript and friends from DocShell to BrowsingContext and WindowContext. r=jdescottes,nika,geckoview-reviewers,devtools-backward-compat-reviewers,agi
This is slightly complicated by the fact that the editor code wants to be able
to set this from the content process, so we really need separate
BrowsingContext and WindowContext flags, the latter of which can be set by the
owning process.

Differential Revision: https://phabricator.services.mozilla.com/D114899
2021-06-15 04:40:11 +00:00
Andreas Farre
966f9def62 Bug 1705689 - Don't update the tab state if the browsing context has been replaced. r=kashav
Differential Revision: https://phabricator.services.mozilla.com/D117266
2021-06-14 13:48:49 +00:00
Ed Lee
9930a18c9b Bug 1633883 - TelemetryTestUtils.assertScalar assumes Number (so behaves odd for boolean, strings) r=chutten
Split assertScalar to assertScalarUnset to allow the former to plain check the value including strings, false and 0.

Differential Revision: https://phabricator.services.mozilla.com/D117457
2021-06-11 21:06:26 +00:00
Anny Gakhokidze
ae1a9ec1c3 Bug 1709136 - Part 2: Update SessionHistoryEntry in ReplaceLoadingSessionHistoryEntryForLoad, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D117238
2021-06-11 20:12:10 +00:00
Anny Gakhokidze
d5f98a7382 Bug 1709136 - Part 1: Remove the explicit remoteness switch that happens during the restore process, r=nika,kashav
Differential Revision: https://phabricator.services.mozilla.com/D116209
2021-06-11 20:12:10 +00:00
Kashav Madan
4c2bc4a280 Bug 1715264 - Fix browser_async_remove_tab.js for SHIP, r=farre
Relies on frame script message ordering.

Differential Revision: https://phabricator.services.mozilla.com/D117233
2021-06-10 14:31:00 +00:00
Kashav Madan
506f273571 Bug 1715264 - Fix browser_async_flushes.js for SHIP, r=farre
Relies on frame script message ordering.

Differential Revision: https://phabricator.services.mozilla.com/D117232
2021-06-10 14:31:00 +00:00
Kashav Madan
9412b5ad01 Bug 1715264 - Remove annotations for browser_sessionHistory.js, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D117231
2021-06-10 14:30:59 +00:00
Kashav Madan
534f0f8a49 Bug 1715264 - Cleanup how Session Store collects SessionHistory, r=farre
This does a few things:

1. Removes the `aImmediately` flag from the RequestSHistoryUpdate path, and
   moves that responsibility to SessionStore
1. Simplifies how and when SessionStore calls SessionHistory.collectFromParent()
1. Attempts to clean-up SessionStore's SHistoryListener (again)

Differential Revision: https://phabricator.services.mozilla.com/D117230
2021-06-10 14:30:59 +00:00
Andreas Farre
dbee36b3e8 Bug 1710004 - Part 3: Restore session storage from the parent process. r=kashav,asuth
Depends on D116007

Differential Revision: https://phabricator.services.mozilla.com/D116213
2021-06-08 13:42:33 +00:00
Andreas Farre
6481b507ac Bug 1710004 - Part 1: Remove dataset concept from Session Storage. r=asuth
Session Storage used to share implementation with Local Storage, where
a distinction of a default data set from a session data set made
sense. In Session Storage all data is actually scoped by the
session. Since Bug 1322316 Session Storage no longer share
implementation with Local Storage, which makes it safe to collapse the
datasets in Session Storage to one dataset, which makes life easier,
especially for Session (Re-)Store.

Differential Revision: https://phabricator.services.mozilla.com/D116609
2021-06-08 13:42:33 +00:00
Butkovits Atila
095438713c Bug 1713975 - disable browser_sessionHistory.js on Linux_opt for frequent failures. r=intermittent-reviewers,bhearsum
Differential Revision: https://phabricator.services.mozilla.com/D116944
2021-06-07 20:00:20 +00:00
Andrew Halberstadt
6de5f47867 Bug 1714225 - Expand skip annotation in 'browser_async_remove_tab.js' for MacOS fission perma-fail, r=intermittent-reviewers,bhearsum
Differential Revision: https://phabricator.services.mozilla.com/D117019
2021-06-07 15:16:58 +00:00
Andrew Halberstadt
f56ba2267e Bug 1714225 - Skip 'browser/components/sessionstore/test/browser_async_remove_tab.js' on Windows fission for perma-fail, r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D116731
2021-06-03 17:51:38 +00:00
Andrew Halberstadt
f84d5f3016 Bug 1694824 - [ci] Annotate browser-chrome manifests for new fission failures, r=jmaher,extension-reviewers,preferences-reviewers,zombie
Differential Revision: https://phabricator.services.mozilla.com/D116276
2021-06-02 19:22:25 +00:00
Kashav Madan
8b26cd73bb Bug 1706445 - Fix test helpers that use "SessionStore:update", r=nika,perftest-reviewers,sparky
Also skips a frame script OOM test for Fission.

Differential Revision: https://phabricator.services.mozilla.com/D115930
2021-06-01 20:06:48 +00:00
Kashav Madan
1209d70a99 Bug 1706445 - Stop loading content-sessionStore.js for SHIP, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D116147
2021-06-01 20:06:47 +00:00
Kashav Madan
2dafa64364 Bug 1706445 - Handle isFinal updates through native code, r=nika
Replaces the `isFinal` bit with a "browser-shutdown-tabstate-updated" observer
notification, which is fired after all frames in the document are flushed.

Differential Revision: https://phabricator.services.mozilla.com/D116146
2021-06-01 20:06:47 +00:00
Kashav Madan
9d815b9333 Bug 1706445 - Merge the two TabState.update() paths, r=nika
This will make it easier to handle isFinal updates.

Differential Revision: https://phabricator.services.mozilla.com/D116145
2021-06-01 20:06:47 +00:00
Kashav Madan
47ad1edf15 Bug 1706445 - Stop using "SessionStore:flush" for SHIP, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D116144
2021-06-01 20:06:46 +00:00
Andreas Farre
c4d2bf59b1 Bug 1713098 - Make modifySessionStorage use browsing context to get subframe. r=kashav
Differential Revision: https://phabricator.services.mozilla.com/D116102
2021-05-28 07:48:51 +00:00
Andreas Farre
75578a78f7 Part 3: Bug 1700623 - Used TabStateFlusher.flush to guarantee session store state. r=kashav
Depends on D111429

Differential Revision: https://phabricator.services.mozilla.com/D111430
2021-05-26 07:14:04 +00:00
Mike Conley
02db702d76 Bug 1709050 - Suppress the focus ring in the upgrade dialog and some about: pages when they first load. r=Mardak,Gijs
Using autofocus="true" or programmatically calling .focus() when there is no pre-existing focused
element causes the :focus-visible to match.

This patch avoids using autofocus="true" on some of our about: pages, and uses
Element.focus({ preventFocusRing: true }) to avoid that when these pages and dialog
first load. Note that this doesn't prevent the focus ring from _ever_ appear, it just
stops it from appearing on first load.

Differential Revision: https://phabricator.services.mozilla.com/D115062
2021-05-21 18:13:29 +00:00
Alexandru Michis
84d8f14b41 Backed out 9 changesets (bug 1700623) for causing bc failures in browser_history_menu.js
CLOSED TREE

Backed out changeset 5eae296ad8b5 (bug 1700623)
Backed out changeset 97c3add3b00a (bug 1700623)
Backed out changeset 7ab483627a27 (bug 1700623)
Backed out changeset a4e673640de5 (bug 1700623)
Backed out changeset 513ea16be430 (bug 1700623)
Backed out changeset 88b4add342df (bug 1700623)
Backed out changeset c13bdee1b526 (bug 1700623)
Backed out changeset 26df421dac02 (bug 1700623)
Backed out changeset 6cd0b7a269e5 (bug 1700623)
2021-05-21 11:43:54 +03:00
Andreas Farre
47befec4c6 Part 3: Bug 1700623 - Used TabStateFlusher.flush to guarantee session store state. r=kashav
Depends on D111429

Differential Revision: https://phabricator.services.mozilla.com/D111430
2021-05-20 12:48:21 +00:00
Anny Gakhokidze
fca18172d1 Bug 1707138 - Don't send session store updates after we start process switching, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D115015
2021-05-18 20:01:55 +00:00
Mike Conley
2d22fd4032 Bug 1709472 - Change error page favicon from warning.svg to info.svg. r=jaws
This also updates the icon used for the "focus tab by prompting" permission in
the permission panel to use info.svg.

Differential Revision: https://phabricator.services.mozilla.com/D114653
2021-05-17 18:56:01 +00:00
Butkovits Atila
1455c4b2b0 Backed out changeset ec36559d6b92 (bug 1709050) for causing failure at browser_aboutNetError.js. CLOSED TREE 2021-05-17 21:49:03 +03:00
Mike Conley
0678d0a24a Bug 1709050 - Suppress the focus ring in the upgrade dialog and some about: pages when they first load. r=Mardak,Gijs
Using autofocus="true" or programmatically calling .focus() when there is no pre-existing focused
element causes the :focus-visible to match.

This patch avoids using autofocus="true" on some of our about: pages, and uses
Element.focus({ preventFocusRing: true }) to avoid that when these pages and dialog
first load. Note that this doesn't prevent the focus ring from _ever_ appear, it just
stops it from appearing on first load.

Differential Revision: https://phabricator.services.mozilla.com/D115062
2021-05-17 17:44:09 +00:00
Dorel Luca
e0199b1666 Backed out changeset 13b220eff7d8 (bug 1709050) for Browser-chrome failures in browser/base/content/test/about/browser_aboutCertError.js. CLOSED TREE 2021-05-17 18:14:37 +03:00
Mike Conley
03c72074ab Bug 1709050 - Suppress the focus ring in the upgrade dialog and some about: pages when they first load. r=Mardak,Gijs
Using autofocus="true" or programmatically calling .focus() when there is no pre-existing focused
element causes the :focus-visible to match.

This patch avoids using autofocus="true" on some of our about: pages, and uses
Element.focus({ preventFocusRing: true }) to avoid that when these pages and dialog
first load. Note that this doesn't prevent the focus ring from _ever_ appear, it just
stops it from appearing on first load.

Differential Revision: https://phabricator.services.mozilla.com/D115062
2021-05-17 13:58:49 +00:00
Brindusan Cristian
71c0c219e8 Backed out changeset 289f6a96b9e4 (bug 1709472) for xpcshell failures in test_bookmarks_html.js. CLOSED TREE 2021-05-14 00:37:24 +03:00
Mike Conley
c7b01c2055 Bug 1709472 - Change error page favicon from warning.svg to info.svg. r=jaws
This also updates the icon used for the "focus tab by prompting" permission in
the permission panel to use info.svg.

Differential Revision: https://phabricator.services.mozilla.com/D114653
2021-05-13 19:32:00 +00:00
Anny Gakhokidze
ac0b761aa0 Bug 1703326 - Stop relying on ContentSessionStore for SessionStore:crashedTabRevived, r=kashav
Differential Revision: https://phabricator.services.mozilla.com/D113425
2021-05-12 19:33:47 +00:00
Emma Malysz
baac9354d7 Bug 1649605, part 1: provide async support for promise workers r=barret,asuth
Differential Revision: https://phabricator.services.mozilla.com/D113152
2021-05-06 18:21:51 +00:00
Kashav Madan
00fc8347ba Bug 1703556 - Wait for individual SSTabRestored events before proceeding, r=annyG
Awaiting setWindowState doesn't actually work here, since we fire the
SSWindowRestored event before the tabs finish restoring (bug 1709411 to rename
the event). It works to just wait for the individual SSTabRestored events, since
we'll only fire those after each tab is restored.

Differential Revision: https://phabricator.services.mozilla.com/D114261
2021-05-06 13:55:15 +00:00
Kashav Madan
55f8978320 Bug 1702055 - Fix how the expected SSTabRestored count is calculated in waitForBrowserState, r=nika
SessionStore factors both prefs into the decision about if a tab is restored
lazily, but this helper only uses the `restore_tabs_lazily` pref.

Depends on D114001

Differential Revision: https://phabricator.services.mozilla.com/D114002
2021-05-03 18:16:42 +00:00
Kashav Madan
4df174c08b Bug 1702055 - Ensure SSTabRestoring is only fired once per browser, r=nika
A previous patch made it so we'd fire this after the full restore finished, but
some consumers expect this event prior to the completion of the load.

Differential Revision: https://phabricator.services.mozilla.com/D114001
2021-05-03 18:16:41 +00:00
Kashav Madan
dc647a1e8e Bug 1702055 - Move the "restore DocShell state" process out of ContentSessionStore, r=nika
This also makes it so that we will never fire SSTabRestored without first having
sent the associated SSTabRestoring event.

Differential Revision: https://phabricator.services.mozilla.com/D110335
2021-05-03 18:16:41 +00:00
Kashav Madan
de071d3972 Bug 1702055 - Include the SessionStore epoch in "SessionStore:flush" messages, r=nika
With the removal of the SessionStore:RestoreDocShellState message, the epoch
will no longer be updated otherwise, so we should include it in the Flush
message to ensure that messages are not being dropped.

Differential Revision: https://phabricator.services.mozilla.com/D110334
2021-05-03 18:16:40 +00:00
Kashav Madan
976264b9af Bug 1702055 - Replace CallRestoreTabContentComplete with a Promise, r=nika
This should help avoid message ordering issues in the next patches. To ensure
that we're not firing events too early, we now do a "full" restore even if we
don't have form or scroll data, including for about:blank URIs.

This also moves all restore state on the CanonicalBrowsingContext into a
separate `mRestoreState` struct.

Differential Revision: https://phabricator.services.mozilla.com/D110333
2021-05-03 18:16:40 +00:00
Kashav Madan
5fa3ae5c3a Bug 1690134 - Fix flakiness in browser_history_persist.js, r=annyG
Waiting for the about:robots load explicitly ensures we don't proceed until all
history changes have fully propagated.

Differential Revision: https://phabricator.services.mozilla.com/D113686
2021-04-28 21:49:15 +00:00
Butkovits Atila
2819d98182 Backed out 4 changesets (bug 1702055) for causing failures on /browser_UsageTelemetry_private_and_restore.js. CLOSED TREE
Backed out changeset af21e2d8324e (bug 1702055)
Backed out changeset ff67df9befe5 (bug 1702055)
Backed out changeset b5f0638dcbc4 (bug 1702055)
Backed out changeset bffaa2c203b3 (bug 1702055)
2021-04-28 04:42:09 +03:00
Kashav Madan
13ad477d06 Bug 1702055 - Only call setInitialTabTitle() if the label hasn't yet been set, r=nika
With the new "restore docshell state" codepath, we may be calling
updateTabLabelAndIcon() later than we did before, which means we may have
already set the tab label (in tabbrowser.init()), and it's incorrect to override
that label value with the session history entry's title.

Differential Revision: https://phabricator.services.mozilla.com/D111456
2021-04-27 19:54:58 +00:00
Kashav Madan
83dc1e6602 Bug 1702055 - Move the "restore DocShell state" process out of ContentSessionStore.jsm, r=nika
This also makes it so that we will never fire SSTabRestored without first having
sent the associated SSTabRestoring event.

Differential Revision: https://phabricator.services.mozilla.com/D110335
2021-04-27 19:54:57 +00:00
Kashav Madan
0ed1011525 Bug 1702055 - Ensure that ContentSessionStore's epoch is updated for tab flushes, r=nika
With the removal of the SessionStore:RestoreDocShellState message, the epoch
will no longer be updated otherwise, so we should include it in the Flush
message to ensure that messages are not being dropped.

Differential Revision: https://phabricator.services.mozilla.com/D110334
2021-04-27 19:54:57 +00:00
Kashav Madan
0fd5870b0c Bug 1702055 - Replace CallRestoreTabContentComplete with a Promise, r=nika
This should help avoid message ordering issues in the next patches. To ensure
that we're not firing events too early, we now do a "full" restore even if we
don't have form or scroll data, including for about:blank URIs.

This also moves all restore state on the CanonicalBrowsingContext into a
separate `mRestoreState` struct.

Differential Revision: https://phabricator.services.mozilla.com/D110333
2021-04-27 19:54:56 +00:00
Kashav Madan
fe1cf774c7 Bug 1696137 - Fix timeouts in browser_reopen_all_windows.js, r=annyG
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
2021-04-26 18:08:11 +00:00
Joel Maher
8a9f37b534 Bug 1706716 green up mda, xpcshell, browser-chrome, reftest for apple silicon. r=necko-reviewers,extension-reviewers,preferences-reviewers,application-update-reviewers,zombie,ahal,bytesized
Differential Revision: https://phabricator.services.mozilla.com/D113001
2021-04-22 18:39:40 +00:00
Anny Gakhokidze
6d81a5895b Bug 1701735 - Skip browser_scrollPositions.js when fission is disabled, r=nika
We have fixed this test previously for fission, and it's only failing without
it.

Differential Revision: https://phabricator.services.mozilla.com/D113044
2021-04-22 17:42:10 +00:00