Commit Graph

408 Commits

Author SHA1 Message Date
Matt Woodrow
de29a4b06c Bug 1578624 - P4: Add an option to set mIsNavigating on the docshell when loading using BrowsingContext. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D44760
2019-10-09 06:37:50 +00:00
Narcis Beleuzu
eab5ec4098 Backed out 11 changesets (bug 1578624) for bustages on WindowGlobalChild.h . CLOSED TREE
Backed out changeset 478897956ee0 (bug 1578624)
Backed out changeset ab9c09164df0 (bug 1578624)
Backed out changeset f461f10efa46 (bug 1578624)
Backed out changeset 9b958693a003 (bug 1578624)
Backed out changeset 3b8220a15051 (bug 1578624)
Backed out changeset 180407dc57a8 (bug 1578624)
Backed out changeset bb11892e2171 (bug 1578624)
Backed out changeset 4f5c28244290 (bug 1578624)
Backed out changeset 6c02bbe5c1c5 (bug 1578624)
Backed out changeset 1d762fdce921 (bug 1578624)
Backed out changeset 818bc6e20c7d (bug 1578624)
2019-10-09 08:52:25 +03:00
Matt Woodrow
3ff163e470 Bug 1578624 - P6: Add LoadURI to BrowsingContext's webidl. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D44762
2019-10-09 04:34:40 +00:00
Matt Woodrow
201ce8f7dd Bug 1578624 - P5: Add DisplayLoadError to BrowsingContext. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D44761
2019-10-09 04:34:12 +00:00
Matt Woodrow
378756e2da Bug 1578624 - P4: Add an option to set mIsNavigating on the docshell when loading using BrowsingContext. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D44760
2019-10-09 04:50:16 +00:00
Kris Maglione
d38c2cdbe4 Bug 1586119: Part 2 - Fix some more tests to almost work under Fission. r=mccr8
These still fail or timeout because of missing platform features, but at least
the tests will pass once those platform features are fixed after this.

Differential Revision: https://phabricator.services.mozilla.com/D48221
2019-10-04 21:50:34 +00:00
shindli
2238702c0a Backed out changeset c211bfbf59b2 (bug 1585747) for causing mochitest permafailures in /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/BrowsingContextGroup CLOSED TREE 2019-10-04 12:02:59 +03:00
Julian Descottes
4ae9605e64 Bug 1585747 - Remove devtools-specific workaround in BrowsingContext.cpp r=nika
Depends on D47963

This workaround was only used by DevTools when using a chrome frame. DevTools toolbox now always uses frame type=content, so the workaround can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D47964
2019-10-04 07:03:49 +00:00
Nika Layzell
c04b4f7187 Bug 1584467 - Don't clear EmbedderInnerWindowId when destroying frame, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D47633
2019-10-01 08:48:25 +00:00
Nika Layzell
ba08b2ed0b Bug 1582237 - Expose embedder inner window ID on BrowsingContext in all processes, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D46802
2019-09-26 16:16:32 +00:00
Brindusan Cristian
8633c6f1f4 Backed out 2 changesets (bug 1582716, bug 1575051) for gv-junit failures, new exception. CLOSED TREE
Backed out changeset b5aa3ac4483e (bug 1582716)
Backed out changeset c385531b4ee3 (bug 1575051)
2019-09-24 19:47:00 +03:00
Andreas Farre
adc8fc7fb5 Bug 1575051 - Remove nsIDocShellTreeItem.findItemWithName. r=kmag
This also allows us to remove TabGroup::FindItemWithName, which is a
big step towards removing TabGroup entirely.

Differential Revision: https://phabricator.services.mozilla.com/D46285
2019-09-24 13:16:26 +00:00
Brindusan Cristian
f52298b70e Backed out changeset 0ebd1612a4ae (bug 1575051) for gv-junit crashes and bc failures on browser_browsingContext-02.js. CLOSED TREE 2019-09-24 15:08:41 +03:00
Andreas Farre
24fa934f6b Bug 1575051 - Remove nsIDocShellTreeItem.findWithName. r=kmag
This also allows us to remove TabGroup::FindItemWithName, which is a
big step towards removing TabGroup entirely.

