Граф коммитов

6762 Коммитов

Автор SHA1 Сообщение Дата
Anny Gakhokidze 8afaf07df0 Bug 1721217 - Part 1: Enable parent controlled loads via DC, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D126841
2021-11-25 20:40:56 +00:00
Marian-Vasile Laza 4ec6cdf544 Backed out changeset a905fca36db2 (bug 1740516) for causing bc failures on browser_bug343515.js. CLOSED TREE 2021-11-25 22:55:43 +02:00
Peter Van der Beken ee1558efd7 Bug 1740516 - Fire pageshow for an iframe before the pageshow for its parent window when coming out of BFCache with session history in parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D131891
2021-11-25 16:22:48 +00:00
Tim Huang 5cdaa70075 Bug 1731982 - Part 2: Use partitioned principal for creating initial client source if needed in nsDocShell. r=asuth
Currently, we are using the regular principal and inherited regular
principal to create clientSource in nsDocShell. This patch makes the
nsDocshell to use the partitioned principal if needed.

Differential Revision: https://phabricator.services.mozilla.com/D127629
2021-11-25 13:11:30 +00:00
Butkovits Atila ed15a00d3e Backed out 2 changesets (bug 1740517, bug 1740516) for causing failures at browser_bug343515.js and browser_browsingContext-webProgress.js. CLOSED TREE
Backed out changeset e656dd82e48a (bug 1740517)
Backed out changeset 9eb7a39f39b7 (bug 1740516)
2021-11-23 23:28:54 +02:00
Peter Van der Beken d8fcefcdde Bug 1740516 - Fire pageshow for an iframe before the pageshow for its parent window when coming out of BFCache with session history in parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D131891
2021-11-23 20:04:35 +00:00
Marian-Vasile Laza 3c2ad74d5b Backed out 4 changesets (bug 1741132, bug 1740516, bug 1740517) for causing mochitest failures on test_bug1741132.html.
Backed out changeset 9b91c4d469d7 (bug 1741132)
Backed out changeset 1ad268a75fec (bug 1741132)
Backed out changeset 6a6e91c8eeeb (bug 1740517)
Backed out changeset c8a789ba6dc7 (bug 1740516)
2021-11-23 19:07:58 +02:00
Peter Van der Beken afd1bab71f Bug 1741132 - Correctly evict entries with session history in parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D131894
2021-11-23 15:37:24 +00:00
Peter Van der Beken 700a2310d6 Bug 1740516 - Fire pageshow for an iframe before the pageshow for its parent window when coming out of BFCache with session history in parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D131891
2021-11-23 15:37:23 +00:00
Kagami Sascha Rosylight 36ca2b283d Bug 1741018 - Use uint32_t for bfcache flags and MOZ_LOG for ACTIVE_LOCK r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D131523
2021-11-22 12:14:15 +00:00
Toshihito Kikuchi 599a77edff Bug 1734099 - Never unload tabs with active RTCPeerConnection instances. r=peterv,jesup
This patch makes sure the Tab Unloading feature does not unload tabs that have
active peer connections not to disrupt browsing experience based on WebRTC peer
connections.

To enable JS code to access the number of active peer connections, this patch
moves `nsPIDOMWindowInner::mTotalActivePeerConnections` to `WindowGlobalParent`.

Differential Revision: https://phabricator.services.mozilla.com/D128761
2021-11-18 22:59:12 +00:00
Evgenia Kotovich 5264bfd45a Bug 1702240. Change nsDocShell's notification of keyword-search pass a string rather than an engine. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D130336
2021-11-17 09:28:06 +00:00
Olli Pettay 91122391ce Bug 1730120, close ContentViewer properly if initialization fails, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D130211
2021-11-09 22:09:48 +00:00
Butkovits Atila 0d719e8d5d Backed out changeset d2e38d5047ae (bug 1730120) for causing Crashtest failures at crashtests/1419902.html. CLOSED TREE 2021-11-09 21:17:48 +02:00
Olli Pettay 5a0254075d Bug 1730120, close ContentViewer properly if initialization fails, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D130211
2021-11-09 17:15:06 +00:00
Andreas Farre 8d833fa39a Bug 1733963 - Part 3: Make SyncedContext use BitSet for Transaction. r=nika
This removes the limit on the number of possible field counts for a
synced field class.

Depends on D127448

Differential Revision: https://phabricator.services.mozilla.com/D127449
2021-11-09 12:34:52 +00:00
Alexandru Michis 490a04115c Backed out 12 changesets (bug 1731982, bug 1736401) for causing crashes. a=backout
DONTBUILD

Backed out changeset ab85eef8a4fd (bug 1736401)
Backed out changeset 347ce2439936 (bug 1731982)
Backed out changeset fa0ff1505daa (bug 1731982)
Backed out changeset 5b1f2b0a5673 (bug 1731982)
Backed out changeset 4adc65d2f1a3 (bug 1731982)
Backed out changeset a8700204af07 (bug 1731982)
Backed out changeset 88bd00ed8d94 (bug 1731982)
Backed out changeset 80bd8c79b931 (bug 1731982)
Backed out changeset 58ca3a94fec0 (bug 1731982)
Backed out changeset 0b28570dea43 (bug 1731982)
Backed out changeset 23524ce67bb9 (bug 1731982)
Backed out changeset d29cc06a65db (bug 1731982)
2021-11-09 09:23:38 +02:00
Gerald Squelart 5399574d8b Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-08 23:59:35 +00:00
alwu 65b8ead15e Bug 1739685 - part1 : copy `ShouldDelayMediaFromStart` in `ReplacedBy()` . r=emilio
A follow-up based on [1].

[1]
https://phabricator.services.mozilla.com/D128126#4226792
https://bugzilla.mozilla.org/show_bug.cgi?id=1733902#c12

Differential Revision: https://phabricator.services.mozilla.com/D130292
2021-11-08 18:48:04 +00:00
Marian-Vasile Laza 7241c1f9e9 Backed out 3 changesets (bug 1733963) for causing build bustages on TestEnumSet.cpp. CLOSED TREE
Backed out changeset 83b804a449c2 (bug 1733963)
Backed out changeset 434e10a0c39a (bug 1733963)
Backed out changeset d7d88b948f71 (bug 1733963)
2021-11-08 19:42:46 +02:00
Andreas Farre 495dc60933 Bug 1733963 - Part 3: Make SyncedContext use BitSet for Transaction. r=nika
This removes the limit on the number of possible field counts for a
synced field class.

Depends on D127448

Differential Revision: https://phabricator.services.mozilla.com/D127449
2021-11-08 16:01:26 +00:00
Tim Huang a41f61c051 Bug 1731982 - Part 2: Use partitioned principal for creating initial client source if needed in nsDocShell. r=asuth
Currently, we are using the regular principal and inherited regular
principal to create clientSource in nsDocShell. This patch makes the
nsDocshell to use the partitioned principal if needed.

Differential Revision: https://phabricator.services.mozilla.com/D127629
2021-11-08 14:30:53 +00:00
Tooru Fujisawa 4d7bcb01be Bug 1701001 - Part 2: Add "is popup" field to browsing context. r=smaug
Add BrowsingContext::FieldValues.mIsPopupRequested, and pass "is popup"
value calculated before opening window/tab to BrowsingContext::CreateDetached.

Other code path that is unrelated to content-priv window.open uses the
default value false.

Differential Revision: https://phabricator.services.mozilla.com/D129411
2021-11-06 01:19:14 +00:00
Marian-Vasile Laza 4cbdb0eb2b Backed out 4 changesets (bug 1737832, bug 1701001) for causing geckoview failures on noopener-noreferrer-BarProp.window.html. CLOSED TREE
Backed out changeset ff439d9c0391 (bug 1701001)
Backed out changeset b0e47b1f4d39 (bug 1701001)
Backed out changeset 0e2ca3cc650e (bug 1701001)
Backed out changeset 712b897cbc76 (bug 1737832)
2021-11-06 02:44:46 +02:00
Tooru Fujisawa 0e16a22ff2 Bug 1701001 - Part 2: Add "is popup" field to browsing context. r=smaug
Add BrowsingContext::FieldValues.mIsPopupRequested, and pass "is popup"
value calculated before opening window/tab to BrowsingContext::CreateDetached.

Other code path that is unrelated to content-priv window.open uses the
default value false.

Differential Revision: https://phabricator.services.mozilla.com/D129411
2021-11-05 23:07:40 +00:00
Marian-Vasile Laza fca6bc6241 Backed out 3 changesets (bug 1733963) for causing build bustages on SyncedContext.h. CLOSED TREE
Backed out changeset de5c7a16378c (bug 1733963)
Backed out changeset f5f3a27abf60 (bug 1733963)
Backed out changeset cc3a0603f88a (bug 1733963)
2021-11-05 20:54:33 +02:00
Andreas Farre 1572bd11bb Bug 1733963 - Part 3: Make SyncedContext use BitSet for Transaction. r=nika
This removes the limit on the number of possible field counts for a
synced field class.

Depends on D127448

Differential Revision: https://phabricator.services.mozilla.com/D127449
2021-11-05 17:23:02 +00:00
Cristian Tuns 1aeac93d23 Backed out 5 changesets (bug 1738627) for causing xpcshell failures on test_ext_geckoProfiler_schema.js CLOSED TREE
Backed out changeset 42d385d7da97 (bug 1738627)
Backed out changeset edeb3a338954 (bug 1738627)
Backed out changeset 98f02e35134d (bug 1738627)
Backed out changeset 711daa6dd24b (bug 1738627)
Backed out changeset 49e12753a40c (bug 1738627)
2021-11-05 05:12:28 -04:00
Gerald Squelart 7fa084ae7c Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-05 05:52:28 +00:00
Masayuki Nakano 4341d6fb0c Bug 1455514 - part 1: Add accessors and static helper methods to retrieve `nsINode` or its concrete classes from `EventTarget` r=smaug
Currently, checking whether an `EventTarget` is `nsINode` (or its concrete
classes) or not requires a QI, but it's expensive and used a lot while we
handle each event.  Therefore, it'd be nicer for creating a virtual method,
`EventTarget::IsNode()` and use it for the check.

