Commit Graph

408 Commits

Author SHA1 Message Date
Gurzau Raul
a31d364d9b Backed out 4 changesets (bug 1525427) for failing at /browser_browsingContext-embedder.js on a CLOSED TREE.
Backed out changeset 0227a59eba8e (bug 1525427)
Backed out changeset 18fba79d8671 (bug 1525427)
Backed out changeset f7c82615ea05 (bug 1525427)
Backed out changeset 4a210c9266ed (bug 1525427)
2019-03-28 20:54:28 +02:00
Nika Layzell
527af262b0 Bug 1525427 - Part 1: Expose WindowGlobalParent & Element on BrowsingContext, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D25181
2019-03-28 15:03:54 +00:00
Nika Layzell
afb9031e34 Bug 1539069 - Part 2: Use field epochs to avoid racy field interactions, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D24976
2019-03-27 09:19:29 +00:00
Alastor Wu
4f26766702 Bug 1524065 - part1 : implement the way to resume delayed autoplay media via browsing context. r=farre
After enable Fission, we're not able to resume media in the different process, because the current way we use can only notify one process and would cause the media on other process can't be resumed.

Therefore, we should use the browsing context to notify the web content which might be on different processes.

Differential Revision: https://phabricator.services.mozilla.com/D18136
2019-03-20 03:15:36 +00:00
Nika Layzell
2f09d514de Bug 1532661 - Part 6: Clean up BrowsingContext references more reliably, r=farre
Depends on D23047

Differential Revision: https://phabricator.services.mozilla.com/D23048
2019-03-14 18:51:13 +00:00
Nika Layzell
78f37edc78 Bug 1532661 - Part 5: Make the BrowsingContext opener edge a weak reference, r=farre
Depends on D22193

Differential Revision: https://phabricator.services.mozilla.com/D23047
2019-03-14 18:51:11 +00:00
Nika Layzell
b816d81616 Bug 1532661 - Part 4: Support initializing complete BrowsingContextGroups in a single op with an IPCInitializer struct, r=farre
Depends on D22192

Differential Revision: https://phabricator.services.mozilla.com/D22193
2019-03-14 18:51:09 +00:00
Nika Layzell
41a40bdcc5 Bug 1532661 - Part 3: Add WillSetX and DidSetX callbacks for BrowsingContext synced fields, r=farre
Depends on D22191

Differential Revision: https://phabricator.services.mozilla.com/D22192
2019-03-14 18:51:07 +00:00
Nika Layzell
9b066f2565 Bug 1532661 - Part 2: Use a field list macro header for synced fields, r=farre
Depends on D22190

Differential Revision: https://phabricator.services.mozilla.com/D22191
2019-03-14 18:51:05 +00:00
Nika Layzell
e8be568970 Bug 1530550 - Synchronize mOpener and mIsActivatedByUserGesture with SYNCED_BC_FIELD, r=farre
Depends on D22764

Differential Revision: https://phabricator.services.mozilla.com/D21134
2019-03-14 18:50:55 +00:00
Nika Layzell
30c74d2ba9 Bug 1529684 - Part 6: Store a mIsInProcess flag to preserve WindowProxy behaviour, r=farre
Currently when we have an in-process WindowProxy object, we will attempt
to either use the cached mWindowProxy value, or fetch the
nsGlobalWindowOuter object from through the nsDocShell. Unfortunately,
when the BrowsingContext is detached, we will fail to get the
nsGlobalWindowOuter object. This happens to be OK for our test cases, as
the cached mWindowProxy value doesn't have the chance to go away, but
isn't acceptable long-term.

These patches exascerbated that issue by causing the nsDocShell pointer
itself to be cleared when it is destroyed, which caused the Remote
WindowProxy logic to be triggered. To deal with that case, this patch
adds a new mIsInProcess flag to continue to act like the old code-path.

In the future, we will need to also handle ensuring that the
nsGlobalWindowOuter lives for long enough, however that is not being
done in this patch in order to land it sooner rather than later.

Depends on D22763