Differential Revision: https://phabricator.services.mozilla.com/D46285
2019-09-24 10:58:47 +00:00
arthur.iakab
5b1aa0ae65 Merge inbound to mozilla-central. a=merge 2019-09-21 13:00:40 +03:00
Kris Maglione
fdb36a21b5 Bug 1553804: Part 3 - Assert we never create chrome BrowsingContexts in/send them to child processes. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D45328
2019-09-20 04:43:46 +00:00
Kris Maglione
dbb202a569 Bug 1553804: Part 2 - Assert opener BrowsingContext type always matches its own type. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D45327
2019-09-20 04:43:39 +00:00
Edgar Chen
d161044379 Bug 1578355 - Part 3: Add the ability to consume transient user activation; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D45353
2019-09-20 11:10:13 +00:00
Edgar Chen
486c0f7a75 Bug 1578355 - Part 2: Introduce UserActivation::State; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D45344
2019-09-20 11:10:13 +00:00
Daniel Varga
0c8477fc87 Backed out 3 changesets (bug 1578355) for build bustage at build/src/dom/base/nsSyncLoadService.h:48:21. On a CLOSED TREE
Backed out changeset d50ad759f129 (bug 1578355)
Backed out changeset 339ab54ca471 (bug 1578355)
Backed out changeset 284299dac42c (bug 1578355)
2019-09-20 14:05:12 +03:00
Edgar Chen
162581b056 Bug 1578355 - Part 3: Add the ability to consume transient user activation; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D45353
2019-09-20 10:31:59 +00:00
Edgar Chen
8eb796eeb5 Bug 1578355 - Part 2: Introduce UserActivation::State; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D45344
2019-09-20 10:31:57 +00:00
Daniel Varga
58aaa6e957 Backed out 6 changesets (bug 1553804) for browser-chrome failure at browser/base/content/test/general/browser_fullscreen-window-open.js. On a CLOSED TREE
Backed out changeset 86b3d469b4ff (bug 1553804)
Backed out changeset 301e0d883a5f (bug 1553804)
Backed out changeset acff4a663671 (bug 1553804)
Backed out changeset 1574aecf3177 (bug 1553804)
Backed out changeset 3acf056e792e (bug 1553804)
Backed out changeset 1ed250faeb2e (bug 1553804)
2019-09-20 10:09:54 +03:00
Kris Maglione
f4ed199c1f Bug 1553804: Part 3 - Assert we never create chrome BrowsingContexts in/send them to child processes. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D45328
2019-09-20 04:43:46 +00:00
Kris Maglione
7770a0ac54 Bug 1553804: Part 2 - Assert opener BrowsingContext type always matches its own type. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D45327
2019-09-20 04:43:39 +00:00
Junior Hsu
c2d40549a9 Bug 1579012 - use COOP in top-levl browsing context of opener for iframe r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D45582
2019-09-12 14:44:16 +00:00
Kris Maglione
89e21d6e79 Bug 1574593: Silently ignore load attempt on/from discarded BrowsingContext. r=nika
The (non-normative) window.open spec does not specify what should happen when
window.open is called on a window with a null/discarded browsing context, but
in general the lookup and creation rules do not make sense when the window has
no BC. It does, however, specify that we should return null when a target BC
cannot be found or created, and gives us broad discretion over when we decide
to ignore a load request and return null. Since we can't trigger a
cross-process load from a discarded BC, simply aborting in that case seems
like the logical solution.

For Location objects, the spec is more specific, and requires that we ignore
load attempts on Location objects whose documents are null, which in our
implementation corresponds to a discarded BrowsingContext.
LocationBase::SetURI already enforces this, but a second check in
BrowsingContext::LoadURI is probably a good idea as well.

Differential Revision: https://phabricator.services.mozilla.com/D45635
2019-09-12 11:37:01 +00:00
Andreas Farre
fee24f7a71 Bug 1560110 - Cache children of detached browsing contexts. r=nika
To be able to reach all BrowsingContexts in
BrowsingContextGroup::EnsureSubscribed we need to make sure that if a
BrowsingContext is detached, we need to cache all of its children in
case we call BrowsingContextGroup::EnsureSubscribed before the
children in turn are detached.

Differential Revision: https://phabricator.services.mozilla.com/D45337
2019-09-10 15:37:54 +00:00
Nika Layzell
52ad660fe5 Bug 1579437 - Check for discarded BrowsingContext in more places, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D45088
2019-09-09 12:04:13 +00:00
Edgar Chen
c8f8d4b1b0 Bug 1577499 - Part 1: Implement transient activation flag; r=smaug
https://github.com/whatwg/html/pull/3851

Differential Revision: https://phabricator.services.mozilla.com/D44479
2019-09-07 19:12:20 +00:00
Edgar Chen
4327dc19b1 Bug 1577175 - Part 1: Set UserGestureActivation in all ancestor of the BrowsingContext that user has interacted with; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D44358
2019-09-02 22:25:57 +00:00
Kris Maglione
358b648b28 Bug 1576407: Part 1 - Add HadOriginalOpener flag to BrowsingContext. r=farre
This is currently only available on the outer window, but needs to move to
BrowsingContext in order from us to remove redundant opener tracking from the
former.

Differential Revision: https://phabricator.services.mozilla.com/D43690
2019-08-28 18:07:31 +00:00
Mihai Alexandru Michis
5bf8e80ffd Backed out 6 changesets (bug 1576407) for causing wpt and mochitest failures. CLOSED TREE
Backed out changeset 3b0498064cbf (bug 1576407)
Backed out changeset 38e4ea431445 (bug 1576407)
Backed out changeset 19bf40067233 (bug 1576407)
Backed out changeset 0ddbc451dcab (bug 1576407)
Backed out changeset 08d4c25fc670 (bug 1576407)
Backed out changeset be7cbc61f825 (bug 1576407)
2019-08-29 03:00:47 +03:00
Kris Maglione
1d5f606615 Bug 1576407: Part 1 - Add HadOriginalOpener flag to BrowsingContext. r=farre
This is currently only available on the outer window, but needs to move to
BrowsingContext in order from us to remove redundant opener tracking from the
former.

