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

7002 Коммитов

Автор SHA1 Сообщение Дата
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
Nika Layzell 5708211961 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 01:38:05 +00:00
Nika Layzell aa9801e616 Bug 1580565 - Part 5: Remove redundant 'mParent' member, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D71239
2020-04-22 01:38:02 +00:00
Nika Layzell 88b3fbe306 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 01:37:55 +00:00
Nika Layzell 20e0c066e7 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 01:37:52 +00:00
Nika Layzell dabb47af2e Bug 1580565 - Part 1: Clean up misleading BrowsingContext comments, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D71235
2020-04-22 01:37:48 +00:00
Nika Layzell b4c2e94a13 Bug 1625513 - Part 5: Don't run sandboxed srcdoc loads through DocumentChannel, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D71688
2020-04-21 22:33:11 +00:00
Nika Layzell 975ef89398 Bug 1625513 - Part 1: Perform onMayChangeProcess handling within DocumentLoadListener, r=mattwoodrow,pbone,droeh,necko-reviewers,valentin
When I first added this method last year, I added it in JS, handled from within
SessionStore.jsm, as that was the easiest place to do it. Now that
DocumentLoadListener exists, it makes more sense to handle this logic directly
from within that code.

Many parts of the process switch are still handled by frontend JS, such as
selecting remote types, and performing toplevel process switches.

Differential Revision: https://phabricator.services.mozilla.com/D68594
2020-04-21 22:33:00 +00:00
Cosmin Sabou 190731f374 Backed out 5 changesets (bug 1625513) for bc failures on browser_identity_UI.js. CLOSED TREE
Backed out changeset 88ac5d853e38 (bug 1625513)
Backed out changeset 8ac6db819435 (bug 1625513)
Backed out changeset cc19c74910d1 (bug 1625513)
Backed out changeset 8c235f0f967c (bug 1625513)
Backed out changeset 24a646225c68 (bug 1625513)
2020-04-22 00:17:08 +03:00
Nika Layzell eddac05916 Bug 1625513 - Part 5: Don't run sandboxed srcdoc loads through DocumentChannel, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D71688
2020-04-21 18:33:54 +00:00
Nika Layzell 8438107f7a Bug 1625513 - Part 1: Perform onMayChangeProcess handling within DocumentLoadListener, r=mattwoodrow,pbone,droeh,necko-reviewers,valentin
When I first added this method last year, I added it in JS, handled from within
SessionStore.jsm, as that was the easiest place to do it. Now that
DocumentLoadListener exists, it makes more sense to handle this logic directly
from within that code.

Many parts of the process switch are still handled by frontend JS, such as
selecting remote types, and performing toplevel process switches.