Differential Revision: https://phabricator.services.mozilla.com/D22764
2019-03-14 18:50:54 +00:00
Nika Layzell
a77dc03c08 Bug 1529684 - Part 5: Support using remote window proxy objects in the parent process, r=farre
Depends on D22762

Differential Revision: https://phabricator.services.mozilla.com/D22763
2019-03-14 18:50:52 +00:00
Nika Layzell
a21d0de6d4 Bug 1529684 - Part 2: Create BrowsingContext for remote browsers in parent, r=farre
Depends on D21095

Differential Revision: https://phabricator.services.mozilla.com/D21096
2019-03-14 18:50:45 +00:00
Nika Layzell
5d21e8439d Bug 1529684 - Part 1: Allow Attaching BrowsingContext from parent to child, r=farre
This is important to allow creating BrowsingContexts outside of the process
where they are going to be used. This is largely a re-arrangement of existing
code.

There is currently no way to do this type of attaching for browsing contexts in
existing BrowsingContextGroups, which creates some limitations, but happens to
be sufficient for us in the current situation.

Differential Revision: https://phabricator.services.mozilla.com/D21095
2019-03-14 18:50:38 +00:00
Valentin Gosu
d9d32cc1be Bug 1525036 - Add CrossOriginPolicy to the browsing context r=nika
Differential Revision: https://phabricator.services.mozilla.com/D21418
2019-03-12 08:04:01 +00:00
Csoregi Natalia
f0b59895f9 Backed out 5 changesets (bug 1525036) for browser_httpCrossOriginHeader.js failures. CLOSED TREE
Backed out changeset 6717beb3ac53 (bug 1525036)
Backed out changeset 0c05686bd62a (bug 1525036)
Backed out changeset 502b0bb796cd (bug 1525036)
Backed out changeset fa0363d33dbd (bug 1525036)
Backed out changeset 6391f42aaa6d (bug 1525036)
2019-03-09 02:39:11 +02:00
Valentin Gosu
491f40b532 Bug 1525036 - Add CrossOriginPolicy to the browsing context r=nika
Differential Revision: https://phabricator.services.mozilla.com/D21418
2019-03-08 15:34:54 +00:00
Brindusan Cristian
0b488e34ba Backed out 4 changesets (bug 1530550, bug 1529684) for bc crashes at [@ mozilla::dom::BrowsingContext::Detach(bool)]. CLOSED TREE
Backed out changeset 289c2b4126c9 (bug 1530550)
Backed out changeset 9f3e65f6b1dd (bug 1529684)
Backed out changeset 257d45117af3 (bug 1529684)
Backed out changeset 7f2bda80e479 (bug 1529684)
2019-03-05 23:11:48 +02:00
Nika Layzell
1972d0f3a9 Bug 1530550 - Synchronize mOpener and mIsActivatedByUserGesture with SYNCED_BC_FIELD, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D21134
2019-03-05 17:33:52 +00:00
Nika Layzell
0f4d25c913 Bug 1529684 - Part 2: Create BrowsingContext for remote browsers in parent, r=farre
Depends on D21095

Differential Revision: https://phabricator.services.mozilla.com/D21096
2019-03-05 17:33:22 +00:00
Nika Layzell
49e15a4cbd Bug 1529684 - Part 1: Allow Attaching BrowsingContext from parent to child, r=farre
This is important to allow creating BrowsingContexts outside of the process
where they are going to be used. This is largely a re-arrangement of existing
code.

There is currently no way to do this type of attaching for browsing contexts in
existing BrowsingContextGroups, which creates some limitations, but happens to
be sufficient for us in the current situation.

Differential Revision: https://phabricator.services.mozilla.com/D21095
2019-03-05 17:33:19 +00:00
Gurzau Raul
ace66df7fd Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-03-01 09:28:28 +02:00
Peter Van der Beken
59d042a195 Bug 1518202 - Make RemoteObjectProxies add the edge to the native object to the CC. r=bzbarsky
Depends on D15848

