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

2365 Коммитов

Автор SHA1 Сообщение Дата
Gijs Kruitbosch 72186b2199 Bug 1638092 - do not require a browsingcontext to call the external protocol service's loadURI method, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D75543
2020-05-17 22:54:30 +00:00
Aaron Klotz be11f78f6a Bug 1637452: Part 10 - Fix JNI includes in dom/ipc; r=nika
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75373
2020-05-15 17:04:44 +00:00
Dorel Luca fc22d41aeb Backed out changeset 9bedd57840ed (bug 1637085) for WPT failures. CLOSED TREE 2020-05-15 05:37:57 +03:00
Kris Maglione 710c64adb4 Bug 1637085: Use AsyncShutdown for ContentParent shutdown. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74746
2020-05-13 16:38:11 +00:00
alwu af00afa1f0 Bug 1633010 - part5 : extend `IMediaInfoUpdater`. r=chunmin
This patch will do :
- make all functions which are used to update information from the content process become a part of `IMediaInfoUpdater`

The advantage of doing so :
- It's clear to use `IMediaInfoUpdater` as the only surface to update the media related status
- explictly restrict which functions are available which can avoid using control related functions on those situations

Differential Revision: https://phabricator.services.mozilla.com/D73489
2020-05-13 22:07:44 +00:00
alwu 12e184256b Bug 1633010 - part4 : move declared and guessed playback state into `MediaSessionController`. r=chunmin
This patch will do :
- move the logic of determining `actual playback state` to `MediaSessionController`

The advantage of doing so :
- increate the cohesion of `MediaSessionController` because it should be the class to determine the final playback status, not `MediaController`

Differential Revision: https://phabricator.services.mozilla.com/D73488
2020-05-13 21:18:06 +00:00
alwu 329f82761a Bug 1633010 - part3 : move MediaPlaybackStatus to MediaSessionController. r=chunmin
This patch will do :
- move the instance of `MediaPlaybackStatus` to the `MediaSessionController` to allow `MediaSessionController` handle all media related status

The advantage of doing so :
- encapsulate all media related status details to `MediaSessionController` and simplify the code in `MediaController`

Differential Revision: https://phabricator.services.mozilla.com/D73487
2020-05-13 20:58:02 +00:00
alwu 32695cee12 Bug 1633010 - part1 : send context Id as a parameter when updating media playback and audible state. r=bryce,chunmin
This patch will do :
- make `NotifyMediaPlaybackChanged` and `NotifyMediaAudibleChanged` accept one more paramter that indicates where those update come from

The advantage of doing so :
- we would use that to maintain separated media status for each different context in the future patch.

Differential Revision: https://phabricator.services.mozilla.com/D72471
2020-05-13 20:57:23 +00:00
Csoregi Natalia 517e830522 Backed out 4 changesets (bug 1629866, bug 1570255) for assertion failures on DocumentChannelChild.cpp. CLOSED TREE
Backed out changeset 214e4a11be0d (bug 1570255)
Backed out changeset db066dda1bb8 (bug 1570255)
Backed out changeset d9f75d88613e (bug 1570255)
Backed out changeset fe2d4790b73a (bug 1629866)
2020-05-13 18:30:42 +03:00
Gijs Kruitbosch 228e52aebe Bug 1196151 - use BrowsingContext for external helper app handling of protocols, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D74434
2020-05-11 13:13:03 +00:00
Peter Van der Beken c46091ad18 Bug 1570255 - Forward ChildSHistory::Go to the parent. r=smaug
This enables navigating by index in session history go through the
session history in the parent (if enabled with the pref).

If the pref is enabled, then ChildSHistory::Go will send an IPC message
to the parent with the index to navigate to. The parent calls the
existing nsSHistory implementation and starts the loads, and
asynchronously returns the index that we actually navigated to. The
child process then uses that result to update the session history
implementation in the child process (this part is temporary, while we
have session history both in parent and in child). We also make the
parent send an updated length to the child process over IPC, so that
history.length always the length for the implementation in the parent.

Differential Revision: https://phabricator.services.mozilla.com/D65330
2020-05-13 13:47:11 +00:00
Peter Van der Beken 879cba492c Bug 1570255 - Reboot session history in parent part 1. r=smaug,necko-reviewers,valentin
This adds a new implementation of nsISHEntry
(mozilla::dom::SessionHistoryEntry). When session history in the parent
is turned on, we'll instantiate the existing nsSHistory in the parent
process, but it will store entries of this new type. The nsSHistory in
the child process will also be instantiated for now, to avoid breaking
too many assumptions, and we try to keep parent and child
implementations in sync.

