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

7079 Коммитов

Автор SHA1 Сообщение Дата
Nika Layzell 136a1ffa7a Bug 1636279 - Part 1: Streamline WindowContext initialization, r=farre
This should make the flow of how data gets into the initial WindowContext state
more clear, and allows the setting of initial synced WindowContext fields.

Differential Revision: https://phabricator.services.mozilla.com/D74324
2020-05-08 20:44:12 +00:00
Nika Layzell 2b70befb83 Bug 1636186 - Remove unnecessary CookieJarSettingsArgs data from WindowContext, r=timhuang
The entire CookieJarSettingsArgs is currently being synced into every content
process, when only two fields of that structure are actually needed.

Those two fields are extracted from the CookieJarSettingsArgs and synchronized
separately to avoid leaking information such as principals into every content
process.

Differential Revision: https://phabricator.services.mozilla.com/D74258
2020-05-08 20:10:56 +00:00
Kashav Madan 2a30c1ebe6 Bug 1585496 - Add a crashtest for bug 1584467, r=nika
Crashes without 25bc8db24a5a, as expected.

Differential Revision: https://phabricator.services.mozilla.com/D74444
2020-05-08 18:39:28 +00:00
Brindusan Cristian dbbdb12921 Backed out changeset ef394674c1b8 (bug 1636186) for bustages at WindowContext.h. CLOSED TREE 2020-05-08 21:42:46 +03:00
Nika Layzell 6995af532e Bug 1636186 - Remove unnecessary CookieJarSettingsArgs data from WindowContext, r=timhuang
The entire CookieJarSettingsArgs is currently being synced into every content
process, when only two fields of that structure are actually needed.

Those two fields are extracted from the CookieJarSettingsArgs and synchronized
separately to avoid leaking information such as principals into every content
process.

Differential Revision: https://phabricator.services.mozilla.com/D74258
2020-05-08 18:05:11 +00:00
Csoregi Natalia cd28d94be1 Backed out changeset 59a45d8c0fbb (bug 1635365) for browser-chrome failures on browser_bug902156.js. CLOSED TREE 2020-05-08 19:09:20 +03:00
Christoph Kerschbaumer 1470386f05 Bug 1635365: Move field mixed content IsSecure from BrowsingContext to WindowContext. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D74269
2020-05-08 14:05:18 +00:00
Dan Glastonbury 7699520bf5 Bug 1624550 - P4: Cleanup APIs for setting BrowsingContext::UseGlobalHistory. r=farre
This value is determined in Parent process and passed down to nsDocShell. Delete
the messages to pass the setting down and set it on the BrowsingContext in the
Parent process.

Refactor the code that determines to opt-out of using global history. Code
inspection determines that windowless browsing contexts want to opt-out as well
as any frame with `disableglobalhistory` attribute set on it.

Differential Revision: https://phabricator.services.mozilla.com/D72279
2020-05-08 03:28:44 +00:00
Dan Glastonbury 39c9e7dd94 Bug 1624550 - P3: Update Global History from DocumentLoadListener in Parent process. r=mak,farre,mattwoodrow
Avoid round-trip Parent->Content->Parent to add visited URI to browsing history.

Differential Revision: https://phabricator.services.mozilla.com/D72278
2020-05-08 03:28:42 +00:00
Dan Glastonbury e46c2905db Bug 1624550 - P2: Extract AddURIVisit internals into a helper. r=mak,farre
For use by both nsDocShell and DocumentLoadListener.

Differential Revision: https://phabricator.services.mozilla.com/D72277
2020-05-08 03:28:40 +00:00
Dan Glastonbury 63cf313ca2 Bug 1624550 - P1: Move nsDocShell::mUseGlobalHistory to BrowsingContext. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D72276
2020-05-08 03:28:38 +00:00
Nika Layzell 6cb771c699 Bug 1633820 - Part 4: Remove OriginAttributes from TabContext, r=kmag
This information is now redundant with 'BrowsingContext', meaning that it can be
omitted from the 'TabContext'.

Differential Revision: https://phabricator.services.mozilla.com/D72934
2020-05-07 22:18:54 +00:00
Nika Layzell 2454ade94e Bug 1633820 - Part 3: Get rid of PBrowserOrId, r=mattwoodrow,necko-reviewers,dragana
The 'Id' variant was only used with b2g for remote `mozbrowser`s, and is no
longer relevant. The new code instead uses `PBrowser` directly in all cases.

Differential Revision: https://phabricator.services.mozilla.com/D72933
2020-05-07 22:49:06 +00:00
Nika Layzell 3a74776a51 Bug 1633820 - Part 1: Assert Coherent Load Context, r=mattwoodrow
This patch asserts in various places that our LoadContext value on
BrowsingContext is consistent. This is done in order to get better diagnostics
for crashes such as those in bug 1629527.

Differential Revision: https://phabricator.services.mozilla.com/D72931
2020-05-07 22:18:46 +00:00
Matt Woodrow ab7bcd098f Bug 1570243 - Make WindowContext CanSet functions check if the WindowContext is owned by the setting process, not the BrowsingContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D73997
2020-05-08 01:38:02 +00:00
Matt Woodrow 3799bf96ea Bug 1635600 - Don't recreate null principal for windows created by a new window global child actor. r=nika
Depends on D73995

Differential Revision: https://phabricator.services.mozilla.com/D73996
2020-05-07 08:26:35 +00:00
Razvan Maries 7a5b66f9b6 Backed out 5 changesets (bug 1633820) for build bustages at TabContext.cpp. CLOSED TREE
Backed out changeset 0a20dd1935d7 (bug 1633820)
Backed out changeset 626e834293ed (bug 1633820)
Backed out changeset 14cc454a8cbc (bug 1633820)
Backed out changeset 7bbcb9266b87 (bug 1633820)
Backed out changeset ef99672bd2af (bug 1633820)
2020-05-08 00:59:20 +03:00
Nika Layzell d6a082e20a Bug 1633820 - Part 4: Remove OriginAttributes from TabContext, r=kmag
This information is now redundant with 'BrowsingContext', meaning that it can be
omitted from the 'TabContext'.

Differential Revision: https://phabricator.services.mozilla.com/D72934
2020-05-07 17:18:48 +00:00
Nika Layzell dd35cc6b02 Bug 1633820 - Part 3: Get rid of PBrowserOrId, r=mattwoodrow,necko-reviewers,dragana
The 'Id' variant was only used with b2g for remote `mozbrowser`s, and is no
longer relevant. The new code instead uses `PBrowser` directly in all cases.

Differential Revision: https://phabricator.services.mozilla.com/D72933
2020-05-07 17:45:12 +00:00
Nika Layzell d00159232f Bug 1633820 - Part 1: Assert Coherent Load Context, r=mattwoodrow
This patch asserts in various places that our LoadContext value on
BrowsingContext is consistent. This is done in order to get better diagnostics
for crashes such as those in bug 1629527.