Differential Revision: https://phabricator.services.mozilla.com/D21497
2019-02-28 19:34:02 +00:00
Peter Van der Beken
a2c6aeaafc Bug 1518202 - Add cross-process proxies for Location. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D15848
2019-02-28 18:23:15 +00:00
Ciure Andrei
a7a76404ec Backed out changeset c2091f595c72 (bug 1530550) for ,ultiple leakcheck failures CLOSED TREE 2019-02-28 02:56:12 +02:00
Nika Layzell
8c533140a6 Bug 1530550 - Synchronize mOpener and mIsActivatedByUserGesture with SYNCED_BC_FIELD, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D21134
2019-02-27 22:46:41 +00:00
Ryan Hunt
3d8d412bc2 Bug 1523969 part 5 - Move method definition inline comments to new line in 'docshell/'. r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D21105
2019-02-25 16:04:59 -06:00
Andreas Farre
166868f06a Bug 1523645 - Add transactions for syncing BrowsingContext fields. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D20187
2019-02-21 20:14:28 +00:00
Andreas Farre
ba1a36d6dc Bug 1525887 - Add set of ContentParent subscribed to BrowsingContextGroup. r=nika
Add the origin ContentParent to a CanonicalBrowsingContext's group
when a CanonicalBrowsingContext is created from IPC. With this it is
possible to keep track of all child processes associated with a
BrowsingContextGroup.

Differential Revision: https://phabricator.services.mozilla.com/D19004
2019-02-15 11:35:48 +00:00
Andreas Farre
7e78a8c763 Bug 1515646 - Add FindWithName and FindChildWithName to BrowsingContext. r=peterv
This implements the step of choosing a browsing context with
FindWithName, which should be equivalent to calling
nsIDocShellTreeItem.findItemWithName passing null for 'aRequestor' and
'aOriginalRequestor' and false for 'aSkipTabGroup'.

Differential Revision: https://phabricator.services.mozilla.com/D15190
2019-02-15 09:59:21 +00:00
Bogdan Tara
66f018790d Backed out changeset 70c5f8576e43 (bug 1525887) for PLDHashTable failures CLOSED TREE 2019-02-14 12:30:34 +02:00
Andreas Farre
4c0c29298a Bug 1525887 - Add set of ContentParent subscribed to BrowsingContextGroup. r=nika
Add the origin ContentParent to a CanonicalBrowsingContext's group
when a CanonicalBrowsingContext is created from IPC. With this it is
possible to keep track of all child processes associated with a
BrowsingContextGroup.

Differential Revision: https://phabricator.services.mozilla.com/D19004
2019-02-14 08:55:22 +00:00
Nika Layzell
206f68553f Bug 1516240 - Part 3: Directly pass BrowsingContext over IPC when possible, r=farre
This patch changes the logic such that we use the new direct
BrowsingContext ParamTraits implementation when possible, and avoids
doing manual lookups.

Depends on D19178

Differential Revision: https://phabricator.services.mozilla.com/D19179
2019-02-13 21:02:55 +00:00
Nika Layzell
392daeaff3 Bug 1516240 - Part 2: Allow serializing BrowsingContext over IPC, r=farre
This patch takes the approach of taking a reference, so that we can land
it into the tree more quickly & fix issues we have.

This isn't a final solution by any means, we should also do something
along the lines of the StableState approach, but it should be sufficient
for now.

Depends on D19177

Differential Revision: https://phabricator.services.mozilla.com/D19178
2019-02-13 21:02:53 +00:00
Sylvestre Ledru
0ac7481368 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D18488
2019-02-04 19:10:18 +00:00
Andreas Farre
0c68a9ae2e Bug 1521149 - Keep track of all BrowsingContext object in a BrowsingContextGroup r=nika
Differential Revision: https://phabricator.services.mozilla.com/D17003
2019-01-30 16:07:21 +00:00
Andreas Farre
00172c6fa5 Bug 1519910 - Rename ChromeBrowsingContext to CanonicalBrowsingContext. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D17957
2019-01-29 17:32:28 +00:00
Alastor Wu
0814e5cf06 Bug 1520037 - Reuse 'BrowsingContext::TopLevelBrowsingContext()'. r=nika
GetTop() can simply wrap the result from TopLevelBrowsingContext().

