Commit Graph

6050 Commits

Author SHA1 Message Date
Nika Layzell
15f2abf9e1 Bug 1523638 - Part 8: Remove unused arguments from nsDocShell::Embed(), r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D37655

--HG--
extra : moz-landing-system : lando
2019-08-08 16:07:10 +00:00
Nika Layzell
4b42c1ee29 Bug 1523638 - Part 4: Move NextWindowId logic into nsContentUtils, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D37651

--HG--
extra : moz-landing-system : lando
2019-08-08 16:07:03 +00:00
Kris Maglione
64c062d570 Bug 1570773: Move browsingContext getter to nsIDocShellTreeItem and add notxpcom variant. r=nika
This also renames the existing infallible nsDocShell:GetBrowsingContext()
getter to BrowsingContextRef(), and changes the return type, since several
callers rely on it returning a raw pointer rather than an already_AddRefed.

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

--HG--
extra : moz-landing-system : lando
2019-08-07 16:59:30 +00:00
Jared Wein
6aa4a70824 Bug 1571567 - Fix no-fallthrough errors in /docshell. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D40873

--HG--
extra : moz-landing-system : lando
2019-08-08 15:18:43 +00:00
Bogdan Tara
844afcfb06 Backed out 10 changesets (bug 1571567) complementary backout after es lint failure on the patch CLOSED TREE
Backed out changeset ce83fa75ae32 (bug 1571567)
Backed out changeset 7aa97ba7cce9 (bug 1571567)
Backed out changeset 777d79076e99 (bug 1571567)
Backed out changeset fbdf6b75a484 (bug 1571567)
Backed out changeset e2ed4620f232 (bug 1571567)
Backed out changeset 2c67015f12c6 (bug 1571567)
Backed out changeset 7ec086bb5bd5 (bug 1571567)
Backed out changeset 42df735c8556 (bug 1571567)
Backed out changeset 7d5fc57b2809 (bug 1571567)
Backed out changeset 606bafb8211c (bug 1571567)
2019-08-08 18:13:54 +03:00
Brian Hackett
b4fe5d6573 Bug 1571926 - Don't record timeline consumers mutex, r=froydnj.
Differential Revision: https://phabricator.services.mozilla.com/D40905

--HG--
extra : moz-landing-system : lando
2019-08-08 14:54:58 +00:00
Jared Wein
94afc049c5 Bug 1571567 - Fix no-fallthrough errors in /docshell. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D40873

--HG--
extra : moz-landing-system : lando
2019-08-08 01:38:50 +00:00
Kannan Vijayan
e53a880b1c Bug 1569262 - Rename nsIDocShellTreeItem::GetRootTreeItem to GetInProcessRootTreeItem for Fission marking. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D41064

--HG--
extra : moz-landing-system : lando
2019-08-07 19:24:00 +00:00
Nika Layzell
ea27710b35 Bug 1571063 - Simplify BrowsingContext field sync logic, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D40524

--HG--
extra : moz-landing-system : lando
2019-08-07 17:07:19 +00:00
Cosmin Sabou
e4f9e5434e Bug 1570953 - Disable docshell/test/navigation/test_reserved.html on fission cause of frequent failures. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D40940

--HG--
extra : moz-landing-system : lando
2019-08-07 15:02:43 +00:00
Kris Maglione
c01ad83372 Bug 1571502: Don't leak TabGroups which have never had windows joined to them. r=nika
Currently, TabGroups know to break their reference cycles only when the last
window leaves them. For TabGroups which have never had a window join (which
happens under Fission), this means they also never see a window leave, and
therefore never break their reference cycles, and leak.

This patch adds a check to break reference cycles if no windows have joined by
the time a BrowserChild they belong to is destroyed.

MANUAL PUSH: Lando fails to rebase.

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