Differential Revision: https://phabricator.services.mozilla.com/D72931
2020-05-07 17:18:42 +00:00
Dorel Luca bdddaad896 Backed out changeset 57d78ba110be (bug 1634650) for marionette failures in migration/tests/marionette/test_refresh_firefox.py. CLOSED TREE 2020-05-07 19:36:39 +03:00
Christoph Kerschbaumer 43baaddaab Bug 1632160: Remove GetAllowMixedContentAndConnectionData from nsIDocShell and expose similar functionality on BrowsingContext. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D72901
2020-05-07 07:22:17 +00:00
Marco Bonardo 410cff4774 Bug 1634650 - Add whitelisting of domain suffixes for URIFixup. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D74015
2020-05-07 08:42:10 +00:00
alwu 1e7981c8c4 Bug 1633830 - part3 : rename `PlaybackController` to `ContentPlaybackController`. r=bryce
This patch will do :
- rename `PlaybackController` to `ContentPlaybackController`

The advantage of doing so :
-  explicitly mention this class is only used in the content, to help its readbility

Differential Revision: https://phabricator.services.mozilla.com/D72939
2020-05-07 05:49:03 +00:00
alwu 15e309beba Bug 1633830 - part2 : rename `MediaActionHandler` to `ContentMediaActionHandler`. r=bryce
This patch will do :
- rename `MediaActionHandler` to `ContentMediaActionHandler`

The advantage of doing so :
-  explicitly mention this class is only used in the content, to help its readbility

Differential Revision: https://phabricator.services.mozilla.com/D72938
2020-05-05 00:04:55 +00:00
Dana Keeler e8ebc73d50 Bug 1630038 - remove HPKP entirely r=kjacobs,bbeurdouche
This removes processing of HTTP Public Key Pinning headers, remotely modifying
pinning information, and using cached pinning information, all of which was
already disabled in bug 1412438. Static pins that ship with the browser are
still enforced.

Differential Revision: https://phabricator.services.mozilla.com/D73352
2020-05-06 22:57:50 +00:00
David Teller 18a8fad225 Bug 1632794 - Bare bones about:processes;r=fluent-reviewers,florian,Pike
This is a very first iteration of about:processes, so that people who actually need the tool can start using it immediately and provide feedback.

Differential Revision: https://phabricator.services.mozilla.com/D72617
2020-05-06 20:11:55 +00:00
Marco Bonardo b66936c3e8 Bug 1623383 - Merge some conditions in URIFixup.jsm. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D73688
2020-05-06 15:40:18 +00:00
Marco Bonardo 7a00a2e24a Bug 1623383 - Cleanup URIFixup.jsm. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D73687
2020-05-06 15:37:43 +00:00
Bogdan Tara 7fce40912d Backed out 5 changesets (bug 1633820) for bustages complaining about TabContext CLOSED TREE
Backed out changeset 4982d41d5e6b (bug 1633820)
Backed out changeset 9803c41e42f9 (bug 1633820)
Backed out changeset 2475bbab03a8 (bug 1633820)
Backed out changeset 762f0b2c154c (bug 1633820)
Backed out changeset f9ea871a0227 (bug 1633820)
2020-05-06 22:39:46 +03:00
Nika Layzell e6c0899f5d Bug 1633820 - Part 4: Remove OriginAttributes from TabContext, r=kmag
This information is now redundant with 'BrowsingContext', meaning that it can be
omitted from the 'TabContext'.

Differential Revision: https://phabricator.services.mozilla.com/D72934
2020-05-06 17:41:02 +00:00
Nika Layzell da2aae6af5 Bug 1633820 - Part 3: Get rid of PBrowserOrId, r=mattwoodrow,necko-reviewers,dragana
The 'Id' variant was only used with b2g for remote `mozbrowser`s, and is no
longer relevant. The new code instead uses `PBrowser` directly in all cases.

Differential Revision: https://phabricator.services.mozilla.com/D72933
2020-05-06 17:42:41 +00:00
Nika Layzell 565baed820 Bug 1633820 - Part 1: Assert Coherent Load Context, r=mattwoodrow
This patch asserts in various places that our LoadContext value on
BrowsingContext is consistent. This is done in order to get better diagnostics
for crashes such as those in bug 1629527.

Differential Revision: https://phabricator.services.mozilla.com/D72931
2020-05-06 17:40:14 +00:00
Narcis Beleuzu 84754c6344 Backed out 2 changesets (bug 1632794) for build bustages on ChromeUtils.cpp . CLOSED TREE
Backed out changeset 28f67adaba65 (bug 1632794)
Backed out changeset e3c323874e2e (bug 1632794)
2020-05-06 14:12:54 +03:00
David Teller f3f5332bbc Bug 1632794 - Bare bones about:processes;r=fluent-reviewers,florian,Pike
This is a very first iteration of about:processes, so that people who actually need the tool can start using it immediately and provide feedback.

Differential Revision: https://phabricator.services.mozilla.com/D72617
2020-05-06 10:03:47 +00:00
Narcis Beleuzu cdf603f65b Backed out 2 changesets (bug 1632794) for build bustages on ChromeUtils.cpp . CLOSED TREE
Backed out changeset 846b78435f92 (bug 1632794)
Backed out changeset 937d7ef96c5d (bug 1632794)
2020-05-06 13:00:15 +03:00
David Teller 985b3f945a Bug 1632794 - Bare bones about:processes;r=fluent-reviewers,florian,Pike
This is a very first iteration of about:processes, so that people who actually need the tool can start using it immediately and provide feedback.

Differential Revision: https://phabricator.services.mozilla.com/D72617
2020-05-05 22:19:44 +00:00
Narcis Beleuzu d262ef72aa Backed out changeset 9da3ff68132f (bug 1632160) for bc failures on browser_bug1045809.js . CLOSED TREE 2020-05-06 12:12:59 +03:00
Christoph Kerschbaumer 3bf440d570 Bug 1632160: Remove GetAllowMixedContentAndConnectionData from nsIDocShell and expose similar functionality on BrowsingContext. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D72901
2020-05-06 07:15:40 +00:00
Ian Moody 011b59d595 Bug 1536556 - Replace raw thrown Cr.ERRORs with Components.Exception. r=mossop,remote-protocol-reviewers,marionette-reviewers,whimboo,necko-reviewers,geckoview-reviewers,valentin,agi
Raw Cr.ERROR don't get stack information, same as throwing JS literals instead
of `new Error()`s.

This was done automatically with a new eslint rule that will be introduced in
the next commit.  One instance of a raw Cr.ERROR was not replaced since it is
used in a test that specifically checks the preservation of raw Cr values in
XPCJS.  The rule will be disabled for that instance.

Differential Revision: https://phabricator.services.mozilla.com/D28073
2020-05-05 17:41:36 +00:00
Razvan Maries 0c308b94ae Backed out 2 changesets (bug 1632794) for build bustages on aboutProcesses.ftl. CLOSED TREE
Backed out changeset e616abcb192d (bug 1632794)
Backed out changeset 47701348412d (bug 1632794)
2020-05-05 19:21:24 +03:00
David Teller e6eea81b34 Bug 1632794 - Bare bones about:processes;r=fluent-reviewers,florian,Pike
This is a very first iteration of about:processes, so that people who actually need the tool can start using it immediately and provide feedback.