mozilla::dom::SessionHistoryEntry stores most of its data in a new
structure (mozilla::dom::SessionHistoryInfo) which can be sent over IPC.
When a load starts through the DocumentChannel we create an entry of
this new type for it in the parent process in
DocumentLoadListener::Open. The SessionHistoryInfo for that entry (with
an associated ID) is then sent over IPC in the RedirectToRealChannelArgs
to the process that does the actual load, where we store it in the
nsDocShell in mLoadingEntry (and mLoadingEntryId). The parent process
keeps track of outstanding loading entries in an array (mLoadingEntries)
in the CanonicalBrowsingContext. When a load finishes the nsDocShell
transfers mLoadingEntry into mActiveEntry, and notifies the parent
process through an IPC message (HistoryCommit) with the id of that
entry. The CanonicalBrowsingContext then removes the entry from the
array and stores it in its mActiveEntry, and adds the entry to the
nsSHistory object.

There are a number of things in this patch that are broken, and a lot of
FIXME comments. However, with the pref turned off things should just be
working as before. The goal is to land this first part, and then iterate
on the new implementation until we can switch over.

Differential Revision: https://phabricator.services.mozilla.com/D65329
2020-05-13 13:46:33 +00:00
Peter Van der Beken e2a88c491c Bug 1570255 - Remove sync session history implementation. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D65326
2020-05-13 14:24:55 +00:00
ssengupta cf852bbfb9 Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73868
2020-05-12 19:02:05 +00:00
Nika Layzell 136a1ffa7a Bug 1636279 - Part 1: Streamline WindowContext initialization, r=farre
This should make the flow of how data gets into the initial WindowContext state
more clear, and allows the setting of initial synced WindowContext fields.

Differential Revision: https://phabricator.services.mozilla.com/D74324
2020-05-08 20:44:12 +00:00
Tom Schuster 4f64f475f2 Bug 1595046 - Make it possible to inspect every exception value in the web console. r=jonco,baku,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D64437
2020-05-08 20:54:17 +00:00
Henri Sivonen 45aad1c320 Bug 1617788 - Restore focus in out-of-focus iframe after switching to another app and back even for non-keyboard causes. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D67878
2020-05-08 00:20:51 +00:00
Nika Layzell 9e0032b97f Bug 1633820 - Part 5: Get rid of UnsafeIPCTabContext, r=kmag
This variant was only used for service workers' openWindow method, which has
been changed to no longer behave in this way, meaning that the type can be
removed. The follow-up simplification of removing
'ContentChild::ProvideWindowCommon', and moving the logic directly into
'BrowserChild' is not done in this bug, and will be done in a follow-up instead.

Differential Revision: https://phabricator.services.mozilla.com/D72935
2020-05-07 22:18:56 +00:00
Nika Layzell 6cb771c699 Bug 1633820 - Part 4: Remove OriginAttributes from TabContext, r=kmag
This information is now redundant with 'BrowsingContext', meaning that it can be
omitted from the 'TabContext'.

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

Differential Revision: https://phabricator.services.mozilla.com/D72933
2020-05-07 22:49:06 +00:00
Razvan Maries 7a5b66f9b6 Backed out 5 changesets (bug 1633820) for build bustages at TabContext.cpp. CLOSED TREE
Backed out changeset 0a20dd1935d7 (bug 1633820)
Backed out changeset 626e834293ed (bug 1633820)
Backed out changeset 14cc454a8cbc (bug 1633820)
Backed out changeset 7bbcb9266b87 (bug 1633820)
Backed out changeset ef99672bd2af (bug 1633820)
2020-05-08 00:59:20 +03:00
Nika Layzell 6f9f8ba6b2 Bug 1633820 - Part 5: Get rid of UnsafeIPCTabContext, r=kmag
This variant was only used for service workers' openWindow method, which has
been changed to no longer behave in this way, meaning that the type can be
removed. The follow-up simplification of removing
'ContentChild::ProvideWindowCommon', and moving the logic directly into
'BrowserChild' is not done in this bug, and will be done in a follow-up instead.

Differential Revision: https://phabricator.services.mozilla.com/D72935
2020-05-07 17:18:58 +00:00
Nika Layzell d6a082e20a Bug 1633820 - Part 4: Remove OriginAttributes from TabContext, r=kmag
This information is now redundant with 'BrowsingContext', meaning that it can be
omitted from the 'TabContext'.

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

Differential Revision: https://phabricator.services.mozilla.com/D72933
2020-05-07 17:45:12 +00:00
Bogdan Tara 7fce40912d Backed out 5 changesets (bug 1633820) for bustages complaining about TabContext CLOSED TREE
Backed out changeset 4982d41d5e6b (bug 1633820)
Backed out changeset 9803c41e42f9 (bug 1633820)
Backed out changeset 2475bbab03a8 (bug 1633820)
Backed out changeset 762f0b2c154c (bug 1633820)
Backed out changeset f9ea871a0227 (bug 1633820)
2020-05-06 22:39:46 +03:00
Nika Layzell 44d7330cea Bug 1633820 - Part 5: Get rid of UnsafeIPCTabContext, r=kmag
This variant was only used for service workers' openWindow method, which has
been changed to no longer behave in this way, meaning that the type can be
removed. The follow-up simplification of removing
'ContentChild::ProvideWindowCommon', and moving the logic directly into
'BrowserChild' is not done in this bug, and will be done in a follow-up instead.