Differential Revision: https://phabricator.services.mozilla.com/D68594
2020-04-21 18:33:39 +00:00
Subhamoy Sengupta a25b985890 Bug 1626573 - P1 - BrowsingContext transmits BlobURL before loading an URI if URI is a BlobURL r=baku
Differential Revision: https://phabricator.services.mozilla.com/D69717
2020-04-21 12:37:02 +00:00
Noemi Erli c0bd1834c8 Backed out 19 changesets (bug 1602318) for causing multiple failures
Backed out changeset 4b3345b2e33b (bug 1602318)
Backed out changeset 7240b27afe28 (bug 1602318)
Backed out changeset a7091729d8c9 (bug 1602318)
Backed out changeset e496ab6c0857 (bug 1602318)
Backed out changeset 184da6309f0c (bug 1602318)
Backed out changeset 79b540f8619d (bug 1602318)
Backed out changeset b298015ee960 (bug 1602318)
Backed out changeset 6d0783cd5e01 (bug 1602318)
Backed out changeset cbc308486b17 (bug 1602318)
Backed out changeset 94142944fb54 (bug 1602318)
Backed out changeset 7c1eeb299b78 (bug 1602318)
Backed out changeset 0fc27502503a (bug 1602318)
Backed out changeset 0fc27c2e09d9 (bug 1602318)
Backed out changeset b5e2aa4741b2 (bug 1602318)
Backed out changeset 57d568114c5a (bug 1602318)
Backed out changeset 8f7360d827dc (bug 1602318)
Backed out changeset 78930a97c2df (bug 1602318)
Backed out changeset 8015780587cd (bug 1602318)
Backed out changeset bc9da03cb3a3 (bug 1602318)
2020-04-21 03:46:41 +03:00
Matt Woodrow bd13b9f2d9 Bug 1602318 - Disable parent-initiated loads when using devtools. r=nika,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D71136
2020-04-20 23:04:31 +00:00
Matt Woodrow 53eab85c6d Bug 1602318 - Expose LoadContext on BrowsingContext webidl. r=nika,kmag
Differential Revision: https://phabricator.services.mozilla.com/D71135
2020-04-20 23:04:09 +00:00
Matt Woodrow 54959845fb Bug 1602318 - Start loads directly from CanonicalBrowsingContext when possible. r=nika,jya,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D70629
2020-04-20 23:03:25 +00:00
Matt Woodrow 8c122b6d22 Bug 1602318 - Make RemoteWebProgress:stop also stop any current loads in the parent process. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70626
2020-04-20 23:02:32 +00:00
Matt Woodrow 6fdcda5006 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-20 23:01:01 +00:00
Matt Woodrow ac77284abe Bug 1602318 - Remove nsILoadContext from DocumentLoadListener. r=nika,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D70618
2020-04-20 23:00:56 +00:00
Matt Woodrow fcd0988fd9 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-20 22:59:17 +00:00
Matt Woodrow d11fa9ad8b 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-20 22:58:52 +00:00
Matt Woodrow 8981f913c2 Bug 1602318 - Associate a current DocumentLoadListener with CanonicalBrowsingContext. r=nika,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D67094
2020-04-20 22:58:40 +00:00
Kris Maglione 1525db9c6d Bug 1614462: Part 3b - Remove moribund DocShell FrameType/IsMozBrowser/IsInMozBrowser fields. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70749
2020-04-20 22:15:24 +00:00
Ciure Andrei a5ac2a8bbc Backed out 10 changesets (bug 1614462) for causing test_ipc_messagemanager_blob.js failures CLOSED TREE
Backed out changeset bf4f8253c708 (bug 1614462)
Backed out changeset c61b797d63e9 (bug 1614462)
Backed out changeset 284002de7137 (bug 1614462)
Backed out changeset 7f604ee5731c (bug 1614462)
Backed out changeset a73ef8167cd4 (bug 1614462)
Backed out changeset ecc3477ed34e (bug 1614462)
Backed out changeset 2106f3ccc4b5 (bug 1614462)
Backed out changeset e68c38a7741d (bug 1614462)
Backed out changeset 93b3bacdbb34 (bug 1614462)
Backed out changeset 0cf4898ae08d (bug 1614462)
2020-04-21 01:11:37 +03:00
Emilio Cobos Álvarez 47c40173d7 Bug 1631533 - Allow to get old value in synced field's DidSet. r=nika
This is needed for zoom because it only fires events when values
actually change for example, but seems useful more generally to
potentially avoid wasted work.

We can't just notify on change because user activation depends on the
time on which DidSet gets called.

Differential Revision: https://phabricator.services.mozilla.com/D71646
2020-04-20 20:25:22 +00:00
Kris Maglione a8a1c5767d Bug 1614462: Part 3b - Remove moribund DocShell FrameType/IsMozBrowser/IsInMozBrowser fields. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70749
2020-04-20 20:11:52 +00:00
Michael Kaply 2926ae801d Bug 1592780 - Empty alerts when browser.xul.error_pages.enabled=false, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53848
2020-04-20 18:42:06 +00:00
Ciure Andrei 54a37a9804 Backed out changeset adcfa8af679c (bug 1631533) for causing test_useractivation_transient.html failures CLOSED TREE 2020-04-20 23:09:32 +03:00
Noemi Erli 6ce4e6b1e0 Backed out 4 changesets (bug 1625513) for causing assertion in WindowGlobalChild.cpp
Backed out changeset 0366bbc9e0f7 (bug 1625513)
Backed out changeset 3554e0be2e66 (bug 1625513)
Backed out changeset ad09a911bc43 (bug 1625513)
Backed out changeset f2dbff5d584f (bug 1625513)
2020-04-20 22:28:20 +03:00
Emilio Cobos Álvarez 3481e78d3d Bug 1631533 - Make sync fields observe DidChange instead of DidSet. r=nika
And provide the old value to that callback.

I'm going to need this for zoom.