Differential Revision: https://phabricator.services.mozilla.com/D72617
2020-05-05 15:56:18 +00:00
Emilio Cobos Álvarez 761e9dfe4c Bug 1635094 - Cleanup the ReferrerInfo code. r=ckerschb
The cast in InitWithNode is wrong. AsElement() asserts instead of
checking the flag, so we always pass an element (and if we didn't we'd
have type confusion problems). I audited the callers and we're fine.

Anyhow, always require an element, and add two convenience constructors
for C++ code.

Differential Revision: https://phabricator.services.mozilla.com/D73636
2020-05-04 18:50:20 +00:00
Cosmin Sabou 71a40eae48 Backed out 2 changesets (bug 1635094) for build bustages on nsMacShellService.cpp. CLOSED TREE
Backed out changeset 0a2b0c6ea19a (bug 1635094)
Backed out changeset ead4f26f76ee (bug 1635094)
2020-05-04 20:04:06 +03:00
Emilio Cobos Álvarez 6dde680742 Bug 1635094 - Cleanup the ReferrerInfo code. r=ckerschb
The cast in InitWithNode is wrong. AsElement() asserts instead of
checking the flag, so we always pass an element (and if we didn't we'd
have type confusion problems). I audited the callers and we're fine.

Anyhow, always require an element, and add two convenience constructors
for C++ code.

Differential Revision: https://phabricator.services.mozilla.com/D73636
2020-05-04 16:26:51 +00:00
Jonathan Watt 4def60efaf Bug 1634370. Make `docshell/` buildable outside of `unified-build` environment. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D73255
2020-05-04 14:53:34 +00:00
Nika Layzell 573962fe33 Bug 1634764 - Add helpers for Top/Parent WindowContext, r=farre
There are various times when it would be useful to get the toplevel or parent
WindowContext from a window or browsing context. While this is already possible,
it's currently somewhat inconvenient.

Differential Revision: https://phabricator.services.mozilla.com/D73500
2020-05-04 14:26:34 +00:00
stundets 10f080ebe4 Bug 1629424 - remove useless return. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D73534
2020-05-04 11:00:00 +00:00
Christoph Kerschbaumer 3262e01355 Bug 1634270: Fix rebase error from Bug 1623565 affecting MixedContentBlocker. r=kamidphish
Differential Revision: https://phabricator.services.mozilla.com/D73196
2020-05-03 03:26:00 +00:00
Nika Layzell a0d1066c47 Bug 1633723 - Add CanonicalBrowsingContext::GetParentCrossChromeBoundary, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D73337
2020-04-30 19:48:04 +00:00
Matt Woodrow 3c9a252e29 Bug 1634339 - Don't crash if we didn't get passed an existing DOMNavigationTiming. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D73403
2020-05-01 02:36:33 +00:00
Emilio Cobos Álvarez 164acdc0b9 Bug 1634218 - Remove the zoom actors. r=nika
After the recent simplifications to the zoom code, they only take care
of forwarding the enlarge / decrease zoom messages.

We can do that via PBrowser instead, and get rid of the actors. We can
also remove ZoomChangeUsingMouseWheel. Zooming with the mouse wheel will
end up in a *ZoomChange event anyways, and the only consumer already
listened for them.

Differential Revision: https://phabricator.services.mozilla.com/D73175
2020-04-30 16:35:35 +00:00
Christoph Kerschbaumer 7a530a9a70 Bug 1634289: Add CanSet method for browsing context field IsSecure. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D73214
2020-04-30 09:56:25 +00:00
Emilio Cobos Álvarez e0c490b2cd Bug 1633488 - Fire zoom change events directly in the parent process instead of roundabouting through the child process. r=nika
This ensures that chrome code can always react to the state the browsing
context the parent process observes properly. It's also simpler.

We fix one test that was relying on the event being fired at the
browser. For the same reason as the previous patch in this bug, we can
use resize events instead.

Differential Revision: https://phabricator.services.mozilla.com/D72712
2020-04-30 01:21:20 +00:00
Emilio Cobos Álvarez 9a9ab94bc2 Bug 1578008 - Remove various hacks to restore resolution only after a full zoom change. r=bradwerth
This is no longer needed now that MVM doesn't restore the zoom.

Differential Revision: https://phabricator.services.mozilla.com/D72551
2020-04-30 01:21:26 +00:00
Dorel Luca 8e7e7136a3 Backed out 4 changesets (bug 1633938, bug 1578008, bug 1633488) for Devtool failures in browser/base/content/test/static/browser_parsable_css.js. CLOSED TREE
Backed out changeset e690c4cf8848 (bug 1633938)
Backed out changeset c999ecad3be8 (bug 1633488)
Backed out changeset abbc47ce1451 (bug 1578008)
Backed out changeset 9e6925ea790f (bug 1578008)
2020-04-30 04:13:42 +03:00
Gijs Kruitbosch 7073bb6903 Bug 1634075 - back out changeset 0aa77ee04caa (bug 1583696) over regressions with overly long non-wrapping prompt text and visual appearance with lightweight themes, r=MattN
Things that were broken:

- prompts become unreadable when using dark-background lwthemes, because they
  keep the window text-shadow (due to the namespace change of tabmodalprompt)
- prompts with long text without word-wrap possibilities
  (e.g. `alert("x".repeat(1000))`) cause the text to escape its container.

Differential Revision: https://phabricator.services.mozilla.com/D73131
2020-04-29 20:30:37 +00:00
Emilio Cobos Álvarez f071fe4b8e Bug 1633488 - Fire zoom change events directly in the parent process instead of roundabouting through the child process. r=nika
This ensures that chrome code can always react to the state the browsing
context the parent process observes properly. It's also simpler.

We fix one test that was relying on the event being fired at the
browser. For the same reason as the previous patch in this bug, we can
use resize events instead.

Differential Revision: https://phabricator.services.mozilla.com/D72712
2020-04-29 21:44:13 +00:00
Emilio Cobos Álvarez 0169492da2 Bug 1578008 - Remove various hacks to restore resolution only after a full zoom change. r=bradwerth
This is no longer needed now that MVM doesn't restore the zoom.

Differential Revision: https://phabricator.services.mozilla.com/D72551
2020-04-29 21:44:01 +00:00
Nika Layzell 5325da14b7 Bug 1633204 - Live WindowContexts should keep BrowsingContextGroup alive, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D72893
2020-04-29 18:49:10 +00:00
Dimi Lee f0e37815cd Bug 1612376 - P5. Remove HasStoragePermission from WindowContext r=timhuang,baku
We don't access HasStoragePermission across process, so we don't need to
store the permission in WindowContext.

After this patch, HasStoragePermission will only be stored in the
channel's LoadInfo, which is set when a channel is created in the parent
and it won't be updated.

Depends on D71985