If trying to convert `EventTarget` to a concrete class, it may require two
virtual method calls.  I'm not sure whether it's cheaper than a QI, but at
least, it won't depend on the UUID check order of `QueryInterface()` when
multiple interfaces are implemented.

Differential Revision: https://phabricator.services.mozilla.com/D129781
2021-11-02 13:03:43 +00:00
alwu 28430fb0d3 Bug 1733902 - part1 : create a new sync attribute on top-level browsing context for whether we should delay media from starting, and use it to replace the old attribute on outer windows. r=nika,emilio
Brief recap:
Before we have blocking autoplay, we had a feature which will delay media from start if the tab hasn't been visited by users, in order to prevent an unvisited background tab suddenly play sounds, which is annoying and might be unexpected to users.

In this patch:
The attribute we use to check whether we need to delay media is on the outer window, which is not Fission compatible if the top level window and its child windows are on the different process.

If the top level window has been visited, then all its child window should follow the same result. Therefore, we need to move the attribute to the browsing context in order to sync it across different windows.

Differential Revision: https://phabricator.services.mozilla.com/D128126
2021-11-01 22:26:40 +00:00
Olli Pettay d0c5eae6ca Bug 1583110, freeze/thaw in a separate step, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D129701
2021-11-01 14:43:31 +00:00
tanju brunostar 3eaed4ffa9 Bug 1724473 - Added an if statement at the bailout, enabling it to only work when the url starts with an alphanumeric. r=mak Bonardo <mbonardo@mozilla.com>
ran eslint to correct an error

compressed the if statements into 1 if using &&

wrote a test in the test_URIFixup_info.js file

fixed the test

Differential Revision: https://phabricator.services.mozilla.com/D129634
2021-11-01 13:15:15 +00:00
Kagami Sascha Rosylight eb885f2262 Bug 1736563 - Part 1: Use uint32_t for bfcache status flags r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D129013
2021-10-28 22:19:59 +00:00
Sean Feng 5283aecc5d Bug 1468476 - Make soft reload only force validates top level document r=necko-reviewers,nika,dragana,asuth
Currently, soft reload uses the `VALIDATE_ALWAYS` flag to not only
force revalidate the top level document, but also subresources.
This causes content to be refetched from the web even if there
are caches that are still valid and can be used.

Chrome already has such behaviour to not revalidate all resources.

Differential Revision: https://phabricator.services.mozilla.com/D122270
2021-10-28 16:11:56 +00:00
Hannah Peuckmann 09b6c3a033 Bug 1567443 - Added flag for indicating secure Chrome UI in nsIAboutModule. r=pbz,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D128188
2021-10-26 13:32:31 +00:00
Riya ac2ad7e7f2 Bug 1737032 - Removed traces of "remote XUL". r=Gijs,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D129255
2021-10-25 11:00:47 +00:00
Cristian Tuns 0b4f04d43f Backed out changeset 177e6f28d348 (bug 1567443) for causing mochitest failures on browser_check_identity_state.js. CLOSED TREE 2021-10-25 06:45:43 -04:00
Hannah Peuckmann 06382f1212 Bug 1567443 - Using nsIAboutModule flag instead of regex to indicate secure about page. r=pbz,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D128188
2021-10-25 09:34:06 +00:00
Butkovits Atila 47821a8f76 Backed out 11 changesets (bug 1731982, bug 1736401) for causing crashes in mozilla::dom::ClientHandle::Control. a=backout
Backed out changeset 83176c86784c (bug 1736401)
Backed out changeset 4826707af5b3 (bug 1731982)
Backed out changeset a748e43fada0 (bug 1731982)
Backed out changeset 49302f7705a4 (bug 1731982)
Backed out changeset 59a5860fd74d (bug 1731982)
Backed out changeset 1f7ec5f62c7c (bug 1731982)
Backed out changeset 3142414872de (bug 1731982)
Backed out changeset 363ae2df245d (bug 1731982)
Backed out changeset ae319f8182ac (bug 1731982)
Backed out changeset 23edbfc8e84a (bug 1731982)
Backed out changeset 5f35364352f0 (bug 1731982)
2021-10-19 22:23:12 +03:00
Emilio Cobos Álvarez 4b713033ac Bug 1736141 - Make Document::PreferredColorScheme safe to call off-main-thread. r=mstange
Document::GetBrowsingContext uses a WeakPtr<nsIDocShell> so we can't do
that. But we have all the other media emulation data and so on in the
pres context which we can access off the main thread for style, so move the
override code there.

Differential Revision: https://phabricator.services.mozilla.com/D128673
2021-10-19 09:00:42 +00:00
Tim Huang 2116f04511 Bug 1731982 - Part 3: Use partitioned principal for creating initial client source if needed in nsDocShell. r=asuth
Currently, we are using the regular principal and inherited regular
principal to create clientSource in nsDocShell. This patch makes the
nsDocshell to use the partitioned principal if needed.

Differential Revision: https://phabricator.services.mozilla.com/D127629
2021-10-19 06:33:07 +00:00
Gerald Squelart df50ece611 Bug 1735697 - Remove profiler_can_accept_markers(), use profiler_thread_is_being_profiled() instead - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D128577
2021-10-18 23:11:30 +00:00
Cosmin Sabou 36aa22c7ea Merge autoland to mozilla-central. a=merge 2021-10-19 00:44:04 +03:00
Cosmin Sabou 49f2f21930 Backed out 10 changesets (bug 1731982) for causing OS X performance test failures and crashes (Bug 1736436). a=backout DONTBUILD
Backed out changeset 48e6f591f699 (bug 1731982)
Backed out changeset 77907884b2fa (bug 1731982)
Backed out changeset a299a2d43ebe (bug 1731982)
Backed out changeset 005801e7cf91 (bug 1731982)
Backed out changeset ef71b02c40cc (bug 1731982)
Backed out changeset a52dd02f2b3f (bug 1731982)
Backed out changeset 50b14ef1eb4a (bug 1731982)
Backed out changeset 80641bdceb6a (bug 1731982)
Backed out changeset ada9e2008ca4 (bug 1731982)
Backed out changeset a208016e9953 (bug 1731982)
2021-10-18 22:18:08 +03:00
Sean Feng 3416efe3f7 Bug 1735945 - Split unload into unload and beforeunload for BFCACHE_COMBO telemetry probe r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D128625
2021-10-18 17:31:28 +00:00
Tim Huang 737306d9f1 Bug 1731982 - Part 3: Use partitioned principal for creating initial client source if needed in nsDocShell. r=asuth
Currently, we are using the regular principal and inherited regular
principal to create clientSource in nsDocShell. This patch makes the
nsDocshell to use the partitioned principal if needed.

Differential Revision: https://phabricator.services.mozilla.com/D127629
2021-10-18 12:20:32 +00:00
Cristian Tuns dd44cdf4ef Backed out 10 changesets (bug 1731982) for causing hybrid bustages on nsCORSListenerProxy.obj CLOSED TREE
Backed out changeset a248413c22ec (bug 1731982)
Backed out changeset 1bd7de5d93a1 (bug 1731982)
Backed out changeset d028e1ce1313 (bug 1731982)
Backed out changeset 7db7537bbc24 (bug 1731982)
Backed out changeset 28c18d83906d (bug 1731982)
Backed out changeset 6258b4e10406 (bug 1731982)
Backed out changeset 68bf86b1459c (bug 1731982)
Backed out changeset b8990af2fca2 (bug 1731982)
Backed out changeset 153783261021 (bug 1731982)
Backed out changeset bc9c3abbb8f8 (bug 1731982)
2021-10-15 18:12:21 -04:00
Tim Huang 491d40776f Bug 1731982 - Part 3: Use partitioned principal for creating initial client source if needed in nsDocShell. r=asuth
Currently, we are using the regular principal and inherited regular
principal to create clientSource in nsDocShell. This patch makes the
nsDocshell to use the partitioned principal if needed.

Differential Revision: https://phabricator.services.mozilla.com/D127629
2021-10-15 20:00:02 +00:00
Olli Pettay 78a73d7f93 Bug 1733067 - Update SHEntrySharedParentState::mExpired when loading a page, r=peterv
The main part of the patch is to get the state to
CanonicalBrowsingContext::SessionHistoryCommit.
The old code does similar thing in
https://searchfox.org/mozilla-central/rev/d37daf2f82ed22b6a2a5cbbb975423825dfd69fa/docshell/base/nsDocShell.cpp#11630-11638

This is not fixing the issue with session store where the flag is lost.
Also, I think SessionHistoryEntry should probably store a timestamp and not just a flag, but that
would change the behavior more vs. the old implementation.

Differential Revision: https://phabricator.services.mozilla.com/D128313
2021-10-13 14:42:56 +00:00
Cristian Tuns d3df74e295 Backed out 9 changesets (bug 1731982) for causing wpt failures on localStorage. CLOSED TREE
Backed out changeset bbeba8b14a2f (bug 1731982)
Backed out changeset 645cc214c608 (bug 1731982)
Backed out changeset 3a8e2f9c15e8 (bug 1731982)
Backed out changeset 208dd7c57311 (bug 1731982)
Backed out changeset 76a13a728f13 (bug 1731982)
Backed out changeset a6bfce877a86 (bug 1731982)
Backed out changeset 5fc4e33a8232 (bug 1731982)
Backed out changeset 353e3b3e020a (bug 1731982)
Backed out changeset b07167090923 (bug 1731982)
2021-10-13 10:47:25 -04:00
Tim Huang a2a5b1944c Bug 1731982 - Part 3: Use partitioned principal for creating initial client source if needed in nsDocShell. r=asuth
Currently, we are using the regular principal and inherited regular
principal to create clientSource in nsDocShell. This patch makes the
nsDocshell to use the partitioned principal if needed.