Differential Revision: https://phabricator.services.mozilla.com/D71620
2020-04-20 18:28:03 +00:00
Nika Layzell 8624c6d38b Bug 1625513 - Part 1: Perform onMayChangeProcess handling within DocumentLoadListener, r=mattwoodrow,pbone,droeh,necko-reviewers,valentin
When I first added this method last year, I added it in JS, handled from within
SessionStore.jsm, as that was the easiest place to do it. Now that
DocumentLoadListener exists, it makes more sense to handle this logic directly
from within that code.

Many parts of the process switch are still handled by frontend JS, such as
selecting remote types, and performing toplevel process switches.

Differential Revision: https://phabricator.services.mozilla.com/D68594
2020-04-20 16:57:01 +00:00
Marco Bonardo 45a8a38b0b Bug 1080682 - Use the Public Suffix List to distinguish foo.bar searches in URIFixup (and consequently the Address Bar). r=Gijs,dao
Use the PSL list to evaluate whether user typed strings in urlbar are valid URLs.
Cleanup the URIFixupInfo.fixupChangedProtocol property to be set appropriately.
Auto-correct the most common suffix typos for com, net, org.

Stop using URIFixup to trim urls when the urlbar value is set, instead always trim,
then untrim on focus if the trimmed string would cause, on navigation, a search
instead of a visit. This saves us from doing the URIfixup work on page load and
tab switch, running it only when strictly necessary.

Fix the "Did you mean to go to" prompt to show a protocol, avoiding the
confusing (but funny) "did you mean to go to 'space'" prompts.

Differential Revision: https://phabricator.services.mozilla.com/D68796
2020-04-20 12:39:08 +00:00
Sebastian Streich 3c19d7435a Bug 1623334 - Refactor nsDocShell Geturi usage r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D67325
2020-04-20 09:43:22 +00:00
David Teller 021fdf8b13 Bug 1605209 - Turn actor names into nsCString;r=nika
This should save (a little) memory and avoid quite a few conversions.

Differential Revision: https://phabricator.services.mozilla.com/D70341
2020-04-17 10:56:22 +00:00
Daniel Varga ca80197a2f Backed out 4 changesets (bug 1605209) for causing browser-chrome failures at dom/ipc/tests/JSWindowActor/browser_crash_report.js
CLOSED TREE

Backed out changeset 6eb1cc169dbf (bug 1605209)
Backed out changeset d81b566ad94f (bug 1605209)
Backed out changeset e0e6dbf1d48d (bug 1605209)
Backed out changeset 289f5bbac1ae (bug 1605209)
2020-04-17 13:49:04 +03:00
David Teller 5435691b55 Bug 1605209 - Turn actor names into nsCString;r=nika
This should save (a little) memory and avoid quite a few conversions.

Differential Revision: https://phabricator.services.mozilla.com/D70341
2020-04-16 08:58:21 +00:00
Ciure Andrei c15dcac93b Backed out 10 changesets (bug 1614462) for causing xpcshell failures CLOSED TREE
Backed out changeset 34d4a86530b4 (bug 1614462)
Backed out changeset dbc2e2556d08 (bug 1614462)
Backed out changeset 512bbab4730c (bug 1614462)
Backed out changeset cd6b8d630f4c (bug 1614462)
Backed out changeset e4ad5037658f (bug 1614462)
Backed out changeset 0ffed1dc4296 (bug 1614462)
Backed out changeset 90ed81cbfe34 (bug 1614462)
Backed out changeset 6d2137eb1d52 (bug 1614462)
Backed out changeset b4819c99e16e (bug 1614462)
Backed out changeset b7deaed376ed (bug 1614462)
2020-04-17 02:26:14 +03:00
Kris Maglione a790842cdd Bug 1614462: Part 3b - Remove moribund DocShell FrameType/IsMozBrowser/IsInMozBrowser fields. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70749
2020-04-16 17:25:06 +00:00
pbz 3075dbd453 Bug 1615588 - Extended nsIPromptService to support tab modal prompts. r=johannh,MattN,necko-reviewers,dragana
This patch introduces a new tab modal system prompt type. It can be opened via the nsIPromptService
with a destination BrowsingContext. These tab system prompts overlap slightly with the upper
chrome UI to differentiate them from content prompts (previously called tab prompts).