Differential Revision: https://phabricator.services.mozilla.com/D72305
2020-04-29 14:48:39 +00:00
Mike Conley 6b7012c4b1 Bug 1630234 - Manually persist layout history state when process flipping. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D72399
2020-04-29 13:38:47 +00:00
Christoph Kerschbaumer af3bb17589 Bug 1575356: Update Mixed Content Blocker to rely on BrowsingContext instead of nsIDocShellTreeItem. r=baku,smaug
Differential Revision: https://phabricator.services.mozilla.com/D71547
2020-04-28 13:08:57 +00:00
Csoregi Natalia 879ef8e0a4 Backed out changeset f4a75756b1b4 (bug 1575356) for failures on test_iframe_referrer_invalid.html. CLOSED TREE 2020-04-28 12:23:22 +03:00
Christoph Kerschbaumer 59c7891e26 Bug 1575356: Update Mixed Content Blocker to rely on BrowsingContext instead of nsIDocShellTreeItem. r=baku,smaug
Differential Revision: https://phabricator.services.mozilla.com/D71547
2020-04-28 07:32:51 +00:00
Csoregi Natalia 0185f41854 Backed out changeset 14568f3c84b6 (bug 1575356) for failures on test_iframe_referrer.html. CLOSED TREE 2020-04-28 10:01:30 +03:00
Christoph Kerschbaumer 73c3fa2f74 Bug 1575356: Update Mixed Content Blocker to rely on BrowsingContext instead of nsIDocShellTreeItem. r=baku,smaug
Differential Revision: https://phabricator.services.mozilla.com/D71547
2020-04-28 05:18:28 +00:00
Jean-Yves Avenard 071771cdc7 Bug 1633319 - Wait for load before resolving promise. r=Gijs,zombie
Differential Revision: https://phabricator.services.mozilla.com/D72593
2020-04-27 22:42:25 +00:00
Steven MacLeod e34761f02e Bug 1597413 - fix locking screen orientation to be fission compatible. r=farre
Both the deprecated `Screen.lockOrientation` and replacement
`ScreenOrientation.lock` APIs have been updated to make use of a new
`OrientationLock` field on the `BrowsingContext`. This replaces the
storage and use of APIs for this on the root docshell.

In the non fission case things should behave the same, as pending
promises for previous calls to `Screen.lockOrientation` will still be
cancelled in process. If there are `BrowsingContext`s in other
processes though, IPC will be sent to the parent, and then each other
child to cancel them. This should be spec compliant as the spec is
already racy with regards to multiple `lockOrientation` calls.

This new implementation has a little extra IPC than the optimal
implementation would since the root `BrowsingContext`s
`OrientationLock` is set using the normal `SyncedContext` machinery,
rather than combining the `AbortOtherOrientationPendingPromises`
message for a single message.

This commit fixes both Bug 1597413 and Bug 1597443.

Differential Revision: https://phabricator.services.mozilla.com/D70416
2020-04-27 15:43:36 +00:00
Andrew McCreight 6bc3c0572e Bug 1632338 - Allow remote window proxies before SetNewDocument. r=peterv
In BrowsingContext::SetDocShell(), we indicate that any remote outer window
proxies need to be cleaned up, if we've transitioned from a remote window
proxy to a local one. However, we don't actually do the cleanup until
nsGlobalWindowOuter::SetNewDocument(), so don't assert if we find remote
window proxies when we're in between these two periods.

Also includes a formatting fix by clang-format.

Differential Revision: https://phabricator.services.mozilla.com/D72251
2020-04-27 15:22:53 +00:00
Dan Glastonbury f2d5afd779 Bug 1623565 - P4: Make browser.cache.check_doc_frequency a StaticPref. r=nika
Due to the refactored code,
browser/base/content/test/performance/browser_preferences_usage.js started
reporting more accesses to browser.cache.check_doc_frequency preference.

Differential Revision: https://phabricator.services.mozilla.com/D68319
2020-04-27 05:38:22 +00:00
Dan Glastonbury 6ffa81c157 Bug 1623565 - P3: Remove mLoadFlags from DocumentChannelCreationArgs. r=mattwoodrow,jya
Differential Revision: https://phabricator.services.mozilla.com/D67799
2020-04-27 05:38:15 +00:00
Dan Glastonbury 0d4af00c6b Bug 1623565 - P2: Refactor document channel load flags computation. r=nika,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D67797
2020-04-27 05:38:07 +00:00
Dan Glastonbury a48830f2b3 Bug 1623565 - P1: Move defaultLoadFlags to BrowsingContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D67796
2020-04-27 05:37:59 +00:00
Andreas Farre 6adf2b375d Bug 1576188 - Handle save-as for cross process iframes. r=peterv
Depends on D70388

Differential Revision: https://phabricator.services.mozilla.com/D70389
2020-04-27 05:41:40 +00:00
Matt Woodrow c130a82806 Bug 1602318 - Disable parent-initiated loads when using devtools. r=nika,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D71136
2020-04-26 00:55:12 +00:00
Matt Woodrow a34398fd9f Bug 1602318 - Initiate document loads in the parent process in parallel with setting up the content process side. r=nika,jya
Differential Revision: https://phabricator.services.mozilla.com/D72112
2020-04-26 00:54:15 +00:00
Matt Woodrow 69baeef355 Bug 1602318 - Add load identifier and copy-ctor to nsDocShellLoadState. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D72110
2020-04-26 00:53:19 +00:00
Matt Woodrow 98e4b6eb1f Bug 1602318 - Expose LoadContext on BrowsingContext webidl. r=nika,kmag,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D71135
2020-04-26 00:53:01 +00:00
Matt Woodrow 35eb0ce991 Bug 1602318 - Make sure rv is initialized correctly in all branches of OpenInitializedChannel. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70621
2020-04-26 00:51:18 +00:00
Matt Woodrow 59ee67c46a Bug 1602318 - Remove nsILoadContext from DocumentLoadListener. r=nika,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D70618
2020-04-26 00:50:52 +00:00
Matt Woodrow 6e36d339b4 Bug 1602318 - Remove incorrect assertion. r=jya
This was previously true, since we only used ResumeRedirectedLoad with a brand new docshell. This bug adds code for using it with existing docshells, which can have any Document (and associated timing object) loaded in them.

Differential Revision: https://phabricator.services.mozilla.com/D67097
2020-04-26 00:49:36 +00:00
Matt Woodrow c5176bc6cf Bug 1602318 - Initialize mixed content channel for process-switches. r=ckerschb,necko-reviewers,dragana
Same process origin changes are handled by the docshell, which detects this during AsyncOnChannelRedirect and clears the mixed content permission.
Process switches load in a fresh docshell, so we need to make sure we appropriately set or clear the mixed content permission.

Differential Revision: https://phabricator.services.mozilla.com/D67095
2020-04-26 00:49:21 +00:00
Matt Woodrow 8ff849ade1 Bug 1602318 - Associate a current DocumentLoadListener with CanonicalBrowsingContext. r=nika,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D67094
2020-04-26 00:49:19 +00:00
Sylvestre Ledru 34acbb653a Bug 1619165 - Reformat recent changes to the Google coding style r=andi
First reformat with clang-format 10

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D68802
2020-04-25 09:40:08 +00:00
Dorel Luca c2d429f9a0 Backed out 2 changesets (bug 1576188) for Build bustage in docshell/base/BrowsingContext.cpp. CLOSED TREE
Backed out changeset 7e5e86986811 (bug 1576188)
Backed out changeset b731cbad59a8 (bug 1576188)
2020-04-24 23:02:11 +03:00
Andreas Farre 55a186014d Bug 1576188 - Handle save-as for cross process iframes. r=peterv
Depends on D70388