Differential Revision: https://phabricator.services.mozilla.com/D16511
2019-01-15 17:06:12 +00:00
Alastor Wu
82c98c3f2f Bug 1516482 - part3 : reset user gesture activation flag when top level document changes. r=nika
As the user gesture activation flag is a flag which is used to reflect whether the corresponding document of browsing context has been activated by user or not, we should reset the flag when the top level window changes its document.

Differential Revision: https://phabricator.services.mozilla.com/D16094
2019-01-14 23:21:05 +00:00
Alastor Wu
7b76361b80 Bug 1516482 - part2 : update user gesture activation flag across IPC. r=nika
Everytime we set the flag on top level BrowsingContext, it would automatically be sync to its corresponding ChromeBrowsingContext.

Differential Revision: https://phabricator.services.mozilla.com/D15436
2019-01-14 16:08:06 +00:00
Alastor Wu
4e5cac7a28 Bug 1516482 - part1 : save user gesture activation flag in top level browsing context r=nika
This patch moves the user gesture activation flag from saving in document to saving in browsing context. The flag would be saved in the top level browsing context and then every time we need to check for that flag, we will request it from top level browsing context.

Differential Revision: https://phabricator.services.mozilla.com/D15435
2019-01-14 23:09:42 +00:00
Jorg K
57ad9a8188 Bug 1353867 - Follow-up, take 2: revert rev c9a17c8a3c3f and add include of WindowProxyHolder.h where it was missing. r=bz 2019-01-03 09:11:00 +02:00
Peter Van der Beken
a4c053befe Bug 1353867 - Add cross-process proxies for WindowProxy. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D12656
2019-01-02 13:29:18 +00:00
Andreas Farre
e67d1d2ec7 Bug 1505838 - Add BrowsingContextGroup. r=peterv
Add top-level and auxiliary browsing contexts to a group of
BrowsingContexts on creation and store a pointer to that group in all
children of the BrowsingContexts in the group. With this it is
possible to compute the transitive closure of related browsing
contexts.

Since we'll not be using linked lists of BrowsingContexts for neither
groups nor children we can move children to be an array of
BrowsingContexts and adjust to use a the more convenient HashMap for
roots.

Differential Revision: https://phabricator.services.mozilla.com/D13227
2018-12-17 10:45:37 +00:00
Nika Layzell
00e5dee13f Bug 1500944 - Part 1: Store the set of active WindowGlobalParent objects in ChromeBrowsingContext, r=farre
This allows getting the set of all window globals for a given browsing context.
This is less useful at the moment as the active window global is not exposed as
such. That will be added as a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D9393
2018-12-05 10:18:33 -05:00
Sylvestre Ledru
e5a134f73a Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
Andreas Farre
ccbfafe238 Bug 1502330 - Create BrowsingContext with passed opener. r=qdot
By replacing nsWebBrowser's implementation of the
nsIBaseWindow.initWindow and nsIBaseWindow.create with a new static
nsWebBrowser::Create method we make it possible to pass arguments
directly when creating an nsWebBrowser, for example the opener
BrowsingContext. As a bonus we can do away with
nsWebBrowser::mInitInfo!

Differential Revision: https://phabricator.services.mozilla.com/D12634
2018-11-27 09:59:44 +00:00
Andreas Farre
376529f091 Bug 1502328 - Add opener member to BrowsingContext and expose through webidl. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D10580
2018-11-09 08:53:53 +00:00
Andreas Farre
6d1cb9a5de Bug 1480198 - Construct nsDocShell objects inside BrowsingContext. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D7400
2018-11-05 12:43:10 +00:00
Andreas Farre
f45379434e Bug 1480113 - Split parent process specific parts out of BrowsingContext r=peterv
Create ChromeBrowsingContext and move parent process specific parts
from BrowsingContext there. After that make sure that all
BrowsingContexts created in the parent process is actually
ChromeBrowsingContexts and all BrowsingContexts in the child processes
are BrowsingContexts.

Differential Revision: https://phabricator.services.mozilla.com/D5419
2018-09-14 14:57:18 +00:00