Differential Revision: https://phabricator.services.mozilla.com/D43690
2019-08-28 18:07:31 +00:00
Kris Maglione
984813c612 Bug 1532994: Part 2 - Support SetHref() and Replace() in RemoteLocationProxy. r=farre
MANUAL PUSH: Can't update phabricator patch.

Differential Revision: https://phabricator.services.mozilla.com/D43328
2019-08-23 16:20:37 -07:00
Kris Maglione
b6c1b7ff06 Bug 1532994: Part 1 - Move cross-origin-accessible Location logic to base class. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D43327
2019-08-23 15:26:51 -07:00
Abdoulaye O. Ly
dfe95e81d9 Bug 1562990 - [Fission] Make AudioPlayback work with JSWindowActor. r=NeilDeakin,farre
Differential Revision: https://phabricator.services.mozilla.com/D36648
2019-08-19 21:17:21 +00:00
Brindusan Cristian
d6b0ae3ead Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-08-15 12:50:36 +03:00
Jon Coppeard
84f9d85099 Bug 1573844 - Remove external references to js::Class r=mccr8
Depends on D41985

Differential Revision: https://phabricator.services.mozilla.com/D41986
2019-08-14 17:15:15 +00:00
Andrew McCreight
b9c5444472 Bug 1559489, part 4 - Remote-to-local window transplanting. r=tcampbell,bzbarsky
This patch cleans up remote outer window proxies when we navigate back
into the process.

It adds a flag to mDanglingRemoteOuterProxies that is set in between
BrowsingContext::SetDocShell(), where we can tell that the browsing
context is going from being remote to being local, to
nsGlobalWindowOuter::SetNewDocument(), where the local outer window
proxy is actually created. Once the outer window is created, the
remote window proxies can be cleaned up in
CleanUpDanglingRemoteOuterWindowProxies().

The clean up is done by a process that is similar to object
transplanting, except that instead of looking in the cross-compartment
wrapper table for each compartment to find objects to be turned into
CCWs to the new object, it looks in the remote proxy map for each
compartment. SpiderMonkey doesn't know about the proxy maps, so this
has to be done by a new callback object CompartmentTransplantCallback.

Now that this cleanup is being done, it shouldn't be possible to wrap
a remote outer window proxy when the browsing context is local, so
MaybeWrapWindowProxy() can be simplified. I had to drop the assert
here that the browsing context has a window proxy because during clean
up we call wrap on a local outer window proxy before the BC gets the
window proxy set on it. I had the assert because my original plan was
to implicitly fix remote proxies during wrapping, but that is no
longer necessary.

Differential Revision: https://phabricator.services.mozilla.com/D38343
2019-08-13 19:09:59 +00:00
Sylvestre Ledru
3067b10938 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D41559
2019-08-13 07:15:25 +00:00
Nika Layzell
a090090326 Bug 1571063 - Simplify BrowsingContext field sync logic, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D40524
2019-08-09 14:51:30 +00:00
Daniel Varga
7076f626c1 Backed out changeset 14e11bbc0dd3 (bug 1571063) for geckoview-web-platform-tests failures at /html/cross-origin/anonymous.tentative.html 2019-08-09 00:02:18 +03:00
Junior Hsu
69d6023ba0 Bug 1543068 - P1.5 Remove InheritedEmbedderPolicy r=nika
I believe it's the right thing to do.
COEP inherits opener's COEP and is overwritten if COEP by response is stricter.
i.e., we no more need the inherited one.

Differential Revision: https://phabricator.services.mozilla.com/D40143
2019-08-08 18:56:30 +00:00
Junior Hsu
8cbdc3d3eb Bug 1543068 - P1 Substitute Cross-Origin header with COEP r=nika
(a) Substitute Cross-Origin header with COEP
(b) Forcing cors in FetchDriver is removed since COEP doesn't need to IIUC

Differential Revision: https://phabricator.services.mozilla.com/D38788
2019-08-08 18:38:03 +00:00
Kris Maglione
6c6f6fb7d9 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
2019-08-07 16:59:30 +00:00
Nika Layzell
c942bb4df9 Bug 1571063 - Simplify BrowsingContext field sync logic, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D40524
2019-08-07 17:07:19 +00:00
Kris Maglione
c59c54711f 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
2019-07-31 11:40:39 -07:00
Andrew McCreight
53537fa230 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
2019-07-18 19:36:19 +00:00
Andrew McCreight
d572a4de73 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
2019-07-18 19:36:17 +00:00