Differential Revision: https://phabricator.services.mozilla.com/D70389
2020-04-24 15:47:26 +00:00
Nika Layzell e0f0ac8afa Bug 1580565 - Part 6: Add a unique ID to each BrowsingContextGroup, r=kmag
This allows us to explicitly specify BrowsingContextGroups when synchronizing
them. A major advantage of this is that it means we can handle an attempt to
create a BrowsingContext with a parent which the content process is unaware of,
which is possible due to changes to the EnsureSubscribed logic in earlier
patches in this stack.

This is OK, because in the case where the content process cannot see its parent,
the parent must be imminently discarding.

Differential Revision: https://phabricator.services.mozilla.com/D71668
2020-04-24 18:33:09 +00:00
Nika Layzell 146322cadd Bug 1580565 - Part 5: Remove redundant 'mParent' member, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D71239
2020-04-24 18:33:06 +00:00
Nika Layzell cc54537c86 Bug 1580565 - Part 4: Use WindowContext to manage BrowsingContext cached status, r=farre
The existing infrastructure which stored cached BrowsingContexts on the
BrowsingContextGroup was added before WindowContexts were added, and can cause
racing issues with partially discarded trees during process switches.

Differential Revision: https://phabricator.services.mozilla.com/D71238
2020-04-24 18:33:04 +00:00
Nika Layzell 4f3a5448c4 Bug 1580565 - Part 3: Simplify API for creating independent BCs, r=farre
There were previously a number of different APIs for creating BrowsingContext
instances. This simplifies them into two major cases: "CreateDetached", which
allows for creating BrowsingContexts which are related to other
BrowsingContexts, and "CreateIndependent" which creates new, fully unrelated,
browsing contexts.

Differential Revision: https://phabricator.services.mozilla.com/D71237
2020-04-24 18:33:01 +00:00
Nika Layzell fef9c117bd Bug 1580565 - Part 1: Clean up misleading BrowsingContext comments, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D71235
2020-04-24 18:32:51 +00:00
Simon Giesecke 2d8c4390b7 Bug 1628715 - Part 15: Replace MOZ_NONNULL_RETURN by returning NotNull<elem_type*>. r=xpcom-reviewers,necko-reviewers,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D71300
2020-04-24 13:35:27 +00:00
Simon Giesecke c0341c3791 Bug 1628715 - Part 10: Activate nodiscard attributes on AppendElement(s). r=xpcom-reviewers,nika,peterv
Differential Revision: https://phabricator.services.mozilla.com/D70834
2020-04-24 14:34:15 +00:00
Simon Giesecke 191a830575 Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70831
2020-04-24 13:31:14 +00:00
Cosmin Sabou 0f970fbb19 Backed out 20 changesets (bug 1602318) for causing multiple types of failures. CLOSED TREE
Backed out changeset f71e3eff7a8c (bug 1602318)
Backed out changeset 0e0bdebf223b (bug 1602318)
Backed out changeset 44e82f4339a1 (bug 1602318)
Backed out changeset 5f341ebd8591 (bug 1602318)
Backed out changeset 088ea9d20617 (bug 1602318)
Backed out changeset 5de6321939f2 (bug 1602318)
Backed out changeset f5742e84912b (bug 1602318)
Backed out changeset 13bec3079540 (bug 1602318)
Backed out changeset 6c24ba022911 (bug 1602318)
Backed out changeset 5d0fc0102a7f (bug 1602318)
Backed out changeset fc4efd11e643 (bug 1602318)
Backed out changeset 028bd63e710d (bug 1602318)
Backed out changeset 21ad350f9617 (bug 1602318)
Backed out changeset 8f27319f2c34 (bug 1602318)
Backed out changeset db2832973382 (bug 1602318)
Backed out changeset 1756c7584491 (bug 1602318)
Backed out changeset 983e5a9abe02 (bug 1602318)
Backed out changeset a1b9429b3298 (bug 1602318)
Backed out changeset 7d1c0d968a09 (bug 1602318)
Backed out changeset a3b056ec6be3 (bug 1602318)
2020-04-24 11:15:12 +03:00
Matt Woodrow b3c5f89904 Bug 1602318 - Disable parent-initiated loads when using devtools. r=nika,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D71136
2020-04-24 07:01:02 +00:00
Matt Woodrow fc342b8877 Bug 1602318 - Initiate document loads in the parent process in parallel with setting up the content process side. r=nika,jya
Differential Revision: https://phabricator.services.mozilla.com/D72112
2020-04-24 07:00:39 +00:00
Matt Woodrow 6ed37ff3ce Bug 1602318 - Add load identifier and copy-ctor to nsDocShellLoadState. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D72110
2020-04-24 06:59:46 +00:00
Matt Woodrow 89ca645d61 Bug 1602318 - Expose LoadContext on BrowsingContext webidl. r=nika,kmag,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D71135
2020-04-24 06:59:29 +00:00
Matt Woodrow ffa2817635 Bug 1602318 - Make sure rv is initialized correctly in all branches of OpenInitializedChannel. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70621
2020-04-24 06:57:37 +00:00
Matt Woodrow a884d27d80 Bug 1602318 - Remove nsILoadContext from DocumentLoadListener. r=nika,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D70618
2020-04-24 06:57:17 +00:00
Matt Woodrow 374c5f9926 Bug 1602318 - Remove incorrect assertion. r=jya
This was previously true, since we only used ResumeRedirectedLoad with a brand new docshell. This bug adds code for using it with existing docshells, which can have any Document (and associated timing object) loaded in them.

Differential Revision: https://phabricator.services.mozilla.com/D67097
2020-04-24 06:56:22 +00:00
Matt Woodrow e93ecebed1 Bug 1602318 - Initialize mixed content channel for process-switches. r=ckerschb,necko-reviewers,dragana
Same process origin changes are handled by the docshell, which detects this during AsyncOnChannelRedirect and clears the mixed content permission.
Process switches load in a fresh docshell, so we need to make sure we appropriately set or clear the mixed content permission.

Differential Revision: https://phabricator.services.mozilla.com/D67095
2020-04-24 06:56:18 +00:00
Matt Woodrow ca01075202 Bug 1602318 - Associate a current DocumentLoadListener with CanonicalBrowsingContext. r=nika,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D67094
2020-04-24 06:55:20 +00:00
Jean-Yves Avenard ff4bc77f97 Bug 1607984 - P12-4. Start parent load via DocumentChannel. r=mayhemer,nika,mattwoodrow,necko-reviewers
Add ParentProcessDocumentChannel object. This object is a DocumentChannel that will start a channel load from the parent process via a DocumentChannel.

The aim of this task is two-fold.
1- Be consistent on how we handle redirects before continuing the load on the final channel.
2- Prepare to initiate a process switch when needed without having to go via an intermediary content process, saving a process switch. This task will be done in a follow-up task.