- Extended nsIPromptService and nsIPrompt to accept 3 types of modal prompts:
  - Window prompts
  - Tab (system) prompts
  - Content prompts (the old tab prompts)
- Removed prompt code from Prompter.jsm, always call PromptParent window actor instead
- Added PromptChild window actor to forward pagehide events to parent actor
- Created additional prompt methods in nsIPromptService to prompt by browsingContext and modalType
- Backwards compatibility is maintained, consumers can still open content prompts calling nsIPrompt with a content window

Differential Revision: https://phabricator.services.mozilla.com/D66446
2020-04-16 14:43:50 +00:00
Marco Bonardo fb0662edda Bug 1628906 - First search in a tab from location bar could trigger an "Invalid URL" error page. r=Gijs,nika,mattwoodrow
Before 1496578, URIFixup::keywordToURI used to do a synchronous IPC call to be
able to access search engines from the content process. Consumers of URIFixup
didn't care. Bug 1496578 moved the IPC messaging to the callers, in particular
nsDocShell, but assumed nsDocShellLoadState wasn't loading from content.
It looks like in some cases it does, so this adds another sync IPC call for
GetFixupURIInfo.
The total numer of sync IPCs should not change from before Bug 1496578, URIFIxup
was just doing it internally, while now it happens at the call point.
Note the long term plan would be for these docshell objects callers to just
handle URIs, while the UI code should do fixup.
Bug 1375244 tracks the removal of these sync IPC messages.

Differential Revision: https://phabricator.services.mozilla.com/D70607

--HG--
extra : moz-landing-system : lando
2020-04-15 22:39:38 +00:00
Christoph Kerschbaumer 7e43ad336f Bug 1621987: Implement Sec-Fetch-User. r=baku,edgar,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D69392

--HG--
extra : moz-landing-system : lando
2020-04-16 08:04:26 +00:00
Matt Woodrow 9f11c31d1a Bug 1627971 - Fire onerror event for CONTENT_BLOCKED in EndPageLoad. r=nika,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D70587

--HG--
extra : moz-landing-system : lando
2020-04-15 22:33:46 +00:00
Matt Woodrow a27cfc760b Bug 1627971 - Add option to MaybeFireEmbedderLoadEvents to also fire the error event to the embedder element. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70585

--HG--
extra : moz-landing-system : lando
2020-04-15 22:30:13 +00:00
Matt Woodrow ce7219acd5 Bug 1627971 - Move docshell embedder unblock load to a helper. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70584

--HG--
extra : moz-landing-system : lando
2020-04-15 22:29:25 +00:00
Emilio Cobos Álvarez f9bd47e44b Bug 1626586 - Make history notifications do a bit less work. r=mak,lina,agi,snorp
And batch them when notifying child processes.

This makes RegisterVisitedQuery potentially notify synchronously, but changes
the code to deal with it properly.

Differential Revision: https://phabricator.services.mozilla.com/D69187

--HG--
extra : moz-landing-system : lando
2020-04-15 21:19:41 +00:00
Csoregi Natalia de8e762887 Backed out 7 changesets (bug 1625615) for multiple failures e.g. /test_windowedhistoryframes.html. CLOSED TREE
Backed out changeset f239d24658c9 (bug 1625615)
Backed out changeset acea7c78db20 (bug 1625615)
Backed out changeset d709f5a72c35 (bug 1625615)
Backed out changeset 4cd231b1f3fb (bug 1625615)
Backed out changeset 45942c8dc380 (bug 1625615)
Backed out changeset 3f03a8703a8a (bug 1625615)
Backed out changeset e9299fc48796 (bug 1625615)
2020-04-16 00:32:16 +03:00
alwu 4634c817c4 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

--HG--
extra : moz-landing-system : lando
2020-04-15 18:13:29 +00:00
Anny Gakhokidze 7c0eb4aad6 Bug 1594529 - Create LoadInfo for subdocuments directly in parent process with DocumentChannel. r=mattwoodrow,nika
Currently, with Fission enabled we are not able to create a proper LoadInfo
object when doing a subdocument load because we do not have access to a loading
context if the load is happening inside of an OOP frame. To solve this problem,
we can create LoadInfo object from scratch in the parent process where we have
all of the required information.

Differential Revision: https://phabricator.services.mozilla.com/D68893