Differential Revision: https://phabricator.services.mozilla.com/D127629
2021-10-13 11:18:53 +00:00
Noemi Erli cb0b4097d6 Backed out 9 changesets (bug 1731982) for causing Bp-hybrid bustages CLOSED TREE
Backed out changeset 82bb76c2e531 (bug 1731982)
Backed out changeset 8240ef0e1771 (bug 1731982)
Backed out changeset f46f05792c6a (bug 1731982)
Backed out changeset 449c821bc56e (bug 1731982)
Backed out changeset cb813505b5a9 (bug 1731982)
Backed out changeset 06fad8cd9345 (bug 1731982)
Backed out changeset 4b8cf4756686 (bug 1731982)
Backed out changeset 5468bf77f732 (bug 1731982)
Backed out changeset 7800585e3d6a (bug 1731982)
2021-10-12 23:12:19 +03:00
Tim Huang 7075341260 Bug 1731982 - Part 3: Use partitioned principal for creating initial client source if needed in nsDocShell. r=asuth
Currently, we are using the regular principal and inherited regular
principal to create clientSource in nsDocShell. This patch makes the
nsDocshell to use the partitioned principal if needed.

Differential Revision: https://phabricator.services.mozilla.com/D127629
2021-10-12 18:55:19 +00:00
Emilio Cobos Álvarez 37660aa996 Bug 1730503 - Make anonymous scrollbar caching work on mac by default, and unify scrollbars.css across platforms. r=mstange,desktop-theme-reviewers,dao
We make it work on macOS by setting pointer-events: none + opacity: 0 rather
than visibility: hidden, and tweaking the caching setup to be Android-like.

Now that the scrollbars sheet is the same across platforms, move it to where
the rest of the UA sheets are. This way we guarantee that the RDM vs. Android
difference is less (just the ifdef at the top of the sheet).

Depends on D128084

Differential Revision: https://phabricator.services.mozilla.com/D128085
2021-10-12 09:21:18 +00:00
Emilio Cobos Álvarez 4f8856c545 Bug 1730503 - Make RDM force Android-style scrollbars better. r=mstange,devtools-backward-compat-reviewers,nchevobbe
There are a few bits that still don't work with this patch but will with the
following patches.

Differential Revision: https://phabricator.services.mozilla.com/D128083
2021-10-12 09:21:17 +00:00
Karl Tomlinson e91d1ff3ec Bug 1732410 wait for focus before proceeding for enumerateDevices() Promises r=jib,nika
https://github.com/w3c/mediacapture-main/pull/574

Focus on browser chrome widgets is accepted provided the tab is fully active
and foreground.
https://github.com/w3c/mediacapture-main/issues/752#issuecomment-742036800

Differential Revision: https://phabricator.services.mozilla.com/D127051
2021-10-11 20:44:39 +00:00
Johann Hofmann 479107443c Bug 1644914 - Give out user interactions to session history entries when system principal initiates a load. r=smaug
This is a pretty cheap way of fixing this bug by saying nsDocShell::loadURI calls
done with a system principal will add user interaction to the current page. This takes
advantage of the fact that all UI code for loading URIs goes through this code path.