--HG--
extra : source : 03acb28ab60fb77fa06064385a62cc46cf4ad1bd
extra : amend_source : 0a71625d99951bebe45ee6f62570de491a714e97
2019-08-02 18:19:53 -07:00
Bogdan Tara
a252740d31 Backed out 7 changesets (bug 1565689) for browser chrome failures CLOSED TREE
Backed out changeset 36ea91bf28f7 (bug 1565689)
Backed out changeset 278340adf69c (bug 1565689)
Backed out changeset 4f508252b015 (bug 1565689)
Backed out changeset faaa4e9ba8d3 (bug 1565689)
Backed out changeset 177f2b26c892 (bug 1565689)
Backed out changeset ba665f96330d (bug 1565689)
Backed out changeset 0de7b1db3ef9 (bug 1565689)
2019-08-06 04:09:19 +03:00
alwu
3608731279 Bug 1565689 - part5 : control media from chrome process. r=farre,baku
This patch implements how to use MediaController to control corresponding media in content processes.

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

--HG--
extra : moz-landing-system : lando
2019-08-05 17:32:27 +00:00
Kris Maglione
22592538f5 Bug 1561015: Part 1 - Use BrowsingContext in window provider APIs. r=bzbarsky,mossop
This is the first step in making it possible to return remote WindowProxy
objects from window.open() and related APIs.

This patch also incidentally fixes a bug where getContentWindowOrOpenURI
returned the top-level browser window rather than the new content window when
passed OPEN_NEWWINDOW for the `aWhere` parameter. This was not the expected
behavior, and was a potentially major footgun for any new users who expected
to always get the content window for the URL they were loading, rather than
sometimes getting a chrome browser window instead.

For now, that case just returns null, which is only a minor footgun, rather
than the major one we had before.

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