--HG--
extra : moz-landing-system : lando
2020-04-15 18:53:06 +00:00
Kris Maglione 2033e946f0 Bug 1594529: Infer nsDocShell::IsFrame from BrowsingContext. r=nika
This fixes the content policy type for document loads in these frames, where
the explicit mIsFrame flag was not set, due to DocShell creation taking a
different code path in remote frames than in in-process frames.

Differential Revision: https://phabricator.services.mozilla.com/D52093

--HG--
extra : moz-landing-system : lando
2020-04-15 18:53:22 +00:00
Jonathan Kingston b5343020a4 Bug 1594529 - Adding in asserts for LoadURI to ensure we have the correct contentPolicyType, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D70714

--HG--
extra : moz-landing-system : lando
2020-04-15 18:53:22 +00:00
Stefan Hindli fb36126f61 Backed out 15 changesets (bug 1607984) for causing very frequent reftest faiures CLOSED TREE
Backed out changeset 5497c90b03de (bug 1607984)
Backed out changeset 71dffa590c10 (bug 1607984)
Backed out changeset fdacabac2c54 (bug 1607984)
Backed out changeset 5f9fe17e46b8 (bug 1607984)
Backed out changeset 8f9058eb821d (bug 1607984)
Backed out changeset 025af7792f2a (bug 1607984)
Backed out changeset c7edd070b2f3 (bug 1607984)
Backed out changeset 8e7c95d322e8 (bug 1607984)
Backed out changeset e51f6b7a745c (bug 1607984)
Backed out changeset 979d99eb12d1 (bug 1607984)
Backed out changeset f554d4ce6718 (bug 1607984)
Backed out changeset fe84e5c64b4e (bug 1607984)
Backed out changeset 05d2032060db (bug 1607984)
Backed out changeset 07ce7b11fee9 (bug 1607984)
Backed out changeset 718d89be09d2 (bug 1607984)
2020-04-15 18:33:24 +03:00
Stefan Hindli c0c31630e6 Backed out 2 changesets (bug 1626573) for perma bc failures in browser/base/content/test/contextMenu/browser_contextmenu_loadblobinnewtab.js CLOSED TREE
Backed out changeset d2ee826f13fa (bug 1626573)
Backed out changeset cd9de3c507ff (bug 1626573)
2020-04-15 15:08:08 +03:00
Subhamoy Sengupta da366d3679 Bug 1626573 - P1 - BrowsingContext transmits BlobURL before loading an URI if URI is a BlobURL r=baku
Differential Revision: https://phabricator.services.mozilla.com/D69717

--HG--
extra : moz-landing-system : lando
2020-04-15 08:57:44 +00:00
Jean-Yves Avenard 6f520a712b Bug 1607984 - P12. Start parent load via DocumentChannel. r=mayhemer,nika,mattwoodrow
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

--HG--
extra : moz-landing-system : lando
2020-04-15 08:57:30 +00:00
Jean-Yves Avenard 08ff02a665 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

--HG--
extra : moz-landing-system : lando
2020-04-15 08:57:27 +00:00
Andreea Pavel bf1f43b298 Backed out 12 changesets (bug 1607984) for failing test_bug1339722.html on a CLOSED TREE
Backed out changeset 69c73391e8fc (bug 1607984)
Backed out changeset a3a28be516f9 (bug 1607984)
Backed out changeset 9f216e9bd32e (bug 1607984)
Backed out changeset 0b71b61415d5 (bug 1607984)
Backed out changeset 0fa85c9199a9 (bug 1607984)
Backed out changeset 4c661ed81cf2 (bug 1607984)
Backed out changeset 47beda24613f (bug 1607984)
Backed out changeset 348da0a8dd00 (bug 1607984)
Backed out changeset 3d6824e92c38 (bug 1607984)
Backed out changeset 1cfc8aad978c (bug 1607984)
Backed out changeset e11f4d334dc7 (bug 1607984)
Backed out changeset c499fa55d0f2 (bug 1607984)
2020-04-15 11:53:11 +03:00
Jean-Yves Avenard bb7dcaf857 Bug 1607984 - P12. Start parent load via DocumentChannel. r=mayhemer,nika,mattwoodrow
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

--HG--
extra : moz-landing-system : lando
2020-04-15 07:07:06 +00:00
Jean-Yves Avenard 139a710989 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