Note that during debugging I've found other cases where SH entries would be added with
a system principal, most notably when navigating to URL hashes/fragments (example.com#hash).
I'm not sure why this is happening but it doesn't go through nsDocShell::loadURI.

Differential Revision: https://phabricator.services.mozilla.com/D127558
2021-10-11 16:51:01 +00:00
Nika Layzell 951525ada7 Bug 1732911 - Hold a PendingDiscard during BrowsingContext::Detach in parent, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D127483
2021-10-04 21:04:05 +00:00
Peter Van der Beken 0cb68caed4 Bug 1729662 - UNED exam page flickers / reloads infinitely. r=smaug
When we navigate in history to the same entry that we're current at then we
actually do a reload. The problem is in the way we detect whether to do a reload
in the parent process.

If a page does a back and a forward one after the other in a script, then the
parent will calculate the index for the back and tell the child to load the
entry at that index. While the child is processing the load of that entry, the
BC in the parent process still has the same entry as its active entry (until the
child commits the load of the entry over IPC). The parent then processes the
forward, calculates the index for the forward and finds the entry at that index.
This is the same entry that we were at before doing anything, and so the same
entry as the active entry in the BC in the parent process. We used to compare
the entry that we're going to load with the active entry in the BC to determine
whether we're doing a reload, and so in this situation we would assume the
forward navigation was actually doing a reload. The child would reload the page,
and we'd run the script again and we'd end up in a reload loop.

Comparing the offset with 0 to determine whether we're doing a reload fixes this
issue.

Differential Revision: https://phabricator.services.mozilla.com/D126585
2021-10-04 15:01:30 +00:00
Edgar Chen 1e75e43ecc Bug 1733052 - Part 2: Revise popup abuse level if there is a valid transient user activation; r=smaug
This is a intermediate solution to make popup block could work with new user
activation model (timer base). I think this should cover most of async case for
`window.open()`. For long term, we still need to clean up the popup state which
is tracked by bug 1656444.

Differential Revision: https://phabricator.services.mozilla.com/D126879
2021-10-04 09:17:18 +00:00
Alexandru Michis bb8b740837 Backed out changeset d25df1c9e0e2 (bug 1729662) for causing wpt failures in overlapping-navigations-and-traversals
CLOSED TREE
2021-09-30 14:31:50 +03:00
Peter Van der Beken a57818d127 Bug 1729662 - UNED exam page flickers / reloads infinitely. r=smaug
When we navigate in history to the same entry that we're current at then we
actually do a reload. The problem is in the way we detect whether to do a reload
in the parent process.

If a page does a back and a forward one after the other in a script, then the
parent will calculate the index for the back and tell the child to load the
entry at that index. While the child is processing the load of that entry, the
BC in the parent process still has the same entry as its active entry (until the
child commits the load of the entry over IPC). The parent then processes the
forward, calculates the index for the forward and finds the entry at that index.
This is the same entry that we were at before doing anything, and so the same
entry as the active entry in the BC in the parent process. We used to compare
the entry that we're going to load with the active entry in the BC to determine
whether we're doing a reload, and so in this situation we would assume the
forward navigation was actually doing a reload. The child would reload the page,
and we'd run the script again and we'd end up in a reload loop.

Comparing the offset with 0 to determine whether we're doing a reload fixes this
issue.

Differential Revision: https://phabricator.services.mozilla.com/D126585
2021-09-30 07:56:52 +00:00
Nika Layzell 33a743b9b9 Bug 1731792 - Don't switch processes for BFCached same-origin navigations, r=smaug
This is a much simplified patch compared to the earlier changes, and
aims to be less risky and avoid whatever issues are being caused by the
process selection changes in the earlier patches. Unfortunately, I think
this patch may reduce the ability for a noopener window to be given a
distinct process, so I would prefer a more complete fix in the future.

This new patch also no longer has a fix for bug 1728331, so that will
need to be fixed separately.

Differential Revision: https://phabricator.services.mozilla.com/D126951
2021-09-29 19:53:01 +00:00
Olli Pettay 0ca720d7a3 Bug 1725680, requested index should be used only by the nsSHistory (and related code in CanonicalBrowsingContext), r=peterv
Using requestedIndex on the child side is hard, because there are race conditions when a session history load is triggered
and at the same time a non-session history load commits a new active entry.

Differential Revision: https://phabricator.services.mozilla.com/D126619
2021-09-29 13:22:34 +00:00
Olli Pettay 524e95c9e4 Bug 1732250, use the original URI from the old channel when updating session history entry, r=peterv,necko-reviewers,valentin
https://searchfox.org/mozilla-central/rev/1df999af9999ccb436512cfece57a68d94d36e08/netwerk/protocol/http/nsHttpChannel.cpp#2876
makes original uri handling in the channel rather magical. The value of it on the new channel is bogus during
AsyncOnChannelRedirect call, and nsIChannel.idl doesn't hint about that behavior.

browser_getNavigationHistory.js can work as a testcase once it is enabled for Fission.

Differential Revision: https://phabricator.services.mozilla.com/D126735
2021-09-29 09:35:59 +00:00
Iulian Moraru 1bffda0bc3 Backed out changeset a399e91dd5c2 (bug 1729662) for causing wpt failures on cross-document-traversal-cross-document-traversal.html. 2021-09-28 19:14:02 +03:00
Peter Van der Beken ef6256101a Bug 1729662 - UNED exam page flickers / reloads infinitely. r=smaug
When we navigate in history to the same entry that we're current at then we
actually do a reload. The problem is in the way we detect whether to do a reload
in the parent process.

If a page does a back and a forward one after the other in a script, then the
parent will calculate the index for the back and tell the child to load the
entry at that index. While the child is processing the load of that entry, the
BC in the parent process still has the same entry as its active entry (until the
child commits the load of the entry over IPC). The parent then processes the
forward, calculates the index for the forward and finds the entry at that index.
This is the same entry that we were at before doing anything, and so the same
entry as the active entry in the BC in the parent process. We used to compare
the entry that we're going to load with the active entry in the BC to determine
whether we're doing a reload, and so in this situation we would assume the
forward navigation was actually doing a reload. The child would reload the page,
and we'd run the script again and we'd end up in a reload loop.

Comparing the offset with 0 to determine whether we're doing a reload fixes this
issue.

Differential Revision: https://phabricator.services.mozilla.com/D126585
2021-09-28 13:25:15 +00:00
criss 9d7155125b Backed out 2 changesets (bug 1731792) for causing devtools failures on browser_console_error_source_click.js
Backed out changeset 567d4eb7bc83 (bug 1731792)
Backed out changeset db57b8568ae9 (bug 1731792)
2021-09-28 06:15:28 +03:00
Nika Layzell 2793bb97a7 Bug 1731792 - Part 1: Avoid cycling between processes when navigating within a tab, r=smaug
This patch replaces the previous process selection infrastructure with a
new setup implemented entirely in C++, which should more accurately
track the set of processes in use, and should encourage re-use of the
existing content process when navigating by not counting the current
tab.

This approach intentionally allows for process switching to another
process during navigation if there is uneven load between processes to
encourage balanced process use.

I think this may also fix some of the session restore issues with many
tabs using the same process, rather than being spread over 4, as we now
track a tab earlier in its lifecycle before the BrowserParent instance
is created.

Differential Revision: https://phabricator.services.mozilla.com/D126405
2021-09-27 22:34:20 +00:00
Butkovits Atila 24d8b4f45f Backed out 2 changesets (bug 1731792) for causing mochitest failures.
Backed out changeset 44c28a29bbd8 (bug 1731792)
Backed out changeset 51bdb1d4baab (bug 1731792)
2021-09-27 18:54:29 +03:00
Nika Layzell e1a2352d73 Bug 1731792 - Part 1: Avoid cycling between processes when navigating within a tab, r=smaug
This patch replaces the previous process selection infrastructure with a
new setup implemented entirely in C++, which should more accurately
track the set of processes in use, and should encourage re-use of the
existing content process when navigating by not counting the current
tab.

This approach intentionally allows for process switching to another
process during navigation if there is uneven load between processes to
encourage balanced process use.

I think this may also fix some of the session restore issues with many
tabs using the same process, rather than being spread over 4, as we now
track a tab earlier in its lifecycle before the BrowserParent instance
is created.

Differential Revision: https://phabricator.services.mozilla.com/D126405
2021-09-27 13:49:32 +00:00
Nika Layzell 66064a20e9 Bug 1725572 - Part 2: Keep BrowsingContext alive until every process has acknowledged the discard, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D125897
2021-09-23 18:54:31 +00:00
owlishDeveloper 800e6ffa5d Bug 1697866 - Add HTTPS-only specific error code and pass it to GeckoView, to handle HTTPS-only specific errors correctly r=agi,JulianWels,nika,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D120914
2021-09-23 01:41:47 +00:00
Noemi Erli 50d4e6c878 Backed out changeset 890d147bad1d (bug 1697866) for causing bustages in WindowGlobalParent.cpp CLOSED TREE 2021-09-23 01:20:43 +03:00
owlishDeveloper 7acebc65af Bug 1697866 - Add HTTPS-only specific error code and pass it to GeckoView, to handle HTTPS-only specific errors correctly r=agi,JulianWels,nika,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D120914
2021-09-22 18:30:39 +00:00
Olli Pettay f083f381d8 Bug 1727514 - media playback should stop in the bfcache, r=peterv
This version doesn't change SetContainer handling, since it seems to be tricky for the top level page.
So only activity change notification is fired and IsActive() is updated.
The comment about IsActive() was wrong even with the old bfcache implementation.
(I did check that it returned false when the page was in bfcache and many of the activity observers rely on that)

The changes to HTMLMediaElement are needed to ensure page can enter bfcache..

Differential Revision: https://phabricator.services.mozilla.com/D124684
2021-09-20 08:49:22 +00:00
Olli Pettay b9336991af Bug 1730977 - Check the existence of requests before calling Stop(), r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D125752
2021-09-17 14:18:20 +00:00
Sandor Molnar 7398f479b5 Merge autoland to mozilla-central. a=merge 2021-09-16 18:58:41 +03:00
Sandor Molnar c60bc752d8 Backed out changeset 2d49d73f38aa (bug 1727514) for causing frequent crashes. a=backout 2021-09-16 15:52:56 +03:00
Valentin Gosu 72c414923b Bug 1730494 - Add error codes for COOP and COEP errors r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D125671
2021-09-16 08:31:04 +00:00
Nika Layzell 0c06ba67db Bug 1729458 - Part 2: Make process switches take fewer trips through the event loop, r=smaug
The biggest change in this patch is around the PrepareToChangeRemoteness
promise. It is changed to directly interact with the DOM promise rather than
wrapping it into a MozPromise (which requires another trip through the event
loop), and tries to avoid waiting on the promise at all if it was immediately
resolved (which should always be the case with SHIP enabled, except for in a
single test).

Differential Revision: https://phabricator.services.mozilla.com/D124800
2021-09-14 15:02:58 +00:00
Sandor Molnar 5f8d191513 Backed out 3 changesets (bug 1729458) for causing multiple dt failures. CLOSED TREE
Backed out changeset 16b385e15fad (bug 1729458)
Backed out changeset 72b7a9c7bf30 (bug 1729458)
Backed out changeset 704dd03288b1 (bug 1729458)
2021-09-13 21:08:44 +03:00
Nika Layzell edec406a72 Bug 1729458 - Part 2: Make process switches take fewer trips through the event loop, r=smaug
The biggest change in this patch is around the PrepareToChangeRemoteness
promise. It is changed to directly interact with the DOM promise rather than
wrapping it into a MozPromise (which requires another trip through the event
loop), and tries to avoid waiting on the promise at all if it was immediately
resolved (which should always be the case with SHIP enabled, except for in a
single test).

Differential Revision: https://phabricator.services.mozilla.com/D124800
2021-09-13 15:23:32 +00:00
Olli Pettay d0485c8a55 Bug 1727514 - media playback should stop in the bfcache, r=peterv
SetContainer handling is similar to what DocumentViewer does for the old bfcache implementation.
(The old implementation hides it quite well).
The changes to HTMLMediaElement are needed to ensure page can enter bfcache.

Removed erroneous MOZ_ASSERT in nsPresContext, it is ok to trigger that code path in the new implementation.
And the Run() method of the relevant nsIRunnable already deals with that case.

Differential Revision: https://phabricator.services.mozilla.com/D124684
2021-09-13 12:40:18 +00:00
Peter Van der Beken 42d3aca4dc Bug 1728413 - mistik.xtr.jp doesn't load. r=smaug
Getting all the requests from the loadgroup every time a request
is added or removed was causing performance issues. It turns out
that it wasn't really needed for determining if a page should be
blocked from the BFCache, since we just need to know if there
are any requests in the loadgroup, and if so, if all it contains
is just one request with an id. We can keep a count of relevant
requests in the loadgroup. When the count changes to 1, on adding
we can inspect the request that's being added, and on removal we
can inspect the requests in the loadgroup (which should be now be
cheap enough, since there's only 1 relevant request in the list).

Differential Revision: https://phabricator.services.mozilla.com/D125251
2021-09-13 12:35:31 +00:00
Benjamin Peterson 9253af4014 Bug 1729843 - Remove vestigial plugin-related code from nsWebNavigationInfo. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D125026
2021-09-09 15:03:05 +00:00
Alexandru Michis 957058da9c Backed out 2 changesets (bug 1729458) for causing leaks in ClientManagerService.
CLOSED TREE

Backed out changeset 42b3a9930fe0 (bug 1729458)
Backed out changeset b8db01010657 (bug 1729458)
2021-09-08 21:32:20 +03:00
Nika Layzell 336e7e2365 Bug 1729458 - Part 2: Make process switches take fewer trips through the event loop, r=smaug
The biggest change in this patch is around the PrepareToChangeRemoteness
promise. It is changed to directly interact with the DOM promise rather than
wrapping it into a MozPromise (which requires another trip through the event
loop), and tries to avoid waiting on the promise at all if it was immediately
resolved (which should always be the case with SHIP enabled, except for in a
single test).

Differential Revision: https://phabricator.services.mozilla.com/D124800
2021-09-08 17:06:16 +00:00
Florian Quèze 998adb18ea Bug 1728760 - require all nsITimerCallback native implementations to also implement nsINamed, r=smaug.
Differential Revision: https://phabricator.services.mozilla.com/D124349
2021-09-07 08:01:18 +00:00
Nika Layzell 8bd29055b8 Bug 1725572 - Wait for parent ack when discarding BC from child, r=kmag
I am not confident that this will fix the underlying issue causing this crash,
but given how small of a change it is, I figure it's worth trying to land
quickly to see if the crash rate drops with it.

Differential Revision: https://phabricator.services.mozilla.com/D124503
2021-09-03 22:21:49 +00:00
Nika Layzell c525c65ff8 Bug 1722880 - Part 1: Add IsInBFCache to WindowContext, and make it non-SHIP compatible, r=smaug,necko-reviewers,dragana
This field will be useful to JS code such as JSWindowActors which need to be
able to detect when their WindowContext is no longer active.

Differential Revision: https://phabricator.services.mozilla.com/D124098
2021-09-03 15:26:13 +00:00
Nika Layzell 4b55141036 Bug 1728605 - Part 3: Rename IsFrame to IsSubframe, r=smaug
This makes the method's name more consistent with IsContentSubframe, and is
probably more clear than IsFrame (as a <browser> could be considered a frame).

Depends on D124211

Differential Revision: https://phabricator.services.mozilla.com/D124212
2021-09-02 14:15:04 +00:00
Nika Layzell b40ab34831 Bug 1728605 - Part 2: Rename misleading {Window,Browsing}Context::IsCached, r=smaug
This method actually tracks whether the context is current, so it has been
renamed, and the behaviour has been inverted.

Depends on D124210

Differential Revision: https://phabricator.services.mozilla.com/D124211
2021-09-02 14:15:04 +00:00
Nika Layzell b123cca8a7 Bug 1728605 - Part 1: Add assertions to various non-SHIP codepaths, r=smaug
These codepaths will never be taken with SHIP enabled, and this patch adds a
couple assertions to keep track of that information for when we rip out SHIP.

Differential Revision: https://phabricator.services.mozilla.com/D124210
2021-09-02 14:15:03 +00:00
Timothy Nikkel 6e65573ea5 Bug 1728665. Use IsRootContentDocumentCrossProcess for a few places dealing with visual scroll offsets. r=botond
Visual scroll offsets can only differ on the cross process root content document.

Differential Revision: https://phabricator.services.mozilla.com/D124257
2021-09-01 23:25:44 +00:00
Nika Layzell c38d0d1762 Bug 1726865 - Prefer using existing content processes for subframes during process selection, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D123661
2021-08-26 16:57:27 +00:00
Nika Layzell d47f4a615c Bug 1725572 - Avoid process-switching to a dead process, r=kmag
After some investigation, I was able to find a theoretical codepath
which could lead to the "missing initial frame browsing context" error:

1. Two iframes are created for the same origin, and begin process
   switching.
2. The first iframe finishes process switching, but for some reason
   (e.g. being in shutdown) the call to `LaunchSubprocessResolve`
   errors.
3. The second callback is called and also calls LaunchSubprocessResolve,
   which this time returns `true` due to it previously having been
   called.
4. The BrowserParent is created in the new content process despite
   `InitInternal()` never having been finished, and therefore the
   ContentParent never becoming subscribed to the BrowsingContextGroup.

To fix this, I made 2 changes:

1. Abort from process switching if the target process which we're going
   to be creating a BrowserParent in `IsDead()`, and
2. Track the return value from `LaunchSubprocessResolve`, so we return
   `false` if it is called a second time after a failed content process
   launch.

I'm not confident that this is the cause of the crashes, as I was unable
to reproduce the issue.

Differential Revision: https://phabricator.services.mozilla.com/D123548
2021-08-25 17:54:10 +00:00
Daisuke Akatsuka 0f36be0da7 Bug 1664814: Stop to use regex that identifies string that is uri like. r=adw,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D122818
2021-08-24 10:39:24 +00:00
Daisuke Akatsuka b92a37cc10 Bug 1726305: Avoid throwing NS_ERROR_FAILURE when referring to the host in nsIURI. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D123176
2021-08-23 01:58:16 +00:00
Andi-Bogdan Postelnicu 250fa0d795 Bug 1725145 - header files fixes in the hybrid build env. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D122343
2021-08-22 10:21:55 +00:00
André Bargull d2bbf86876 Bug 1726123 - Part 5: Add missing "js/" includes outside of SM. r=arai
In preparation for the next part, add missing includes to "js/" public headers.

Differential Revision: https://phabricator.services.mozilla.com/D122843
2021-08-17 15:45:39 +00:00
Peter Van der Beken 1d099d0913 Bug 1706347 - Check mOOPChildrenLoading when deciding to put page in BFCache with Fission enabled. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D117199
2021-08-16 09:08:33 +00:00
Mike Conley cc5a65967c Bug 1725489 - Add loadType flags to nsITopLevelNavigationDelegate.shouldNavigate. r=smaug
This will, for example, make it possible to behave differently for a normal navigation,
a reload navigation, a history navigation, and a pushstate navigation.

Differential Revision: https://phabricator.services.mozilla.com/D122532
2021-08-13 13:59:28 +00:00
Cosmin Sabou 87e906e19d Backed out changeset 94d021b67f6f (bug 1716594) for causing Bug 1725458. CLOSED TREE 2021-08-13 13:52:09 +03:00
Sebastian Hengst 536ae6da1a Merge mozilla-central to autoland. CLOSED TREE 2021-08-13 11:38:25 +02:00
Sebastian Hengst 30cca9cb15 Backed out changeset f912045db98d (bug 1706347) for causing content crashes (bug 1725558). a=backout DONTBUILD 2021-08-13 11:19:42 +02:00
Henri Sivonen b0b0f15d1e Bug 1690169 test. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D104801
2021-08-13 08:11:25 +00:00
Olli Pettay 1ce4cb16f5 Bug 1716594, clear the requested index after replacing an entry, r=peterv
Looks like the code below does similar thing already for iframes, so this is adding InternalSetRequestedIndex
call only for the top level case.
This is based on the same assumptions as bug 1697905, but unfortunately testing this is still
super hard.

Differential Revision: https://phabricator.services.mozilla.com/D122355
2021-08-12 14:19:16 +00:00
Peter Van der Beken f78596c95a Bug 1706347 - Check mOOPChildrenLoading when deciding to put page in BFCache with Fission enabled. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D117199
2021-08-12 14:11:29 +00:00
Mike Conley 6b8e200b0e Bug 1724748 - Add nsITopLevelNavigationDelegate to allow JSWindowActorChilds to allow/deny top-level navigations. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D122138
2021-08-11 20:17:19 +00:00
Edgar Chen 61b3f2657e Bug 1724905 - Remove native only updateURLAndHistory in nsIDocShell; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D122211
2021-08-10 22:15:09 +00:00
Nika Layzell aa9b1db7d6 Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.

The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
   for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
   state such as the current remoteType when possible. This makes reasoning
   about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
   ensure that if an existing document in the same BCG is found, the load will
   finish in the required content process. This should make dynamic checks such
   as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
   easier to log just the information related to process selection when
   debugging.
5. Null result principal precursors are considered when performing process
   selection.

Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D120673
2021-08-10 14:31:17 +00:00
Nika Layzell a50cefe2cf Bug 1650089 - Part 1: Add a remoteTypeOverride option for about:blank loads triggered by chrome, r=annyG,kmag
After the changes in this bug, about:blank loads triggered by chrome will
finish in a "web" content process, as they have an untrusted null principal
without a precursor. In a few places throughout the codebase, however, we
perform about:blank loads with the explicit expectation that they do not change
processes. This new remoteTypeOverride option allows the intended final process
to be explicitly specified in this situation.

For security & simplicity reasons, this new attribute is limited to only be
usable on system-principal triggered loads of about:blank in toplevel browsing
contexts.

Differential Revision: https://phabricator.services.mozilla.com/D120671
2021-08-10 14:31:16 +00:00
Butkovits Atila 22fb2b6793 Backed out 8 changesets (bug 1650089) for causing Xpcshell failures on test_ext_redirects.js. CLOSED TREE
Backed out changeset ee763318d378 (bug 1650089)
Backed out changeset 24d7898ec4bd (bug 1650089)
Backed out changeset bcdd2f5c9840 (bug 1650089)
Backed out changeset 24a5bd7f97dd (bug 1650089)
Backed out changeset 1b8b4e939e82 (bug 1650089)
Backed out changeset a7a4f37a5d72 (bug 1650089)
Backed out changeset 78c012d4b071 (bug 1650089)
Backed out changeset e870508c1ddc (bug 1650089)
2021-08-06 04:35:52 +03:00
Nika Layzell 58c1037005 Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.

The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
   for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
   state such as the current remoteType when possible. This makes reasoning
   about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
   ensure that if an existing document in the same BCG is found, the load will
   finish in the required content process. This should make dynamic checks such
   as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
   easier to log just the information related to process selection when
   debugging.
5. Null result principal precursors are considered when performing process
   selection.

Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D120673
2021-08-06 00:10:57 +00:00
Nika Layzell 649f35f3a0 Bug 1650089 - Part 1: Add a remoteTypeOverride option for about:blank loads triggered by chrome, r=annyG,kmag
After the changes in this bug, about:blank loads triggered by chrome will
finish in a "web" content process, as they have an untrusted null principal
without a precursor. In a few places throughout the codebase, however, we
perform about:blank loads with the explicit expectation that they do not change
processes. This new remoteTypeOverride option allows the intended final process
to be explicitly specified in this situation.

For security & simplicity reasons, this new attribute is limited to only be
usable on system-principal triggered loads of about:blank in toplevel browsing
contexts.

Differential Revision: https://phabricator.services.mozilla.com/D120671
2021-08-06 00:10:56 +00:00
Anny Gakhokidze 51157f7065 Bug 1704001 - Add a comment explaining HasLoadedNonInitialDocument for BrowsingContext.h, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D121910
2021-08-05 22:54:33 +00:00
Kashav Madan 6f9ccaf7d9 Bug 1722485 - Only flush session storage if we have SessionStore.jsm, r=nika
This is a browser-only module, and loading it for storage flushes causes errors
in GeckoView.

Differential Revision: https://phabricator.services.mozilla.com/D121776
2021-08-05 19:33:04 +00:00
Alexandru Michis 4b49a0dc50 Merge autoland to mozilla-central. a=merge 2021-08-04 12:35:44 +03:00
Alexandru Michis 5ca72bfc53 Backed out 7 changesets (bug 1650089) for causing xpcshell failures in test_ext_cookieBehaviors.js
Backed out changeset 336d6eb2fc15 (bug 1650089)
Backed out changeset 283ba29cdbeb (bug 1650089)
Backed out changeset c470e4c65117 (bug 1650089)
Backed out changeset 8fc2f428694d (bug 1650089)
Backed out changeset 37e5185dae14 (bug 1650089)
Backed out changeset a26afdc56d91 (bug 1650089)
Backed out changeset 32e207558b3d (bug 1650089)
2021-08-04 12:32:07 +03:00
alwu 1c18fb5f4d Bug 1719183 - part1 : use a count to generalize the usage of preventing page from being suspended. r=nika
To support more cases, change this value to more general name and use a count instead, if the count is larger than zero, then we would not suspend the page.

In addition, this value now can be set in any processes (but still for the top level only), which is different from before where we would only set the value from the chrome process.

Differential Revision: https://phabricator.services.mozilla.com/D119837
2021-08-03 21:32:26 +00:00
Nika Layzell e0fc657cb6 Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.

The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
   for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
   state such as the current remoteType when possible. This makes reasoning
   about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
   ensure that if an existing document in the same BCG is found, the load will
   finish in the required content process. This should make dynamic checks such
   as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
   easier to log just the information related to process selection when
   debugging.
5. Null result principal precursors are considered when performing process
   selection.

Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D120673
2021-08-03 18:17:54 +00:00
Nika Layzell 3d749ece7f Bug 1650089 - Part 1: Add a remoteTypeOverride option for about:blank loads triggered by chrome, r=annyG,kmag
After the changes in this bug, about:blank loads triggered by chrome will
finish in a "web" content process, as they have an untrusted null principal
without a precursor. In a few places throughout the codebase, however, we
perform about:blank loads with the explicit expectation that they do not change
processes. This new remoteTypeOverride option allows the intended final process
to be explicitly specified in this situation.

For security & simplicity reasons, this new attribute is limited to only be
usable on system-principal triggered loads of about:blank in toplevel browsing
contexts.

Differential Revision: https://phabricator.services.mozilla.com/D120671
2021-08-03 18:17:54 +00:00
Noemi Erli 6cd9318b66 Backed out 7 changesets (bug 1650089) foe causing bustages in ProcessIsolation.cpp
Backed out changeset 4e73beb8872c (bug 1650089)
Backed out changeset 092451e931ce (bug 1650089)
Backed out changeset ca9ba60010c6 (bug 1650089)
Backed out changeset ee61b69ba556 (bug 1650089)
Backed out changeset 091c4efa36a7 (bug 1650089)
Backed out changeset dbdee40ef8a0 (bug 1650089)
Backed out changeset 54d12a4333a0 (bug 1650089)
2021-08-03 20:15:54 +03:00
Nika Layzell 35dca5bd20 Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.

The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
   for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
   state such as the current remoteType when possible. This makes reasoning
   about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
   ensure that if an existing document in the same BCG is found, the load will
   finish in the required content process. This should make dynamic checks such
   as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
   easier to log just the information related to process selection when
   debugging.
5. Null result principal precursors are considered when performing process
   selection.

Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D120673
2021-08-03 15:39:34 +00:00
Nika Layzell 78129583eb Bug 1650089 - Part 1: Add a remoteTypeOverride option for about:blank loads triggered by chrome, r=annyG,kmag
After the changes in this bug, about:blank loads triggered by chrome will
finish in a "web" content process, as they have an untrusted null principal
without a precursor. In a few places throughout the codebase, however, we
perform about:blank loads with the explicit expectation that they do not change
processes. This new remoteTypeOverride option allows the intended final process
to be explicitly specified in this situation.

For security & simplicity reasons, this new attribute is limited to only be
usable on system-principal triggered loads of about:blank in toplevel browsing
contexts.

Differential Revision: https://phabricator.services.mozilla.com/D120671
2021-08-03 15:39:33 +00:00
Kashav Madan f090aabc96 Bug 1718761 - Move {Start,Stop}ApzAutoscroll to CanonicalBrowsingContext, r=Gijs,hiro
This accomplishes 2 things:

1. Allows us to directly fetch the layersId of the process that is
   autoscrolling, which avoids having to fetch it in AutoScrollChild and pass it
   around. This fixes autoscrolling out-of-process frames with Fission enabled.
2. Makes it easier to handle autoscrolling of in-process documents, since that
   can't happen through PBrowser.

Differential Revision: https://phabricator.services.mozilla.com/D120766
2021-07-31 01:39:09 +00:00
Sandor Molnar ca94997814 Backed out changeset 4593c3d66951 (bug 1718761) for causing clang build bustages. CLOSED TREE 2021-07-31 03:44:56 +03:00
Kashav Madan c84c4eb9d7 Bug 1718761 - Move {Start,Stop}ApzAutoscroll to CanonicalBrowsingContext, r=Gijs,hiro
This accomplishes 2 things:

1. Allows us to directly fetch the layersId of the process that is
   autoscrolling, which avoids having to fetch it in AutoScrollChild and pass it
   around. This fixes autoscrolling out-of-process frames with Fission enabled.
2. Makes it easier to handle autoscrolling of in-process documents, since that
   can't happen through PBrowser.

Differential Revision: https://phabricator.services.mozilla.com/D120766
2021-07-30 23:39:32 +00:00
Dorel Luca f8c23e7e7f Backed out 5 changesets (bug 1650089) for Browser-chrome failures in browser/components/originattributes/test/browser/browser_firstPartyIsolation_aboutPages.js. CLOSED TREE
Backed out changeset 26ddad079ad3 (bug 1650089)
Backed out changeset 5ae2b2641484 (bug 1650089)
Backed out changeset c5d267a1907c (bug 1650089)
Backed out changeset d9eeca699dec (bug 1650089)
Backed out changeset 8bb303f6831a (bug 1650089)
2021-07-29 05:53:31 +03:00
Ted Campbell e47122deae Bug 1722803 - Always initialize TimelineConsumers at startup. r=nika
Instead of initializing on first use - which can race with workers - do the
initialization in nsLayoutStatics::Initialize(). Also make `sInShutdown` an
Atomic since it is accessed without locks.

Differential Revision: https://phabricator.services.mozilla.com/D121143
2021-07-29 01:53:31 +00:00
Nika Layzell 3072efd270 Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.

The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
   for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
   state such as the current remoteType when possible. This makes reasoning
   about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
   ensure that if an existing document in the same BCG is found, the load will
   finish in the required content process. This should make dynamic checks such
   as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
   easier to log just the information related to process selection when
   debugging.
5. Null result principal precursors are considered when performing process
   selection.

Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D120673
2021-07-29 01:40:20 +00:00
Nika Layzell d1a6052ca7 Bug 1650089 - Part 1: Add a remoteTypeOverride option for about:blank loads triggered by chrome, r=annyG,kmag
After the changes in this bug, about:blank loads triggered by chrome will
finish in a "web" content process, as they have an untrusted null principal
without a precursor. In a few places throughout the codebase, however, we
perform about:blank loads with the explicit expectation that they do not change
processes. This new remoteTypeOverride option allows the intended final process
to be explicitly specified in this situation.

For security & simplicity reasons, this new attribute is limited to only be
usable on system-principal triggered loads of about:blank in toplevel browsing
contexts.

Differential Revision: https://phabricator.services.mozilla.com/D120671
2021-07-29 01:40:19 +00:00
Hiroyuki Ikezoe a5ecf77776 Bug 1695806 - Defer sending a snapshot reqeust for remote process iframe until cloning the iframe document finished. r=mattwoodrow,nika
Differential Revision: https://phabricator.services.mozilla.com/D119950
2021-07-27 00:47:44 +00:00
Kris Maglione 3ee95f8b32 Bug 1716849: Add crash annotation for error when aborting for failed module import. r=mccr8
There are a number of modules that we import from C++ and can't continue
running without. We have a number of crashes for some of those failed loads. A
lot of them are from OOMs or corruption, but we're not sure about the rest.

This patch adds a crash annotation with the details of the error wherever we
abort for failing to load a module.

Differential Revision: https://phabricator.services.mozilla.com/D120290
2021-07-22 16:58:02 +00:00
Butkovits Atila f1369e39ea Backed out changeset ef812b3d914d (bug 1716849) for causing assertion failures at nsImportModule.cpp. CLOSED TREE 2021-07-22 06:49:23 +03:00
Kris Maglione f69238e72d Bug 1716849: Add crash annotation for error when aborting for failed module import. r=mccr8
There are a number of modules that we import from C++ and can't continue
running without. We have a number of crashes for some of those failed loads. A
lot of them are from OOMs or corruption, but we're not sure about the rest.

This patch adds a crash annotation with the details of the error wherever we
abort for failing to load a module.

Differential Revision: https://phabricator.services.mozilla.com/D120290
2021-07-22 01:28:22 +00:00
Manuel Bucher 3918a58a02 Bug 1721459 - Remove nsIDeprecationWarner r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D120474
2021-07-21 15:19:15 +00:00
Emilio Cobos Álvarez a5e65da4cb Bug 1714614 - Send visited query results only to interested processes. r=mak,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D117179
2021-07-21 12:23:33 +00:00
Alexandre Poirot a4ab941009 Bug 1720304 - Implement WebProgress.browsingContext r=nika
This helps knowing which particular BrowsingContext is navigating.

Differential Revision: https://phabricator.services.mozilla.com/D119647
2021-07-19 08:28:19 +00:00
Florian Quèze ca7bbcc752 Bug 1720374 - Remove MOZ_GECKO_PROFILER ifdefs that are not useful, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119810
2021-07-15 22:04:23 +00:00
Nika Layzell fdaf413fa3 Bug 1586830 - Part 1: Ensure IsInitialDocument is set earlier and consistently on WindowGlobalParent, r=smaug
This makes sure to clear and set the value more consistently when replacing
documents within a WindowGlobal, and makes sure to include the relevant flag in
the initializer.

In addition, the place where the flag is set is moved ahead to happen before
the call to `Embed` so that the information is ready before the window is
created.

Differential Revision: https://phabricator.services.mozilla.com/D119815
2021-07-14 15:51:20 +00:00
Nika Layzell e89956fbff Bug 1719184 - Transmit blob URLs more accurately when loading, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D119539
2021-07-12 20:56:04 +00:00
Anny Gakhokidze 1620a4511a Bug 1646532 - Move mAreDialogsEnabled, mLastDialogQuitTime and mDialogAbuseCount to BC group, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D119299
2021-07-12 17:53:53 +00:00
Gijs Kruitbosch 8c639aaff3 Bug 1719442 - stop doing alternate fixup for 'http' or 'https' strings as host names, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D119391
2021-07-09 12:49:54 +00:00
Olli Pettay f2c39ef580 Bug 1719178 - properly disconnect nsSHistory from the owner object, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D119114
2021-07-08 11:08:19 +00:00
Olli Pettay d35325594f Bug 1717765, tweak the check when creating a new content viewer shouldn't succeed, r=peterv
The patch is based on the assumption that the assertion fails because of
https://searchfox.org/mozilla-central/rev/1c5c3f4ec274462b92cf5bd82235ae3a56c508e9/dom/base/nsGlobalWindowInner.cpp#2775

Differential Revision: https://phabricator.services.mozilla.com/D119233
2021-07-07 16:55:23 +00:00
Edgar Chen 47e66cd7d9 Bug 1716762 - Don't allow focus to move to remote iframe which is display: none; r=emilio
Make it behave the same as in-process iframe.

Differential Revision: https://phabricator.services.mozilla.com/D118002
2021-07-07 12:08:18 +00:00
Emilio Cobos Álvarez a5f4c42f89 Bug 1717983 - Improve PresShell active flag handling. r=nika
This moves the logic of whether a pres shell should be active to a
single place to make it sane to reason about, and fixes the
subdocument propagation when a BrowserChild becomes visible.

Differential Revision: https://phabricator.services.mozilla.com/D118703
2021-07-05 17:31:48 +00:00
Andreas Farre d9f3a1519c Bug 1701303 - Move counting of private browsing contexts to parent process. r=smaug,johannh
Move the counting of private browsing contexts to the parent
process. Also change to only consider non-chrome browsing contexts
when counting private contexts. The latter is possible due to bug
1528115, because we no longer need to support hidden private windows.

With counting in the parent process we can make sure that when we're
changing remoteness on a private browsing context the private browsing
context count never drops to zero. This fixes an issue with Fission,
where we remoteness changes could transiently have a zero private
browsing context count, that would be mistaken for the last private
browsing context going away.

Changing to only count non-chrome browsing contexts makes us only fire
'last-pb-context-exited' once, and since we count them in the parent
there is no missing information about contexts that makes us wait for
a content process about telling us about insertion or removal of
browsing contexts.

Differential Revision: https://phabricator.services.mozilla.com/D118182
2021-07-05 15:17:55 +00:00
Marian-Vasile Laza 17d6e262f7 Backed out changeset 55f827545de2 (bug 1701303) for causing bustages on ContentParent.cpp. CLOSED TREE 2021-07-05 17:12:13 +03:00
Andreas Farre b3cd1ccf21 Bug 1701303 - Move counting of private browsing contexts to parent process. r=smaug,johannh
Move the counting of private browsing contexts to the parent
process. Also change to only consider non-chrome browsing contexts
when counting private contexts. The latter is possible due to bug
1528115, because we no longer need to support hidden private windows.

With counting in the parent process we can make sure that when we're
changing remoteness on a private browsing context the private browsing
context count never drops to zero. This fixes an issue with Fission,
where we remoteness changes could transiently have a zero private
browsing context count, that would be mistaken for the last private
browsing context going away.

Changing to only count non-chrome browsing contexts makes us only fire
'last-pb-context-exited' once, and since we count them in the parent
there is no missing information about contexts that makes us wait for
a content process about telling us about insertion or removal of
browsing contexts.

Differential Revision: https://phabricator.services.mozilla.com/D118182
2021-07-05 13:16:49 +00:00
Marian-Vasile Laza 47a2086ba6 Backed out changeset 4854ff4fff72 (bug 1701303) for causing bustages on nsDocShell.cpp. CLOSED TREE 2021-07-05 14:21:48 +03:00
Andreas Farre 56b9a33c06 Bug 1701303 - Move counting of private browsing contexts to parent process. r=smaug,johannh
Move the counting of private browsing contexts to the parent
process. Also change to only consider non-chrome browsing contexts
when counting private contexts. The latter is possible due to bug
1528115, because we no longer need to support hidden private windows.

With counting in the parent process we can make sure that when we're
changing remoteness on a private browsing context the private browsing
context count never drops to zero. This fixes an issue with Fission,
where we remoteness changes could transiently have a zero private
browsing context count, that would be mistaken for the last private
browsing context going away.

Changing to only count non-chrome browsing contexts makes us only fire
'last-pb-context-exited' once, and since we count them in the parent
there is no missing information about contexts that makes us wait for
a content process about telling us about insertion or removal of
browsing contexts.

Differential Revision: https://phabricator.services.mozilla.com/D118182
2021-07-05 09:30:53 +00:00
Masayuki Nakano 63d372da2f Bug 1676702 - part 2: Make `TextControlState` initialize `TextEditor` with `PasswordMaskData` r=m_kato
During a `TextControlState` alive, `PasswordMaskData` should be alive too.
Otherwise, we cannot keep unmasked range at reframing.

Depends on D118756

Differential Revision: https://phabricator.services.mozilla.com/D118757
2021-06-28 04:37:54 +00:00
Kashav Madan 0d34540a2e Bug 1703692 - Use ChildOffset to build the offset path for flushes, r=nika
We can't rely on the Children list since it may have been cleared on shutdown.
Since we don't clear parent edges, walking the parent chain and using
mChildOffset works.

Differential Revision: https://phabricator.services.mozilla.com/D118384
2021-06-26 20:25:29 +00:00
Kashav Madan 2b70b9d821 Bug 1703692 - Store the latest embedder's permanent key on CanonicalBrowsingContext, r=nika,mccr8
And include it in Session Store flushes to avoid dropping updates in case the
browser is unavailable.

Differential Revision: https://phabricator.services.mozilla.com/D118385
2021-06-26 20:25:29 +00:00
Dorel Luca 40fe0b4056 Backed out 3 changesets (bug 1703692) for Browser-chrome failures in browser/components/sessionstore/test/browser_broadcast.js. CLOSED TREE
Backed out changeset fe5703d7b580 (bug 1703692)
Backed out changeset eec4a4138ca7 (bug 1703692)
Backed out changeset 6745b363a745 (bug 1703692)
2021-06-26 10:09:23 +03:00
Kashav Madan 748ca3f0ed Bug 1703692 - Use ChildOffset to build the offset path for flushes, r=nika
We can't rely on the Children list since it may have been cleared on shutdown.
Since we don't clear parent edges, walking the parent chain and using
mChildOffset works.

Differential Revision: https://phabricator.services.mozilla.com/D118384
2021-06-26 05:49:12 +00:00
Kashav Madan e6788be168 Bug 1703692 - Store the latest embedder's permanent key on CanonicalBrowsingContext, r=nika,mccr8
And include it in Session Store flushes to avoid dropping updates in case the
browser is unavailable.

Differential Revision: https://phabricator.services.mozilla.com/D118385
2021-06-26 05:49:12 +00:00
Sandor Molnar d5946f0a7e Backed out changeset b46a490223a1 (bug 1717983) for causing android failures. CLOSED TREE 2021-06-25 03:29:08 +03:00
Iulian Moraru 7a2e51ed62 Backed out 3 changesets (bug 1703692) for causing bc failures on multiple files.
Backed out changeset a199dfd8ce8d (bug 1703692)
Backed out changeset 599a0a99ded9 (bug 1703692)
Backed out changeset 14fe807e6be4 (bug 1703692)
2021-06-25 00:43:23 +03:00
Emilio Cobos Álvarez 72c62d51c7 Bug 1717983 - Improve PresShell active flag handling. r=nika
This moves the logic of whether a pres shell should be active to a
single place to make it sane to reason about, and fixes the
subdocument propagation when a BrowserChild becomes visible.

Differential Revision: https://phabricator.services.mozilla.com/D118703
2021-06-24 20:50:10 +00:00
Kashav Madan 7c9cce86f8 Bug 1703692 - Use ChildOffset to build the offset path for flushes, r=nika
We can't rely on the Children list since it may have been cleared on shutdown.
Since we don't clear parent edges, walking the parent chain and using
mChildOffset works.

Differential Revision: https://phabricator.services.mozilla.com/D118384
2021-06-24 20:26:14 +00:00
Kashav Madan c75e110512 Bug 1703692 - Store the latest embedder's permanent key on CanonicalBrowsingContext, r=nika,mccr8
And include it in Session Store flushes to avoid dropping updates in case the
browser is unavailable.

Differential Revision: https://phabricator.services.mozilla.com/D118385
2021-06-24 20:26:13 +00:00
Kris Maglione e477097b53 Bug 1709466: Don't prepare for process change when already discarded. r=nika
If a <browser> is removed in the middle of a process change, the previous
DocShell may be torn down while it's still expecting a process change. There's
really nothing more to do in that case, though, so we can just skip the
PrepareForProcessChange call rather than asserting.

Differential Revision: https://phabricator.services.mozilla.com/D118514
2021-06-22 17:42:35 +00:00
Hubert Boma Manilla f573018cb6 Bug 1716964 - Expose defaultLoadFlags on the BrowsingContext for use by the devtools r=ochameau,nika
Differential Revision: https://phabricator.services.mozilla.com/D118152
2021-06-21 16:05:08 +00:00
Henri Sivonen 7df7939f77 Bug 1713627 - Remove code obsoleted by the replacing the Text Encoding menu with one item. r=jaws,emk
Differential Revision: https://phabricator.services.mozilla.com/D116391
2021-06-21 12:09:01 +00:00
Peter Van der Beken 71e7900a51 Bug 1711544 - Move decision about name resetting to the parent process if we're replacing the BC for BFCache in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116759
2021-06-21 10:31:36 +00:00
Dorel Luca 2118316ba4 Backed out changeset 4891a17c55e2 (bug 1713627) for Browser-chrome failures in docshell/test/browser/browser_bug673087-1.js. CLOSED TREE 2021-06-21 12:10:54 +03:00
Henri Sivonen abbbf94915 Bug 1713627 - Remove code obsoleted by the replacing the Text Encoding menu with one item. r=jaws,emk
Differential Revision: https://phabricator.services.mozilla.com/D116391
2021-06-21 08:09:43 +00:00
Andi-Bogdan Postelnicu f07c975367 Bug 1519636 - Reformat recent changes to the Google coding style. r=necko-reviewers,emilio
Updated with clang-format version 12.0.0 (taskcluster-FZRqPXamQIOU_i4hF0cAcg)

Differential Revision: https://phabricator.services.mozilla.com/D117905
2021-06-17 11:00:22 +00:00
Kashav Madan cb6768b9ef Bug 1716444 - Don't do final tab state flush for replaced contexts, r=farre,annyG
If we're destroying the frame loader of a replaced browsing context we'll end up
firing browser-shutdown-tabstate-updated for a tab that wasn't actually closed.

This results in us cleaning up Session Store state earlier than expected, which
means we drop future updates to SessionStoreInternal._closedTabs.

Fixes browser_sessionHistory.js, browser_async_remove_tab.js, and possibly
browser_491168.js for SHIP+BFCache.

Differential Revision: https://phabricator.services.mozilla.com/D117944
2021-06-16 14:05:53 +00:00
Olli Pettay e74620fbda Bug 1688712, when replacing a LoadingSessionHistoryInfo, initialize member variables using values from the old object, r=annyG
Differential Revision: https://phabricator.services.mozilla.com/D117362
2021-06-16 10:31:56 +00:00
Kashav Madan 577616f5ab Bug 1701337 - Respect browser.sessionstore.debug.no_auto_updates in native flushers, r=nika
We should not be doing any timed flushes if the pref is set to true.

See https://searchfox.org/mozilla-central/rev/d97dca5907e2a0a77a2435b24ef980268cd3c4fe/browser/components/sessionstore/ContentSessionStore.jsm#402
for how the pref is used in non-SHIP code.

Fixes browser_async_window_flushing.js, which relies on us not sending automatic
updates.

Differential Revision: https://phabricator.services.mozilla.com/D117953
2021-06-16 00:37:53 +00:00
Olli Pettay 0d3cc17e7f Bug 1697905, requestedIndex may not always be cleared, r=peterv
The previous version was trying to make index handling too generic.
But history loads need to update index to the requested index, not to the index of the current entry,
because the requested index was already passed to the child process when the
history load started. If there are several pending history loads, commit of the first one
will update the index based on requested index and send new index to the child.
When child side receives the index update, other pending history loads have been already
processed.

New loads can just clear the requested index, since the child side has
PendingSHistoryChange object to update the effective index and length to the
correct one and when parent side sends back the current index and length the
relevant PendingSHistoryChange object is removed.

With this version both
testing/web-platform/tests/old-tests/submission/Microsoft/history/history_000.htm
and
docshell/test/navigation/browser_test_simultaneous_normal_and_history_loads.js
pass now even on a debug build.


I think there might be a case for the issue happening also without SHIP, but
since it is way less asynchronous, triggering that issue is hard.
So the patch and test are for SHIP only.

Differential Revision: https://phabricator.services.mozilla.com/D116744
2021-06-15 16:21:07 +00:00
Yaron Tausky 768366d7b8 Bug 1496997 - Remove dom.serviceWorkers.parent_intercept pref r=asuth,dom-workers-and-storage-reviewers,perftest-reviewers,jgraham,sparky,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D101788
2021-06-15 08:52:39 +00:00
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
Tim Huang e2b6812898 Bug 1706616 - Part 1: Add telemetry probe for query stripping. r=dimi,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D117006
2021-06-14 19:45:39 +00:00
Emilio Cobos Álvarez 9db2aa0440 Bug 1699837 - Make sure that remote iframes honor print settings. r=mattwoodrow
This fixes it since we honor the print resolution properly now.

Differential Revision: https://phabricator.services.mozilla.com/D115263
2021-06-13 09:16:53 +00:00
Dana Keeler ef0a88c6f2 Bug 1715142 - introduce nsIPublicKeyPinningService and remove 'type' parameter from nsISiteSecurityService r=rmf,necko-reviewers
The public key pinning implementation is much less complex than the HSTS
implementation, and only needs a small subset of the parameters of the latter.
Furthermore, the information it relies on is static, and so is safe to access
from content processes. This patch separates the two implementations, thus
simplifying both of them and avoiding some unnecessary IPC calls in the
process.

Differential Revision: https://phabricator.services.mozilla.com/D117096
2021-06-12 01:12:25 +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
Butkovits Atila e4394b27a2 Backed out 3 changesets (bug 1715142) for causing build bustages. CLOSED TREE
Backed out changeset 7e67994f6a65 (bug 1715142)
Backed out changeset f58d5156f332 (bug 1715142)
Backed out changeset f8a7bd4519c6 (bug 1715142)
2021-06-11 21:20:02 +03:00
Dana Keeler f84faf1bf5 Bug 1715142 - introduce nsIPublicKeyPinningService and remove 'type' parameter from nsISiteSecurityService r=rmf,necko-reviewers
The public key pinning implementation is much less complex than the HSTS
implementation, and only needs a small subset of the parameters of the latter.
Furthermore, the information it relies on is static, and so is safe to access
from content processes. This patch separates the two implementations, thus
simplifying both of them and avoiding some unnecessary IPC calls in the
process.

Differential Revision: https://phabricator.services.mozilla.com/D117096
2021-06-11 17:58:19 +00:00
Dorel Luca 71abb3ab93 Backed out changeset 43a82597dade (bug 1699837) for Crashtest in layout/printing/crashtests/1671503.html. CLOSED TREE 2021-06-11 19:48:10 +03:00
Dorel Luca 8720353dbf Backed out changeset 1968ba484b6f (bug 1697905) on dev's request 2021-06-11 18:04:51 +03:00
Emilio Cobos Álvarez 7af763acbe Bug 1699837 - Make sure that remote iframes honor print settings. r=mattwoodrow
This fixes it since we honor the print resolution properly now.

Differential Revision: https://phabricator.services.mozilla.com/D115263
2021-06-11 13:07:55 +00:00
Marian-Vasile Laza 610b0ee572 Backed out 2 changesets (bug 1706616) for causing failures in browser_urlQueryStringStripping_telemetry.js
CLOSED TREE

Backed out changeset 7979a6bdcdae (bug 1706616)
Backed out changeset 0d901239cc7a (bug 1706616)
2021-06-11 11:22:51 +03:00
Tim Huang eb7947462a Bug 1706616 - Part 1: Add telemetry probe for query stripping. r=dimi,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D117006
2021-06-11 07:28:15 +00:00
Masayuki Nakano db1228b24c Bug 1714918 - Sort out editor class accessors of `nsIEditor` r=m_kato
For consistency with the similar internal DOM API, `As*()` should just cast
the type without checking editor type.  Instead, `GetAs*()` should do it.

Differential Revision: https://phabricator.services.mozilla.com/D117381
2021-06-11 03:01:08 +00:00
Iulian Moraru 955a3ab572 Backed out 2 changesets (bug 1715142) for causing marionette failures on test_navigation.py and mochitest failures on browser_setIgnoreCertificateErrors.js. CLOSED TREE
Backed out changeset 83206685ca0b (bug 1715142)
Backed out changeset ab3060a5f69e (bug 1715142)
2021-06-11 02:45:34 +03:00
Dana Keeler f3c620e4c3 Bug 1715142 - introduce nsIPublicKeyPinningService and remove 'type' parameter from nsISiteSecurityService r=rmf,necko-reviewers
The public key pinning implementation is much less complex than the HSTS
implementation, and only needs a small subset of the parameters of the latter.
Furthermore, the information it relies on is static, and so is safe to access
from content processes. This patch separates the two implementations, thus
simplifying both of them and avoiding some unnecessary IPC calls in the
process.

Differential Revision: https://phabricator.services.mozilla.com/D117096
2021-06-10 22:13:32 +00:00
Olli Pettay 9cb0429aa3 Bug 1715865 - Make BrowsingContext skippable, r=nika,mccr8
One could optimize out MarkWrapperLive call if stored that wrapper is already live etc, but
in practice that shouldn't matter too much.

Differential Revision: https://phabricator.services.mozilla.com/D117456
2021-06-10 19:54:45 +00:00
Alexandru Michis 9c0300eebd Backed out changeset 1e76e5ecdfbe (bug 1714614) for causing gtest and gv-junit failures.
CLOSED TREE
2021-06-10 17:35:20 +03:00
Emilio Cobos Álvarez d883d39471 Bug 1714614 - Send visited query results only to interested processes. r=mak,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D117179
2021-06-10 12:21:42 +00:00
Marian-Vasile Laza 984c14aa1c Backed out 2 changesets (bug 1706616) for causing bc failures in browser_urlQueryStringStripping_telemetry.js
CLOSED TREE

Backed out changeset 443f5f8fe809 (bug 1706616)
Backed out changeset 8446bda339b7 (bug 1706616)
2021-06-10 14:37:09 +03:00
Tim Huang 497011260e Bug 1706616 - Part 1: Add telemetry probe for query stripping. r=dimi,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D117006
2021-06-10 08:20:27 +00:00
Nika Layzell 1aaeb179e2 Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117103
2021-06-09 04:56:48 +00:00
Yaron Tausky daf975567c Bug 1496997 - Remove ServiceWorkerParentInterceptEnabled() and callers r=asuth,dom-workers-and-storage-reviewers,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D101785
2021-06-08 21:02:55 +00:00