Differential Revision: https://phabricator.services.mozilla.com/D72935
2020-05-06 17:42:51 +00:00
Nika Layzell e6c0899f5d Bug 1633820 - Part 4: Remove OriginAttributes from TabContext, r=kmag
This information is now redundant with 'BrowsingContext', meaning that it can be
omitted from the 'TabContext'.

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

Differential Revision: https://phabricator.services.mozilla.com/D72933
2020-05-06 17:42:41 +00:00
Nika Layzell dcf520555c Bug 1634530 - Delete unused CheckBrowsingContextOwnership, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D73339
2020-04-30 19:50:14 +00:00
David Teller 1e228f42e9 Bug 1580448 - JSProcessActor{Child, Parent}::AfterDestroy;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D73017
2020-04-30 16:20:21 +00:00
David Teller 47e9954cc6 Bug 1580448 - nsIContent{Child, Parent}::getActor;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69784
2020-04-30 16:43:48 +00:00
David Teller 3da6e17db2 Bug 1580448 - JSProcessActor API;r=nika
This patch introduces the bulk of JSProcessActor{Child, Parent}.

Differential Revision: https://phabricator.services.mozilla.com/D64595
2020-04-30 16:49:50 +00:00
David Teller cd067d3c2e Bug 1580448 - Rename JSWindowActor into JSActor;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70038
2020-04-30 16:42:53 +00:00
Simon Giesecke a6c4405725 Bug 1626570 - Improve handling of copying arrays in dom/ipc/. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D72320
2020-04-30 09:37:05 +00:00
Stefan Hindli e22cd35728 Backed out 9 changesets (bug 1580448) for linux build bustages in /builds/worker/workspace/obj-build/dist/include/mozilla/dom/JSWindowActorChild.h CLOSED TREE
Backed out changeset 6b4db1a501df (bug 1580448)
Backed out changeset 677257a41457 (bug 1580448)
Backed out changeset 6db8de5fc125 (bug 1580448)
Backed out changeset fd7527c86239 (bug 1580448)
Backed out changeset bfbd3330b0a5 (bug 1580448)
Backed out changeset dafa80c63322 (bug 1580448)
Backed out changeset 2a1701831a6a (bug 1580448)
Backed out changeset 9b548bd38671 (bug 1580448)
Backed out changeset 358f764ae48b (bug 1580448)
2020-04-30 10:58:27 +03:00
David Teller 6fa45f443f Bug 1580448 - JSProcessActor{Child, Parent}::AfterDestroy;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D73017
2020-04-30 07:37:06 +00:00
David Teller b53c3a4ae1 Bug 1580448 - nsIContent{Child, Parent}::getActor;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69784
2020-04-30 07:35:20 +00:00
David Teller 942da6a70f Bug 1580448 - JSProcessActor API;r=nika
This patch introduces the bulk of JSProcessActor{Child, Parent}.

Differential Revision: https://phabricator.services.mozilla.com/D64595
2020-04-30 07:35:17 +00:00
David Teller e3ac58091c Bug 1580448 - Rename JSWindowActor into JSActor;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70038
2020-04-30 07:33:28 +00:00
Dimi Lee 56bfd52246 Bug 1612376 - P6. Permission update in the parent process should only happen when the heurisitc is triggered by a first-party window r=timhuang,baku
Differential Revision: https://phabricator.services.mozilla.com/D72657
2020-04-29 14:48:47 +00:00
alwu b368e58a84 Bug 1632301 - part4 : rename 'ControlledMediaState' to 'MediaPlaybackState'. r=bryce
This patch will do :
- rename `ControlledMediaState` to `MediaPlaybackState`
- rename the related functions

The advantage of doing so :
- more consistent with `MediaAudibleState`

Differential Revision: https://phabricator.services.mozilla.com/D72060
2020-04-28 07:14:05 +00:00
alwu d1cbaeb672 Bug 1632301 - part3 : use MediaAudibleState to replace boolean value. r=bryce
This patch will do :
- replace `boolean` with enum class `MediaAudibleState`

The advantage of doing so :
- It's easier to understand what actually meaning of the parameter we set

Differential Revision: https://phabricator.services.mozilla.com/D72058
2020-04-28 07:14:05 +00:00
Steven MacLeod e34761f02e Bug 1597413 - fix locking screen orientation to be fission compatible. r=farre
Both the deprecated `Screen.lockOrientation` and replacement
`ScreenOrientation.lock` APIs have been updated to make use of a new
`OrientationLock` field on the `BrowsingContext`. This replaces the
storage and use of APIs for this on the root docshell.

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

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

This commit fixes both Bug 1597413 and Bug 1597443.

Differential Revision: https://phabricator.services.mozilla.com/D70416
2020-04-27 15:43:36 +00:00
Andreas Farre 6adf2b375d Bug 1576188 - Handle save-as for cross process iframes. r=peterv
Depends on D70388

Differential Revision: https://phabricator.services.mozilla.com/D70389
2020-04-27 05:41:40 +00:00
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 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
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