The behaviour of the ParentProcessDocumentChannel is similar in logic to the DocumentChannelChild/DocumentChannelParent pair. The ParentProcessDocumentChannel sets up a DocumentLoadListener, have it handle the redirects and upon completion continue the load on the final channel.

Differential Revision: https://phabricator.services.mozilla.com/D70009
2020-04-24 01:58:23 +00:00
Jean-Yves Avenard 45fb84edc5 Bug 1607984 - P12-3. Let DocumentChannel decides when it can be used. r=mattwoodrow
Depends on D72272

Differential Revision: https://phabricator.services.mozilla.com/D72273
2020-04-24 02:22:58 +00:00
Jean-Yves Avenard c024d4b423 Bug 1607984 - P3. Fix leak in nsDSURIContentListener. r=smaug
If we were to open the window to close it immediately; we would leak a nsHtml5Parser object.

Differential Revision: https://phabricator.services.mozilla.com/D70000
2020-04-24 01:43:54 +00:00
Narcis Beleuzu fffdcb0203 Backed out 7 changesets (bug 1580565) for bustages on nsDocShell.cpp . CLOSED TREE
Backed out changeset 8237f9a307f8 (bug 1580565)
Backed out changeset 47f5698d6c72 (bug 1580565)
Backed out changeset e1802670dcc4 (bug 1580565)
Backed out changeset 0a44c410b59b (bug 1580565)
Backed out changeset 20dbcfc9eacc (bug 1580565)
Backed out changeset cdf2b600e779 (bug 1580565)
Backed out changeset a421d33d03ce (bug 1580565)
2020-04-24 05:31:55 +03:00
Nika Layzell 88293ee406 Bug 1580565 - Part 6: Add a unique ID to each BrowsingContextGroup, r=kmag
This allows us to explicitly specify BrowsingContextGroups when synchronizing
them. A major advantage of this is that it means we can handle an attempt to
create a BrowsingContext with a parent which the content process is unaware of,
which is possible due to changes to the EnsureSubscribed logic in earlier
patches in this stack.

This is OK, because in the case where the content process cannot see its parent,
the parent must be imminently discarding.

Differential Revision: https://phabricator.services.mozilla.com/D71668
2020-04-23 21:52:51 +00:00
Nika Layzell 5e242428d9 Bug 1580565 - Part 5: Remove redundant 'mParent' member, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D71239
2020-04-23 21:52:49 +00:00
Nika Layzell 8f2ceafb38 Bug 1580565 - Part 4: Use WindowContext to manage BrowsingContext cached status, r=farre
The existing infrastructure which stored cached BrowsingContexts on the
BrowsingContextGroup was added before WindowContexts were added, and can cause
racing issues with partially discarded trees during process switches.

Differential Revision: https://phabricator.services.mozilla.com/D71238
2020-04-23 21:52:47 +00:00
Nika Layzell 989454dc24 Bug 1580565 - Part 3: Simplify API for creating independent BCs, r=farre
There were previously a number of different APIs for creating BrowsingContext
instances. This simplifies them into two major cases: "CreateDetached", which
allows for creating BrowsingContexts which are related to other
BrowsingContexts, and "CreateIndependent" which creates new, fully unrelated,
browsing contexts.

Differential Revision: https://phabricator.services.mozilla.com/D71237
2020-04-23 21:52:44 +00:00
Nika Layzell c29b657a48 Bug 1580565 - Part 1: Clean up misleading BrowsingContext comments, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D71235
2020-04-23 21:52:35 +00:00
Arthur Iakab c278cf13d3 Backed out 2 changesets (bug 1576188) for causing browser-chrome failures on browser_persist_cross_origin_iframe.js
CLOSED TREE

Backed out changeset d2c102f8d898 (bug 1576188)
Backed out changeset 9ddd9a63d178 (bug 1576188)
2020-04-23 19:38:58 +03:00
Emilio Cobos Álvarez 875d92a9ea Bug 1612068 - followup: Fix some bits which I forgot to update before landing.
Missed two tests and clang-formatting.

Differential Revision: https://phabricator.services.mozilla.com/D72170
2020-04-23 15:46:11 +00:00
Emilio Cobos Álvarez 1159b42442 Bug 1612068 - Fix top-level document zoom when restoring from bfcache. r=nika
This still doesn't really fix subframes, but those are broken in trunk
already.

Fixing subframes could be done by making the zoom Top()-only, or by
propagating to browsing contexts in the bfcache as well from DidSet(..).

Differential Revision: https://phabricator.services.mozilla.com/D72034
2020-04-23 15:23:53 +00:00
Emilio Cobos Álvarez d36c96ab4c Bug 1612068 - Move zoom from the content viewer to the browsing context. r=nika
We need it to live in BrowsingContext instead of WindowContext, because
we need to preserve the zoom level across same-origin navigation.

It'd be nice if it only lived in the top BC, but that's not possible at
the moment because a lot of tests rely on zooming only iframes. Some of
them can be adjusted for scaling the top instead, but not sure it's
worth it's worth fixing them and moving the zoom to be top-only, as it'd
be a bunch of effort, and the complexity and overhead of propagating the
zoom is not so big.

The print-preview-specific code in nsContentViewer is from before we did
the document cloning setup, and it seems useless. I've tested print
preview scaling before and after my patch and both behave the same.

The rest is just various test changes to use the SpecialPowers APIs or
BrowsingContext as needed instead of directly poking at the content
viewer.

I named the pres context hook RecomputeBrowsingContextDependentData, as
more stuff should move there like overrideDPPX and other media emulation
shenanigans.

I also have some ideas to simplify or even remove ZoomChild and such,
but that's followup work.

Differential Revision: https://phabricator.services.mozilla.com/D71969
2020-04-22 19:32:52 +00:00
Dimi Lee c52ca9c7d5 Bug 1616775 - P1. Add IsThirdPartyWindow and IsThirdPartyTrackingResourceWindow fields to WindowContext. r=timhuang,baku,farre
We have to add "IsThirdPartyWindow" in WindowContext because we need to know if
a BrowsingContext is third-party (The browsing context may be not
in-process).

Differential Revision: https://phabricator.services.mozilla.com/D71010
2020-04-23 14:24:56 +00:00
Andreas Farre 6a4f39685d Bug 1576188 - Handle save-as for cross process iframes. r=peterv
Depends on D70388