--HG--
extra : moz-landing-system : lando
2019-08-02 20:48:33 +00:00
Emilio Cobos Álvarez
cd0cc4ccd7 Bug 1570721 - Add a content viewer API to emulate color scheme. r=heycam
MANUAL PUSH: Reordering stacks is a pain (https://bugzilla.mozilla.org/show_bug.cgi?id=1481539)

Differential Revision: https://phabricator.services.mozilla.com/D40250
2019-08-02 15:18:41 +02:00
Kris Maglione
c563e8d733 Bug 1570207: Part 1 - Move CanAccess logic from DocShell to BrowsingContext. r=nika
This change is necessary in order to support named targeting of remote
BrowsingContexts, since the current arrangement only supports in-process
contexts. It also considerably simplifies the logic, since named targetting is
now restricted to the same TabGroup/BrowsingContextGroup, which in and of
itself guarantees that origin attributes will always match in the cases that
we care about.

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

--HG--
extra : rebase_source : 77795886ef762bd778ddd782608ffca294b7aee0
2019-07-31 11:40:39 -07:00
Kris Maglione
85c7f7187f Bug 1566186: Part 1 - Remove DocShell support for isolated mozbrowsers. r=nika
This functionality is currently unused, and blocks work needed to support
Fission.

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

--HG--
extra : rebase_source : 1d8fdea73d48c714112d13844f5110f7f1892dda
2019-07-16 16:40:19 -07:00
Benjamin
21dd2fda4b Fix Bug 1569889 by setting mIsFormSubmission in nsDocShellLoadState r=ckerschb
Ensure that IsFormSubmission is set in all constructors and can be serialized

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

--HG--
extra : moz-landing-system : lando
2019-07-30 19:45:36 +00:00
Kris Maglione
5497342199 Bug 1570097: Part 1 - Skip some additional tests that timeout on debug. r=mccr8
For some reason, these timeouts aren't reported as timeouts on automation. The
tests just fail after sitting for 5 minutes doing nothing. Locally, though,
they are reported as timeouts.

Either way, they make the test group run 15 minutes longer than necessary.

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

--HG--
extra : moz-landing-system : lando
2019-07-30 19:22:13 +00:00
Will Hawkins
bfcfe34e57 Bug 1459711: Ensure that navigation.performance.type is 2 when restoring a document from the session history. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D39551

--HG--
extra : moz-landing-system : lando
2019-07-29 20:28:38 +00:00
James Willcox
b9f7851a27 Bug 1561079 - Run nsILoadURIDelegate::handleLoadError() even if we wouldn't show an error page r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D36785

--HG--
extra : moz-landing-system : lando
2019-07-29 15:34:32 +00:00
Thomas Nguyen
180aa6b0a1 Bug 1566833 - Update to use ReferrerInfo in nsIWebBrowserChrome3 r=Gijs,snorp
Differential Revision: https://phabricator.services.mozilla.com/D38381

--HG--
extra : moz-landing-system : lando
2019-07-29 10:13:45 +00:00
Bogdan Tara
3736b292dc Merge inbound to mozilla-central. a=merge 2019-07-27 00:38:36 +03:00
Kannan Vijayan
3fb6190ec6 Bug 1559414 - Rename unaudited pre-fission methods with SameProcess for future audit burndown. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D39378

--HG--
extra : moz-landing-system : lando
2019-07-26 16:48:31 +00:00
Kris Maglione
87884612c0 Bug 1568035: Part 4 - Update test expections for Fission. r=mccr8
Some failures crept in and out after my last sets of annotations landed. This
patch updates most of the annotations to deal with them.

MANUAL PUSH: Lando won't let me land.

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

--HG--
extra : rebase_source : 4cfccf95c5bb2521533a9f5c4c25d67f414fb6f5
extra : histedit_source : c19187a3b3002e0eebdd809738b57641e1e432cd
2019-07-24 13:06:57 -07:00
Kris Maglione
ef02b3cbd8 Bug 1568035: Part 1 - Skip tests which cause shutdown leaks under Fission. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D39459

--HG--
extra : rebase_source : 594e7c17a8aa81f9b212ff1fa492a8ab8f40d5ee
2019-07-19 15:31:16 -07:00
Nicholas Nethercote
18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Kris Maglione
4bd4d680d4 Bug 1566952: Part 1 - Annotate mochitests that crash with Fission enabled. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D38725

--HG--
extra : rebase_source : 3e8b32b86b12b22d038baa770070a5c8095043c9
2019-07-17 13:37:48 -07:00
Ciure Andrei
c0756f3389 Backed out 10 changesets (bug 1523638) for causing high frequency Android 7.0 mochitests failures CLOSED TREE
Backed out changeset 644ceb2fe568 (bug 1523638)
Backed out changeset 27647ee7a927 (bug 1523638)
Backed out changeset 96f1ccb95570 (bug 1523638)
Backed out changeset b60a17ea716a (bug 1523638)
Backed out changeset 507e63186c5f (bug 1523638)
Backed out changeset 33255408ca61 (bug 1523638)
Backed out changeset d97b2d223616 (bug 1523638)
Backed out changeset eba2a0514cde (bug 1523638)
Backed out changeset d7065174c5c4 (bug 1523638)
Backed out changeset c21b361e175d (bug 1523638)
2019-07-23 05:13:32 +03:00
Nika Layzell
83236ff0f4 Bug 1523638 - Part 9: Use provided 'WindowGlobalChild' actors to create the initial about:blank document, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D37656

--HG--
extra : moz-landing-system : lando
2019-07-18 19:38:22 +00:00
Nika Layzell
67eb523bb4 Bug 1523638 - Part 8: Remove unused arguments from nsDocShell::Embed(), r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D37655

--HG--
extra : moz-landing-system : lando
2019-07-18 19:38:20 +00:00
Nika Layzell
5dc554280a Bug 1523638 - Part 4: Move NextWindowId logic into nsContentUtils, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D37651

--HG--
extra : moz-landing-system : lando
2019-07-18 19:38:12 +00:00
Benjamin
6da0bbfd32 Bug 1566453: Added flag to detect if a load was initiated by a form submission r=ckerschb
The flag in loadinfo can be used to detect if a load was initiated by a form submission. This is crucial for implmenting the CSP directive navigate-to. https://www.w3.org/TR/CSP3/#navigate-to-pre-navigate

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

--HG--
extra : moz-landing-system : lando
2019-07-22 13:41:47 +00:00
Cameron McCormack
3ed89287e3 Bug 1566215 - Part 6: Undo the insecure URI loading exception for the Layout Debugger. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D38416

--HG--
extra : moz-landing-system : lando
2019-07-22 04:48:46 +00:00
Thomas Nguyen
20e4651f5b Bug 1566417 - Update to use ReferrerInfo in prefetch and preload URI r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D38323

--HG--
extra : moz-landing-system : lando
2019-07-19 11:42:09 +00:00
Oana Pop Rus
eec75f66cd Merge inbound to mozilla-central. a=merge 2019-07-19 06:57:32 +03:00
Brindusan Cristian
7b5bfee772 Backed out changeset 1cf52744c859 (bug 1566417) for wpt failures at Element.h:2006. 2019-07-19 03:37:49 +03:00
Thomas Nguyen
9db3c041cf Bug 1566417 - Update to use ReferrerInfo in prefetch and preload URI r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D38323

--HG--
extra : moz-landing-system : lando
2019-07-18 20:36:46 +00:00
Andrew McCreight
8fb21424fa Bug 1510760, part 5 - Support local-to-remote window proxy transplanting. r=tcampbell,peterv
When a BrowsingContext changes from being local to remote, we have to
change all window proxies from being local to remote, using
transplanting. The actual window proxy becomes a remote window
proxy. Cross compartment wrappers (CCWs) to the window proxy also
become remote window proxies in their respective compartments, rather
than CCWs to a remote proxy in the old compartment of the window
proxy, because the window is no longer actually in that
compartment. This also avoids having to figure out what Xray behavior
for remote window proxies should be.

This patch uses the transplanting support I added to
GetRemoteOuterWindowProxy() in the previous patch to ensure that the
remote proxy map holds the correct value after transplanting finishes.

It drops the requirement that both arguments to JS_TransplantObject
have the same class, because we need to transplant a window proxy with
a remote window proxy. It also deals with this by not adding origobj
to the wrapper map unless it is a CCW, to handle transplanting to a
remote proxy.

The core design here, with the remote window proxies in every
compartment, is taken from a patch by peterv.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 19:36:19 +00:00
Andrew McCreight
ac69d4bf7b Bug 1510760, part 4 - Add transplant support to GetRemoteOuterWindowProxy(). r=peterv
When we call GetRemoteOuterWindowProxy in the middle of a transplant,
the remote proxy that the function returns will be almost immediately
swapped with some other object. Rather than trying to fix up the
remote proxy map when that happens, this patch adds a new argument
that is a pointer to the object, if any, that the remote proxy is
going to be swapped to. This will be used in the remote proxy map.

Having a value in the remote proxy map that is not a remote proxy
could cause issues if somebody ends up calling
GetRemoteOuterWindowProxy() a second time before the transplant has
finished. To avoid that, my patch asserts that we are returning an
object with the appropriate class.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 19:36:17 +00:00
Noemi Erli
1916d2be66 Backed out 5 changesets (bug 1510760) for bustages in nsGlobalWindowOuter.cpp
Backed out changeset 19a972ea7855 (bug 1510760)
Backed out changeset 524ac8b3040d (bug 1510760)
Backed out changeset 3bc5442338bc (bug 1510760)
Backed out changeset cb12d4068aca (bug 1510760)
Backed out changeset 75b769608cce (bug 1510760)
2019-07-18 19:18:47 +03:00
Andrew McCreight
85f5946629 Bug 1510760, part 5 - Support local-to-remote window proxy transplanting. r=tcampbell,peterv
When a BrowsingContext changes from being local to remote, we have to
change all window proxies from being local to remote, using
transplanting. The actual window proxy becomes a remote window
proxy. Cross compartment wrappers (CCWs) to the window proxy also
become remote window proxies in their respective compartments, rather
than CCWs to a remote proxy in the old compartment of the window
proxy, because the window is no longer actually in that
compartment. This also avoids having to figure out what Xray behavior
for remote window proxies should be.

This patch uses the transplanting support I added to
GetRemoteOuterWindowProxy() in the previous patch to ensure that the
remote proxy map holds the correct value after transplanting finishes.

It drops the requirement that both arguments to JS_TransplantObject
have the same class, because we need to transplant a window proxy with
a remote window proxy. It also deals with this by not adding origobj
to the wrapper map unless it is a CCW, to handle transplanting to a
remote proxy.

The core design here, with the remote window proxies in every
compartment, is taken from a patch by peterv.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 15:02:59 +00:00
Andrew McCreight
c7d6336a9d Bug 1510760, part 4 - Add transplant support to GetRemoteOuterWindowProxy(). r=peterv
When we call GetRemoteOuterWindowProxy in the middle of a transplant,
the remote proxy that the function returns will be almost immediately
swapped with some other object. Rather than trying to fix up the
remote proxy map when that happens, this patch adds a new argument
that is a pointer to the object, if any, that the remote proxy is
going to be swapped to. This will be used in the remote proxy map.

Having a value in the remote proxy map that is not a remote proxy
could cause issues if somebody ends up calling
GetRemoteOuterWindowProxy() a second time before the transplant has
finished. To avoid that, my patch asserts that we are returning an
object with the appropriate class.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 15:02:57 +00:00
Ciure Andrei
d835b44a76 Merge inbound to mozilla-central. a=merge 2019-07-18 06:46:41 +03:00
Kris Maglione
0962c2b731 Bug 1566182: Annotate mochitests that fail with Fission enabled. r=mccr8
My preference was to annotate most of the failing tests with `fail-if` so that
if they start passing, the `fail-if` needs to be removed and they need to keep
passing. That doesn't work for tests that timeout, or which trigger failures
from their cleanup functions, however, so those tests need skip-if. And tests
with fail in their cleanup functions likely leave the browser in an
inconsistent state for subsequent tests, anyway, so really should be skipped
regardless.

There are some remaining tests which still fail because of crashes. I chose
not to skip them here, but to fix the crashes in separate bugs instead.

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

--HG--
extra : rebase_source : 39ba8fec2e882cfe577c5f2b58ab7e4b461f1178
2019-07-15 16:19:32 -07:00
Kris Maglione
4503ade360 Bug 1563409: Inherit RemoteSubframes and RemoteTabs flags from parent docshells. r=nika
This also adds an extra assertion against browsing context mismatches that
happen when we don't get this right.

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

--HG--
extra : source : 4b07deb4cd2ef4c98b6d6ee961a20705f4f2deae
2019-07-03 16:09:20 -07:00
Kashav Madan
c2b56a6b32 Bug 1554070 - Ensure that the selected window has a targetable BrowsingContext, r=nika
When searching for a target by name, don't select a window if its associated
BrowsingContext is closed, discarded, or cached.

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

--HG--
extra : moz-landing-system : lando
2019-07-17 15:35:04 +00:00
Kashav Madan
2f3f4c3567 Bug 1527321 - Implement BrowsingContext::IsTargetable, r=nika
Renames IsActive to IsTargetable, and updates its implementation to check that
the current browsing context is neither closed nor cached.

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

--HG--
extra : moz-landing-system : lando
2019-07-17 15:31:04 +00:00
Jean-Yves Avenard
59c3f78447 Bug 1566153 - P2. Clean-up BrowsingContextGroup references when empty. r=nika
We can remove references held in the ContentChild and the ContentParent once the BrowsingContextGroup becomes empty.
This allows to break the cycles and the BrowsingContextGroup to be deleted.

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

--HG--
extra : moz-landing-system : lando
2019-07-17 00:31:38 +00:00
Bogdan Tara
ca45889546 Backed out 9 changesets (bug 1523638) for browser_contextmenu.js failures CLOSED TREE
Backed out changeset 0a584a07b696 (bug 1523638)
Backed out changeset 8c5af2289900 (bug 1523638)
Backed out changeset 40ed1bd64b09 (bug 1523638)
Backed out changeset 9a99a0391979 (bug 1523638)
Backed out changeset 07fb4748b91a (bug 1523638)
Backed out changeset 49047c3ebae9 (bug 1523638)
Backed out changeset d606d072126c (bug 1523638)
Backed out changeset 76dc1937fc77 (bug 1523638)
Backed out changeset c784c14b5d5d (bug 1523638)
2019-07-16 23:40:47 +03:00