--HG--
extra : moz-landing-system : lando
2020-04-15 06:02:46 +00:00
Stefan Hindli c14ed0bdbb Backed out changeset 16bfa5c1f2ca (bug 1594529) for mochitest permafailures in builds/worker/checkouts/gecko/docshell/base/nsDocShell.cpp CLOSED TREE 2020-04-15 09:28:56 +03:00
Stefan Hindli 1b55e83f7a Backed out 2 changesets (bug 1594529) for causing perma wpt2 with ValueError: badly formed hexadecimal UUID string in /cookies/samesite/iframe-reload.https.html CLOSED TREE
Backed out changeset fbf55a44d7fb (bug 1594529)
Backed out changeset 4ba9a230586a (bug 1594529)
2020-04-15 08:41:10 +03:00
Jonathan Kingston 740b0cb1d4 Bug 1594529 - Adding in asserts for LoadURI to ensure we have the correct contentPolicyType, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D70714

--HG--
extra : moz-landing-system : lando
2020-04-14 19:13:15 +00:00
Anny Gakhokidze 1fc287f151 Bug 1594529 - Create LoadInfo for subdocuments directly in parent process with DocumentChannel. r=mattwoodrow,nika
Currently, with Fission enabled we are not able to create a proper LoadInfo
object when doing a subdocument load because we do not have access to a loading
context if the load is happening inside of an OOP frame. To solve this problem,
we can create LoadInfo object from scratch in the parent process where we have
all of the required information.

Differential Revision: https://phabricator.services.mozilla.com/D68893

--HG--
extra : moz-landing-system : lando
2020-04-13 23:00:43 +00:00
Kris Maglione c2aef15803 Bug 1594529: Infer nsDocShell::IsFrame from BrowsingContext. r=nika
This fixes the content policy type for document loads in these frames, where
the explicit mIsFrame flag was not set, due to DocShell creation taking a
different code path in remote frames than in in-process frames.

Differential Revision: https://phabricator.services.mozilla.com/D52093

--HG--
extra : moz-landing-system : lando
2020-04-13 22:41:37 +00:00
Tetsuharu OHZEKI 10d22df012 Bug 1594283 - part 2: Rename nsIDocShell::GetSameTypeParentIgnoreBrowserBoundaries to nsIDocShell::GetSameTypeInProcessParentIgnoreBrowserBoundaries. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D70549

--HG--
extra : moz-landing-system : lando
2020-04-14 19:17:21 +00:00
Tetsuharu OHZEKI 17887cd83a Bug 1594283 - part 1: Remove nsIDocShell::GetSameTypeRootTreeItemIgnoreBrowserBoundaries(). r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D67352

--HG--
extra : moz-landing-system : lando
2020-04-10 18:33:18 +00:00
Micah Tigley dc7c4bf3db Bug 1500672 - Part 1: Add MaxTouchPointsOverride to BrowsingContext. r=bradwerth,smaug
Differential Revision: https://phabricator.services.mozilla.com/D70129

--HG--
extra : moz-landing-system : lando
2020-04-14 13:41:33 +00:00
Chris Peterson 72e3388f74 Bug 1628961 - Replace MOZ_MUST_USE with [[nodiscard]] in docshell and uriloader. r=smaug
Also move MOZ_MUST_USE before function declarations' specifiers and return type. While clang and gcc's __attribute__((warn_unused_result)) can appear before, between, or after function specifiers and return types, the [[nodiscard]] attribute must precede the function specifiers.

I also needed to wrap the nsDocLoader::RemoveChildLoader() function declaration with // clang-format off and // clang-format on. clang-format insists on indenting the function declaration because it is confused by the NS_DECL_ macros without trailing semicolons before the [[nodiscard]] attribute.

Differential Revision: https://phabricator.services.mozilla.com/D70478

--HG--
extra : moz-landing-system : lando
2020-04-14 06:41:42 +00:00
Csoregi Natalia 954b969608 Backed out 5 changesets (bug 1615588) for browser-chrome failures e.g. browser_beforeunload_duplicate_dialogs.js. CLOSED TREE
Backed out changeset 751cca7566a8 (bug 1615588)
Backed out changeset 474aca043834 (bug 1615588)
Backed out changeset 7839b95ef76c (bug 1615588)
Backed out changeset 32bb87f48b13 (bug 1615588)
Backed out changeset 264e642042b1 (bug 1615588)