Differential Revision: https://phabricator.services.mozilla.com/D70389
2020-04-23 13:56:26 +00:00
Tim Nguyen 059c4f1854 Bug 1583696 - Remove XUL grid from toolkit/components/prompts/content/tabprompts.jsm. r=MattN,marionette-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D61442
2020-04-23 09:48:17 +00:00
Csoregi Natalia 448f2f3c76 Backed out 16 changesets (bug 1607984) for leaks on browser_ext_webRequest.js. CLOSED TREE
Backed out changeset 6c6ffa908c06 (bug 1607984)
Backed out changeset e973911e67e6 (bug 1607984)
Backed out changeset 28af6418ac16 (bug 1607984)
Backed out changeset 9a15a605f91a (bug 1607984)
Backed out changeset 52566b3564ba (bug 1607984)
Backed out changeset 142148a95181 (bug 1607984)
Backed out changeset 108e2cb6b2a9 (bug 1607984)
Backed out changeset 77fda525ee12 (bug 1607984)
Backed out changeset 980067f3ac1d (bug 1607984)
Backed out changeset 12b82a39c910 (bug 1607984)
Backed out changeset 7657023a763b (bug 1607984)
Backed out changeset 1ab8758802a6 (bug 1607984)
Backed out changeset 35f22d0817e1 (bug 1607984)
Backed out changeset b8c6277207d8 (bug 1607984)
Backed out changeset 244d3cb006be (bug 1607984)
Backed out changeset 9fc1a237829c (bug 1607984)
2020-04-23 11:49:51 +03:00
Jean-Yves Avenard faa627b41e Bug 1607984 - P12. Start parent load via DocumentChannel. r=mayhemer,nika,mattwoodrow,necko-reviewers
Add ParentProcessDocumentChannel object. This object is a DocumentChannel that will start a channel load from the parent process via a DocumentChannel.

The aim of this task is two-fold.
1- Be consistent on how we handle redirects before continuing the load on the final channel.
2- Prepare to initiate a process switch when needed without having to go via an intermediary content process, saving a process switch. This task will be done in a follow-up task.

The behaviour of the ParentProcessDocumentChannel is similar in logic to the DocumentChannelChild/DocumentChannelParent pair.
The ParentProcessDocumentChannel sets up a DocumentLoadListener, have it handle the redirects and upon completion continue the load on the final channel.

Differential Revision: https://phabricator.services.mozilla.com/D70009
2020-04-23 03:29:22 +00:00
Jean-Yves Avenard c57f6d6300 Bug 1607984 - P3. Fix leak in nsDSURIContentListener. r=smaug
If we were to open the window to close it immediately; we would leak a nsHtml5Parser object.

Differential Revision: https://phabricator.services.mozilla.com/D70000
2020-04-23 00:57:53 +00:00
Andreea Pavel b9c773a74f Backed out changeset 2f06fd7ef8b6 (bug 1583696) for failing test_bug619644.html on a CLOSED TREE 2020-04-23 05:16:18 +03:00
Andreea Pavel cac786a35c Backed out 16 changesets (bug 1607984) for multiple test failures e.g test timeouts on a CLOSED TREE
Backed out changeset 4509808243f5 (bug 1607984)
Backed out changeset 0cb21bedf65f (bug 1607984)
Backed out changeset 4e5d89f68293 (bug 1607984)
Backed out changeset 0c0169ed4f04 (bug 1607984)
Backed out changeset ce527a6ffba4 (bug 1607984)
Backed out changeset 63175f596762 (bug 1607984)
Backed out changeset 107be8f3737d (bug 1607984)
Backed out changeset d7600d4d3528 (bug 1607984)
Backed out changeset e11b1b0ecfbf (bug 1607984)
Backed out changeset bed3f6bee79e (bug 1607984)
Backed out changeset abe692da4556 (bug 1607984)
Backed out changeset e02b12515d60 (bug 1607984)
Backed out changeset 7a2ef225a41e (bug 1607984)
Backed out changeset c173bde5106b (bug 1607984)
Backed out changeset dc8b37e10dc7 (bug 1607984)
Backed out changeset 09a651daf344 (bug 1607984)
2020-04-23 03:47:24 +03:00
Tim Nguyen 09f305d392 Bug 1583696 - Remove XUL grid from toolkit/components/prompts/content/tabprompts.jsm. r=MattN,marionette-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D61442
2020-04-22 23:46:35 +00:00
Jean-Yves Avenard fce4dd9e1f Bug 1607984 - P12. Start parent load via DocumentChannel. r=mayhemer,nika,mattwoodrow,necko-reviewers
Add ParentProcessDocumentChannel object. This object is a DocumentChannel that will start a channel load from the parent process via a DocumentChannel.

The aim of this task is two-fold.
1- Be consistent on how we handle redirects before continuing the load on the final channel.
2- Prepare to initiate a process switch when needed without having to go via an intermediary content process, saving a process switch. This task will be done in a follow-up task.

The behaviour of the ParentProcessDocumentChannel is similar in logic to the DocumentChannelChild/DocumentChannelParent pair.
The ParentProcessDocumentChannel sets up a DocumentLoadListener, have it handle the redirects and upon completion continue the load on the final channel.

Differential Revision: https://phabricator.services.mozilla.com/D70009
2020-04-22 10:27:11 +00:00
Jean-Yves Avenard fd203222be Bug 1607984 - P3. Fix leak in nsDSURIContentListener. r=smaug
If we were to open the window to close it immediately; we would leak a nsHtml5Parser object.

Differential Revision: https://phabricator.services.mozilla.com/D70000
2020-04-15 15:37:28 +00:00
Tim Huang fbf29217f1 Bug 1608516 - Part 3: Add a pref to prevent sending unnecessary IPC if we are not in testing. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D71940
2020-04-22 22:22:09 +00:00
Tim Huang 4ec0106dae Bug 1608516 - Part 2: Make AddBlockedNodeByClassifier() in nsDocShell::EndPageLoad() Fission-compatible. r=baku
In this patch, we report the blocked node across the process
boundaries if the parent is in a different process. If the parent
document is in the same process as the reporting document, we
will directly add the blocked node in the parent document without
sending an IPC.

Differential Revision: https://phabricator.services.mozilla.com/D71939
2020-04-22 22:21:56 +00:00
Emilio Cobos Álvarez da7a16ff9d Bug 1612068 - Rename and simplify nsIContentViewer.deviceFullZoom. r=nika
It's only needed for a single test, and definitely not used in print
preview.

Depends on D71967

Differential Revision: https://phabricator.services.mozilla.com/D71968
2020-04-22 18:05:44 +00:00
Emilio Cobos Álvarez c9c7dd2edb Bug 1612068 - Remove nsIContentViewer.effectiveTextZoom. r=nika
It's unused.

Differential Revision: https://phabricator.services.mozilla.com/D71967
2020-04-22 18:05:03 +00:00
Stefan Hindli 18cbb5abb9 Backed out 3 changesets (bug 1608516) for causing mochitest permafailures in toolkit/components/url-classifier/tests/mochitest/test_classified_annotations.html CLOSED TREE
Backed out changeset f588a8808e45 (bug 1608516)
Backed out changeset 2a8566d55ba6 (bug 1608516)
Backed out changeset 8c1be470cb2c (bug 1608516)
2020-04-23 00:31:42 +03:00
Tim Huang 3df5d4c3f2 Bug 1608516 - Part 3: Add a pref to prevent sending unnecessary IPC if we are not in testing. r=baku
Depends on D71939

Differential Revision: https://phabricator.services.mozilla.com/D71940
2020-04-22 14:33:08 +00:00
Tim Huang 6ef45fb9b0 Bug 1608516 - Part 2: Make AddBlockedNodeByClassifier() in nsDocShell::EndPageLoad() Fission-compatible. r=baku
In this patch, we report the blocked node across the process
boundaries if the parent is in a different process. If the parent
document is in the same process as the reporting document, we
will directly add the blocked node in the parent document without
sending an IPC.

Depends on D71938

Differential Revision: https://phabricator.services.mozilla.com/D71939
2020-04-22 14:32:02 +00:00
Andreea Pavel b74d860d87 Backed out 7 changesets (bug 1580565) for bc failures on a CLOSED TREE
Backed out changeset e44e0a6366f8 (bug 1580565)
Backed out changeset c0849928f934 (bug 1580565)
Backed out changeset 3d4f155096be (bug 1580565)
Backed out changeset 108d5fb4418e (bug 1580565)
Backed out changeset d8dea951a032 (bug 1580565)
Backed out changeset f9ab41f29552 (bug 1580565)
Backed out changeset fd5d76304c09 (bug 1580565)
2020-04-22 21:51:17 +03:00
Nika Layzell 34024af634 Bug 1580565 - Part 6: Add a unique ID to each BrowsingContextGroup, r=kmag
This allows us to explicitly specify BrowsingContextGroups when synchronizing
them. A major advantage of this is that it means we can handle an attempt to
create a BrowsingContext with a parent which the content process is unaware of,
which is possible due to changes to the EnsureSubscribed logic in earlier
patches in this stack.

This is OK, because in the case where the content process cannot see its parent,
the parent must be imminently discarding.

Differential Revision: https://phabricator.services.mozilla.com/D71668
2020-04-22 16:25:18 +00:00
Nika Layzell eed60bac13 Bug 1580565 - Part 5: Remove redundant 'mParent' member, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D71239
2020-04-22 15:48:15 +00:00
Nika Layzell 7a75edbe29 Bug 1580565 - Part 4: Use WindowContext to manage BrowsingContext cached status, r=farre
The existing infrastructure which stored cached BrowsingContexts on the
BrowsingContextGroup was added before WindowContexts were added, and can cause
racing issues with partially discarded trees during process switches.

Differential Revision: https://phabricator.services.mozilla.com/D71238
2020-04-22 15:48:17 +00:00
Nika Layzell 6d700ff7a6 Bug 1580565 - Part 3: Simplify API for creating independent BCs, r=farre
There were previously a number of different APIs for creating BrowsingContext
instances. This simplifies them into two major cases: "CreateDetached", which
allows for creating BrowsingContexts which are related to other
BrowsingContexts, and "CreateIndependent" which creates new, fully unrelated,
browsing contexts.

Differential Revision: https://phabricator.services.mozilla.com/D71237
2020-04-22 15:48:20 +00:00
Nika Layzell 2fa72beb9c Bug 1580565 - Part 1: Clean up misleading BrowsingContext comments, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D71235
2020-04-22 15:48:24 +00:00
Dorel Luca 7daa9a6695 Backed out 7 changesets (bug 1580565) for Gecko-view failures in Test.crashParent. CLOSED TREE
Backed out changeset 7da9785ebb06 (bug 1580565)
Backed out changeset a80e177a91b2 (bug 1580565)
Backed out changeset 2cf821f2a6ea (bug 1580565)
Backed out changeset a30f158eba45 (bug 1580565)
Backed out changeset 276b131190a8 (bug 1580565)
Backed out changeset 3c15e4c600c4 (bug 1580565)
Backed out changeset bf8877cdb10f (bug 1580565)
2020-04-22 18:42:24 +03:00
Nika Layzell 38bdb3ed64 Bug 1580565 - Part 6: Add a unique ID to each BrowsingContextGroup, r=kmag
This allows us to explicitly specify BrowsingContextGroups when synchronizing
them. A major advantage of this is that it means we can handle an attempt to
create a BrowsingContext with a parent which the content process is unaware of,
which is possible due to changes to the EnsureSubscribed logic in earlier
patches in this stack.

This is OK, because in the case where the content process cannot see its parent,
the parent must be imminently discarding.

Differential Revision: https://phabricator.services.mozilla.com/D71668
2020-04-22 03:22:07 +00:00
Nika Layzell ca073927a4 Bug 1580565 - Part 5: Remove redundant 'mParent' member, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D71239
2020-04-22 03:21:58 +00:00
Nika Layzell 60ee58560f Bug 1580565 - Part 4: Use WindowContext to manage BrowsingContext cached status, r=farre
The existing infrastructure which stored cached BrowsingContexts on the
BrowsingContextGroup was added before WindowContexts were added, and can cause
racing issues with partially discarded trees during process switches.

Differential Revision: https://phabricator.services.mozilla.com/D71238
2020-04-22 06:05:41 +00:00
Nika Layzell 01ad33304d Bug 1580565 - Part 3: Simplify API for creating independent BCs, r=farre
There were previously a number of different APIs for creating BrowsingContext
instances. This simplifies them into two major cases: "CreateDetached", which
allows for creating BrowsingContexts which are related to other
BrowsingContexts, and "CreateIndependent" which creates new, fully unrelated,
browsing contexts.

Differential Revision: https://phabricator.services.mozilla.com/D71237
2020-04-22 03:21:55 +00:00
Nika Layzell 90939c32bb Bug 1580565 - Part 1: Clean up misleading BrowsingContext comments, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D71235
2020-04-22 03:22:05 +00:00
Bogdan Tara 4bd759fa8e Backed out 7 changesets (bug 1580565) for browser_entry_point_telemetry.js failures CLOSED TREE
Backed out changeset 12a4f3de76a8 (bug 1580565)
Backed out changeset 81d537df2dc1 (bug 1580565)
Backed out changeset b182e872c9d4 (bug 1580565)
Backed out changeset 0b4595b2c153 (bug 1580565)
Backed out changeset 4363e3a3d799 (bug 1580565)
Backed out changeset cbb14b2c7b33 (bug 1580565)
Backed out changeset 46b251848297 (bug 1580565)
2020-04-22 06:15:43 +03:00
alwu f6f59cedd1 Bug 1625615 - part0 : create and set the flag `suspendMediaWhenInactive` on docShell. r=baku,farre
Implemecurnt a flag `suspendMediaWhenInactive` on the docShell that indicates media in that shell should be suspended when the shell is inactive. Currently, only GeckoView is using this flag.

---

The reason of implementing this flag is because in bug1577890 we remove the old way to suspend/resume the media, and I thought setting docshell to inactive is enough to suspend the media because we already have a mechanism which would suspend/resume media when document becomes inactive/active [1].

However, the active state of document is actually different from what I thought it was. Setting docshell to inactive won't change the document's active state, because that indicates if the document is the current active document for the docshell [2] (docshell can have multiple documents), instead of indicating if the docshell is active or not.

Therefore, we have to add another flag to indicate if the docshell wants to suspend its media when it's inactive, in order to use current mechanism to suspend/resume media.

[1] https://searchfox.org/mozilla-central/rev/4d2a9d5dc8f0e65807ee66e2b04c64596c643b7a/dom/html/HTMLMediaElement.cpp#6453
[2] https://searchfox.org/mozilla-central/rev/4d2a9d5dc8f0e65807ee66e2b04c64596c643b7a/dom/base/Document.h#2627-2633

Differential Revision: https://phabricator.services.mozilla.com/D69669
2020-04-20 21:19:56 +00:00