--HG--
extra : rebase_source : 41ed149c97382bc1cf823abc56811b382cae0207
2020-04-10 21:19:15 +03:00
pbz 2f0f0d62d1 Bug 1615588 - Extended nsIPromptService to support tab modal prompts. r=johannh,MattN
This patch introduces a new tab modal system prompt type. It can be opened via the nsIPromptService
with a destination BrowsingContext. These tab system prompts overlap slightly with the upper
chrome UI to differentiate them from content prompts (previously called tab prompts).

- Extended nsIPromptService and nsIPrompt to accept 3 types of modal prompts:
  - Window prompts
  - Tab (system) prompts
  - Content prompts (the old tab prompts)
- Removed prompt code from Prompter.jsm, always call PromptParent window actor instead
- Added PromptChild window actor to forward pagehide events to parent actor
- Created additional prompt methods in nsIPromptService to prompt by browsingContext and modalType
- Backwards compatibility is maintained, consumers can still open content prompts calling nsIPrompt with a content window

Differential Revision: https://phabricator.services.mozilla.com/D66446

--HG--
extra : moz-landing-system : lando
2020-04-10 16:47:00 +00:00
Dylan Roeh 9541273b5d Bug 1619798 - Move GeckoView onLoadRequest calls to DocumentLoadListener.cpp r=snorp,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D69594

--HG--
extra : moz-landing-system : lando
2020-04-10 16:38:48 +00:00
James Willcox 9b0c905638 Bug 1620657 - Add a native impl of nsIExternalHelperAppService for Android r=mattwoodrow,geckoview-reviewers,droeh
This is needed in order to implement `CreateListener()`, which is used
when DocumentChannel is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D67682

--HG--
extra : moz-landing-system : lando
2020-04-10 15:53:19 +00:00
Ciure Andrei 130b66d511 Backed out 2 changesets (bug 1626573) for causing lint failures CLOSED TREE
Backed out changeset 0d461e174640 (bug 1626573)
Backed out changeset 00443a958bbc (bug 1626573)
2020-04-09 15:54:59 +03:00
Subhamoy Sengupta 191683acc9 Bug 1626573 - P1 - BrowsingContext transmits BlobURL before loading an URI if URI is a BlobURL r=baku
Differential Revision: https://phabricator.services.mozilla.com/D69717

--HG--
extra : moz-landing-system : lando
2020-04-09 11:50:32 +00:00
Kris Maglione 46bf54858f Bug 1626404: Part 4 - Remove now-redundant accessor args from BrowsingContext load methods. r=nika CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D69421

--HG--
extra : source : 4a3b391e08c420cc8289bd80d1b9229d4b41b24f
extra : intermediate-source : 453b858f4462272af20b61cdddc99b6c8e90bee9
2020-04-08 19:04:47 +00:00
Kris Maglione 2a1b613f3f Bug 1626404: Part 3 - Do sandbox flag checks at both ends of cross-process loads. r=nika CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D69420

--HG--
extra : source : 1a5a559ec6d509167cb58b40086add58c4d63e10
extra : intermediate-source : f54ce6a36c75cb6384306fda5402c51f27bb4c5e
2020-04-04 02:42:39 +00:00
Kris Maglione ca908cb413 Bug 1626404: Part 2b - Serialize source BC with LoadState. r=nika CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D69419

--HG--
extra : source : 2ffdab0072e7dbc56d232537aafbd2c1aa80ef14
extra : intermediate-source : ec63b18da4b9c1eb280f77a800e0e987aa3f20fa
2020-04-04 02:42:42 +00:00
Kris Maglione 9742588080 Bug 1626404: Part 2a - Store source BrowsingContext rather than DocShell in LoadState. r=nika CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D69418

--HG--
extra : source : 6fb384961b99821bacfd2702d36bff27231c96a7
extra : intermediate-source : b0d4b213b819d2346b1026122335553b77d63cae
2020-04-04 02:42:44 +00:00
Kris Maglione 5723600436 Bug 1626404: Part 1 - Move IsSandboxedFrom to BrowsingContext. r=nika CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D69417

--HG--
extra : source : c0c2e85e33da4512a738ab9e334b9d1a78c54cbd
extra : intermediate-source : af763de00e9d87ff8244ba1da1d0fca3e7a9017c
2020-04-04 02:42:30 +00:00