Commit Graph

29941 Commits

Author SHA1 Message Date
Makoto Kato
6608bcb9fd Bug 1593683 - Part 2. Handle arrow left/right key when having composition. r=geckoview-reviewers,esawin
Most IMEs handle arrow key, then set caret position by IME. But GBoard doesn't
handle it. GBoard will dispatch key event to application for arrow left/right
even if having IME composition.

Since Gecko doesn't dispatch key press during IME composition due to DOM UI
events spec, we have to emulate arrow key's behaviour.

And, `GeckoEditable` has a hack that composition text is committed when
dispatching key event. This hack is unnecessary after landing
bug 1613804 that `InputConnection.finishComposingText` is implemented.

Differential Revision: https://phabricator.services.mozilla.com/D76658
2020-05-28 15:38:03 +00:00
Bogdan Tara
f863a91210 Backed out changeset 2548f39e1751 (bug 1641711) for lints.py failure CLOSED TREE 2020-05-29 12:37:18 +03:00
Agi Sferro
465a4e3f1a Bug 1641711 - Don't fail the build if javadoc fails. r=nalexander,snorp
`|mach lint -f treeherder|` expects lints to not fail ever, if a lint fails it's
just ignored. This means that when our javadoc errors out and fails the build
all lints are ignored.

To avoid that we add `failOnError = false` to the javadoc job so that we can
finish the build and actually report the errors.

This patch also adds gradle output `|mach lint|` to make it easier to
diagnose errors in the lint.

Differential Revision: https://phabricator.services.mozilla.com/D77373
2020-05-29 00:24:22 +00:00
Rob Wu
9b0fc7b0fa Bug 1641516 - Use sendRequest in extension actions r=geckoview-reviewers,agi
The sender doesn't await a result, and the recipient does not send a
result. To get rid of logspam when the finalizer is invoked, simply
replace `sendRequestForResult` with `sendRequest`.

Differential Revision: https://phabricator.services.mozilla.com/D77235
2020-05-28 20:37:08 +00:00
Agi Sferro
ba50630491 Bug 1641591 - restore WebExtension docs to current version. r=fluffyemily
Differential Revision: https://phabricator.services.mozilla.com/D77310
2020-05-28 17:38:23 +00:00
Eugen Sawin
6a2dd06f72 Bug 1641475 - [1.0] Fix Javadoc warnings. r=geckoview-reviewers,droeh
Differential Revision: https://phabricator.services.mozilla.com/D77311
2020-05-28 21:12:05 +00:00
Aaron Klotz
bcc33f9b49 Bug 1641315: Fix crash when a binding connection is lost during final connection setup; r=geckoview-reviewers,agi
This crash hits when a `RemoteException` is thrown during `onServiceConnected`.
We `unbind`, which destroys all our bookkeeping data. During this destruction,
we also attempt to retrieve the pid, which fails because we lost our binding
before we had a chance to retrieve it.

This patch adds a new exception to be thrown in this case, which we explicitly
catch in `removeContentConnection`.

Differential Revision: https://phabricator.services.mozilla.com/D77135
2020-05-27 23:08:07 +00:00
Anny Gakhokidze
28243d5736 Bug 1630323 - Do not override user preferences when clicking on a service worker notification to open a new document, r=Gijs,nika,geckoview-reviewers,snorp
In Bug 1622749 a user preference for where to open new documents (from a
service worker notification) was temporarily overriden in order to quickly fix
a crash that was happening in mozilla::dom::ClientOpenWindow. The crash was
ocurring when the pref "browser.link.open_newwindow" was set to 2, meaning new
documents are opened in a new window, instead of a new tab. The reason the
browser crashed is because the path for opening a new document is different
depending on the current user setting, and in NEWWINDOW case we did not get a
browsing context returned when calling mozilla::dom::OpenWindow which resulted
in a failed assertion.

The solution is to pass in a callback to mozilla::dom::OpenWindow as part of
nsOpenWindowInfo object, and invoke that callback with a corresponding
BrowsingContext in nsFrameLoader when that browsing context is ready.

After we call mozilla::dom::OpenWindow, we wait on a promise, that will be
resolved when the callback is invoked, before executing the rest of the code
that depends on the browsing context for a newly opened document being
available.

Differential Revision: https://phabricator.services.mozilla.com/D72745
2020-05-27 18:15:36 +00:00
Agi Sferro
5b00703f08 Bug 1629113 - Add missing documentation to onBeforeUnloadPrompt. r=esawin
Differential Revision: https://phabricator.services.mozilla.com/D76964
2020-05-27 15:10:46 +00:00
Eugen Sawin
0ddffb01f3 Bug 1640990 - [1.1] Add login autofill runtime setting. r=geckoview-reviewers,MattN,snorp
Differential Revision: https://phabricator.services.mozilla.com/D76891
2020-05-27 14:04:52 +00:00
Agi Sferro
0f0c68a81d Bug 1640743 - Update WebExtension example links. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D76756
2020-05-26 19:31:01 +00:00
Agi Sferro
c1406546b5 Bug 1629113 - Use |class| in GeckoViewPrompt.jsm r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D75879
2020-05-26 07:44:49 +00:00
Agi Sferro
c36e973433 Bug 1629113 - Move remaining services to components.conf. r=snorp,baku
Differential Revision: https://phabricator.services.mozilla.com/D75878
2020-05-26 07:44:52 +00:00
Agi Sferro
7cdda27e40 Bug 1629113 - Move prompt classes to its own modules. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D75877
2020-05-26 16:35:28 +00:00
Agi Sferro
903fea5453 Bug 1629113 - Use |class| more in GeckoViewPrompt. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D75876
2020-05-26 16:33:21 +00:00
Agi Sferro
4b055fe237 Bug 1629113 - Move GeckoViewPrompt.js to static component. r=droeh,pbz,MattN
Differential Revision: https://phabricator.services.mozilla.com/D75875
2020-05-26 07:44:44 +00:00
Butkovits Atila
a2bda5fd7e Backed out 5 changesets (bug 1629113) for causing Geckoview perma failures. CLOSED TREE
Backed out changeset cd5c87a17008 (bug 1629113)
Backed out changeset 3729b2c288ba (bug 1629113)
Backed out changeset 2cd92d6c2998 (bug 1629113)
Backed out changeset 6d7c87f3c329 (bug 1629113)
Backed out changeset 2bcba09433b5 (bug 1629113)
2020-05-26 10:39:42 +03:00
Agi Sferro
cd12daf7d8 Bug 1629113 - Use |class| in GeckoViewPrompt.jsm r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D75879
2020-05-26 04:14:15 +00:00
Agi Sferro
398b7f2e76 Bug 1629113 - Move remaining services to components.conf. r=snorp,baku
Differential Revision: https://phabricator.services.mozilla.com/D75878
2020-05-26 04:14:12 +00:00
Agi Sferro
c4530466c4 Bug 1629113 - Move prompt classes to its own modules. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D75877
2020-05-26 04:14:05 +00:00
Agi Sferro
74d9fc93d1 Bug 1629113 - Use |class| more in GeckoViewPrompt. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D75876
2020-05-26 04:14:05 +00:00
Agi Sferro
e5ad06bfc2 Bug 1629113 - Move GeckoViewPrompt.js to static component. r=droeh,pbz,MattN
Differential Revision: https://phabricator.services.mozilla.com/D75875
2020-05-26 04:14:00 +00:00
Eugen Sawin
3e1783def2 Bug 1618058 - [4.3] Update API changelog. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D74685
2020-05-25 13:12:33 +00:00
Eugen Sawin
a81483a92c Bug 1618058 - [3.3] Rename and extend LoginStorage tests to Autocomplete tests. r=geckoview-reviewers,agi,snorp
Differential Revision: https://phabricator.services.mozilla.com/D73060
2020-05-25 18:46:15 +00:00
Eugen Sawin
077dbf3832 Bug 1618058 - [2.c.7] Implement Autocomplete API backend. r=geckoview-reviewers,MattN,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D73753
2020-05-25 18:45:25 +00:00
Eugen Sawin
1e6ebcef70 Bug 1618058 - [2.b.3] Refactor LoginStorage backend API to the Autocomplete backend API. r=geckoview-reviewers,droeh
Differential Revision: https://phabricator.services.mozilla.com/D73057
2020-05-25 18:44:47 +00:00
Eugen Sawin
8a665d9c0e Bug 1618058 - [1.4] Add Autocomplete API for login autocomplete. r=geckoview-reviewers,snorp,agi
Differential Revision: https://phabricator.services.mozilla.com/D73055
2020-05-25 18:43:15 +00:00
Aaron Klotz
025407f0ea Bug 1625325: Part 1 - Add telemetry timer to record GeckoView content process lifetimes; r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D76378
2020-05-22 23:21:50 +00:00
Agi Sferro
cabca57aba Bug 1629113 - Implement nsIPromptCollection on GeckoView. r=snorp,droeh
Differential Revision: https://phabricator.services.mozilla.com/D72722
2020-05-22 23:22:41 +00:00
Agi Sferro
55a1cf51ab Bug 1629113 - Factor out prompter logic in GeckoViewPrompter. r=droeh
Differential Revision: https://phabricator.services.mozilla.com/D75874
2020-05-22 23:22:34 +00:00
James Willcox
b4862ab01a Bug 1611035 - Grant "desktop-notification" when delivering Web Push in GeckoView r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D76218
2020-05-21 20:20:40 +00:00
Nazım Can Altınova
e135e0b3f6 Bug 1639630 - Increase the java sample count limit to 120000 to cover up to 2 mins with 1ms interval. r=julienw,geckoview-reviewers,agi
Depends on D76180

Differential Revision: https://phabricator.services.mozilla.com/D76181
2020-05-21 21:20:38 +00:00
Nazım Can Altınova
cdad822203 Bug 1639630 - Use the limited sample count instead of non-limited one. r=julienw,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D76180
2020-05-21 21:20:37 +00:00
Rob Wu
ac650df53f Bug 1636158 - Remove addons-bloomfilters from Android package r=agi,geckoview-reviewers,snorp
Those will be restored in bug 1639050

Differential Revision: https://phabricator.services.mozilla.com/D76157
2020-05-20 16:39:05 +00:00
Aaron Klotz
f65b5795c7 Bug 1630229: Part 8 - Stop throwing AssertionError for binding of defunct ServiceAllocator.InstanceInfo; r=geckoview-reviewers,owlish
I'm keeping this patch as simple as possible so that we can uplift to beta.
I'll sort out the rest of this in follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D76333
2020-05-21 19:11:22 +00:00
Bogdan Tara
5e15baf1e4 Backed out changeset e562d64f2bf9 (bug 1630229) for lints failure on ServiceAllocator.java CLOSED TREE 2020-05-21 21:47:57 +03:00
Aaron Klotz
06cd8d0427 Bug 1630229: Part 8 - Stop throwing AssertionError for binding of defunct ServiceAllocator.InstanceInfo; r=geckoview-reviewers,owlish
I'm keeping this patch as simple as possible so that we can uplift to beta.
I'll sort out the rest of this in follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D76333
2020-05-21 17:53:08 +00:00
Emilio Cobos Álvarez
7b19f0d6d4 Bug 1609024 - Remove cache mechanism which is not very useful. r=hiro,snorp,mccr8
I don't think all this complexity is worth it for having a
marginally-more-realistic testing story. Using the pref just works and we should
do that, I think.

Differential Revision: https://phabricator.services.mozilla.com/D59980
2020-05-21 17:02:06 +00:00
Emily Toop
bcb67c8680 Bug 1639180 - Port docs to Sphinx and reST and stop copying to GitHub. r=geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D75935
2020-05-20 15:22:32 +00:00
Mihai Alexandru Michis
e9d51d0f4d Backed out changeset 141fda86ce58 (bug 1639180) for causing rst lint failures.
CLOSED TREE
2020-05-20 15:24:58 +03:00
Emily Toop
3a5a675f9f Bug 1639180 - Port docs to Sphinx and reST and stop copying to GitHub. r=geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D75935
2020-05-19 14:51:17 +00:00
Aaron Klotz
dba6e9ff37 Bug 1639435: Remove GeckoProcessManager.buildLogMsg and change its callsite to just use a literal string; r=geckoview-reviewers,droeh
`GeckoProcessManager.buildLogMsg` requires a successful bind to construct its
message, but its only remaining callsite is only invoked when a bind fails,
so it blows up.

This patch eliminates `buildLogMsg` and just changes the callsite to use
a string literal.

Differential Revision: https://phabricator.services.mozilla.com/D76086
2020-05-20 05:02:56 +00:00
Dan Glastonbury
b4dde7ce2a Bug 1633459 - Marshal customUserAgent setting via nsDocShell. r=geckoview-reviewers,esawin,nika
Reinstate customUserAgent interface for nsIDocShell. This is so it can be used
as a choke-point to catch setting values on docshells which are in the process
of changing process. We don't want to send changes which will be rejected on the
parent side.

This code should be removed once callers setting customUserAgent are refactored
to only occur from parent process.

Differential Revision: https://phabricator.services.mozilla.com/D75006
2020-05-20 00:19:59 +00:00
Aaron Klotz
646a40b5ed Bug 1625326: Add priority management for non-content child processes to GeckoProcessManager; r=geckoview-reviewers,agi
* We modify connection management such that we now use more specific connection
  types for {content, non-content, socket process} connections.
* We attach a native counterpart to the `GeckoProcessManager.ConnectionManager`
  instance that listens for app foreground, app background, and when the
  socket process is enabled, network state events.
* On app background, all non-content processes are assigned BACKGROUND priority.
  Even though backgrounding the app will cause Android to drop all child
  processes' priority regardless of our priority settings, we still do this as
  to indicate to Android that these processes are relatively less important
  than our parent process.
* When the socket process is enabled, we drop its priority when we detect that
  we have no network connectivity. Note that the network management code does
  the Right Thing if network connectivity changes while our app was in the
  background: we receive the network state change event once we return to
  foreground, therefore we do not need to do any special handling ourselves.

Differential Revision: https://phabricator.services.mozilla.com/D74478
2020-05-19 21:34:05 +00:00
John Lin
2be9f52cfa Bug 1619550 - p1: listen to media segment load event and pass the URL to resource wrapper. r=bryce,geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D74989
2020-05-19 14:51:07 +00:00
Dylan Roeh
2157c7820c Bug 1596825 - Add NavigationDelegate.onSubframeLoadRequest to handle non-top-level load requests. r=snorp,mattwoodrow,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D74939
2020-05-19 17:05:42 +00:00
David Teller
49d5a4d3b4 Bug 1636089 - ActorManagerParent.addJSProcessActors;r=kmag,geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D75047
2020-05-19 16:29:36 +00:00
Eugen Sawin
b4fb238257 Bug 1638904 - [2.0] Add a private mode context ID test. r=geckoview-reviewers,agi
Depends on D75822

Differential Revision: https://phabricator.services.mozilla.com/D75823
2020-05-18 18:44:33 +00:00
Eugen Sawin
d4eadbda81 Bug 1638904 - [1.0] Add a private mode content blocking exception test. r=agi,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D75822
2020-05-18 18:46:54 +00:00
Makoto Kato
6095b334e1 Bug 1638251 - Remove unused members in Frame from GeckoJavaSampler. r=geckoview-reviewers,aklotz,canaltinova
fileName and lineNo are unused now.

Differential Revision: https://phabricator.services.mozilla.com/D75481
2020-05-18 14:15:28 +00:00
Gabriel Luong
7c5d0ed09c Bug 1622500 - Implement cookieStoreId parameter for tabs.create. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D71817
2020-05-15 22:17:59 +00:00
Aaron Klotz
31a6668805 Bug 1630229: Part 7 - Remove explicit kill from GeckoProcessManager and just let Android do its thing; r=geckoview-reviewers,agi
I'm wondering whether Gecko's response to noticing that the child process was
killed is causing some notifications on the launcher thread to arrive out of
order from others. Removing the kill since we can just let Android handle
process termination.

Differential Revision: https://phabricator.services.mozilla.com/D75416
2020-05-15 19:44:26 +00:00
Aaron Klotz
c160fa58d9 Bug 1630229: Part 6 - When attempting to bind a defunct connection, throw a BindException in non-debug builds; r=geckoview-reviewers,agi
Since this is so common, let's reserve the `AssertionError` for debug builds.
In non-debug builds we will throw a `ServiceAllocator.BindException` which
will be caught and used for completing the bind promise.

GeckoProcessManager will retry unbinding and restarting the process, which
hopefully will mitigate the problem.

We also make some improvements to exception handling hygeine.

Differential Revision: https://phabricator.services.mozilla.com/D75415
2020-05-15 21:55:12 +00:00
Aaron Klotz
eda11d2c38 Bug 1630229: Part 5 - GeckoProcessManager: When start fails, chain resolution of the result promise to the bind shutdown promise; r=geckoview-reviewers,agi
Currently `unbind()` is more or less synchronous, but since those semantics may
change in the future, for the sake of cleanliness we should ensure that our
reaction is linked to `unbindResult`.

Differential Revision: https://phabricator.services.mozilla.com/D75414
2020-05-15 19:47:56 +00:00
Aaron Klotz
bba080d9d9 Bug 1637452: Part 18 - Remove support for unified JNI headers from AnnotationProcessor and build system; r=nalexander,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D75381
2020-05-15 17:06:35 +00:00
Jamie Nicol
b10845210b Bug 1633432 - Don't detach SurfaceTextures from GL context on Pause(). r=sotaro,geckoview-reviewers,snorp,imanol
In bug 1470348 we started to detach all SurfaceTextures from the
current GL context in CompositorOGL::Pause(). This was required for
VR, so that when the VR presentation was entered the SurfaceTextures
could be attached to the VR context instead.

When RenderCompositorEGL was implemented for webrender, we copied the
call to detach from CompositorOGL. However, due to extra complexity in
webrender's threading model, this is causing assertion failures.

VR no longer relies upon the SurfaceTextures being detached when the
compositor is paused, as it now uses its own SurfaceTexture
set. Therefore we can remove the detach call from both
CompositorOGL::Pause and RenderCompositorEGL::Pause.

Differential Revision: https://phabricator.services.mozilla.com/D74832
2020-05-15 12:05:15 +00:00
alwu
f986ca0c1f Bug 1509933 - part1 : add new pref 'media.autoplay.blocking_policy'. r=geckoview-reviewers,snorp,padenot
This patch will do :
- rename the old pref `media.autoplay.enabled.user-gestures-needed` to  the new pref `media.autoplay.blocking_policy`
- modify the value of the pref to `int` in order to introduce new policy
- implement new policy in `AutoplayPoliocy`

The advantage of doing so :
- rename the pref to explicitly indicate that it's related the block policy we use
- use the transient user gesture activation as a new policy to replace the old one using the user input, which doesn't work on the async handler

More details :
The old `click-to-play` policy we use is using the user input to determine if the play invocation is called by users or by scripts. But `UserActivation::IsHandlingUserInput()` is buggy which would fail when you call `video.play()` inside an async event handler. So we would like to replace it with the new transient user activation, which would treat the action as an user input if the action is performed within a certain period of time after a user interacts (eg. click) with the page.

[1] https://html.spec.whatwg.org/multipage/interaction.html#transient-activation

Differential Revision: https://phabricator.services.mozilla.com/D73971
2020-05-15 03:40:31 +00:00
Dorel Luca
68c900462b Backed out 3 changesets (bug 1509933) for Linting failure in gecko/mobile/android/app/mobile.js. CLOSED TREE
Backed out changeset c15ecdcd5d13 (bug 1509933)
Backed out changeset 951ea1d0f42a (bug 1509933)
Backed out changeset 3abb24d6dfc9 (bug 1509933)
2020-05-15 05:02:07 +03:00
alwu
8ed9cb7dbc Bug 1509933 - part1 : add new pref 'media.autoplay.blocking_policy'. r=geckoview-reviewers,snorp,padenot
This patch will do :
- rename the old pref `media.autoplay.enabled.user-gestures-needed` to  the new pref `media.autoplay.blocking_policy`
- modify the value of the pref to `int` in order to introduce new policy
- implement new policy in `AutoplayPoliocy`

The advantage of doing so :
- rename the pref to explicitly indicate that it's related the block policy we use
- use the transient user gesture activation as a new policy to replace the old one using the user input, which doesn't work on the async handler

More details :
The old `click-to-play` policy we use is using the user input to determine if the play invocation is called by users or by scripts. But `UserActivation::IsHandlingUserInput()` is buggy which would fail when you call `video.play()` inside an async event handler. So we would like to replace it with the new transient user activation, which would treat the action as an user input if the action is performed within a certain period of time after a user interacts (eg. click) with the page.

[1] https://html.spec.whatwg.org/multipage/interaction.html#transient-activation

Differential Revision: https://phabricator.services.mozilla.com/D73971
2020-05-15 01:39:31 +00:00
Aaron Klotz
819b856572 Bug 1638105: Remove obsolete assumeThat statement from ContentDelegateTest; r=geckoview-reviewers,agi
This is no longer necessary now that we've gotten rid of the `aww_crap_handler`
stuff in x86 debug builds.

Differential Revision: https://phabricator.services.mozilla.com/D75400
2020-05-14 20:34:09 +00:00
Agi Sferro
1b07d9e24b Bug 1637803 - Expose WebExtension.isBuiltIn. r=owlish,droeh
Differential Revision: https://phabricator.services.mozilla.com/D75227
2020-05-14 17:48:25 +00:00
Nick Alexander
144ad7135d Bug 1448428 - Part 2: Transition "HardwareCodecCapabilityUtils" away from "unified" GeneratedJNI{Natives,Wrappers}.h header. r=snorp,geckoview-reviewers
Depends on D58574

Differential Revision: https://phabricator.services.mozilla.com/D58575
2020-05-13 18:11:06 +00:00
Aaron Klotz
badc3f721e Bug 1448428 - Part 1d: Change naming scheme for generated source files; r=snorp,nalexander,geckoview-reviewers
We update the name generation code to dump the files into:
```
OBJDIR/widget/android/GeneratedJNI
```

which are then exported to `mozilla/java`

Differential Revision: https://phabricator.services.mozilla.com/D74720
2020-05-13 17:53:17 +00:00
Nick Alexander
468e8ee4f6 Bug 1448428 - Part 1c: Allow incremental transition away from "unified" GeneratedJNI{Natives,Wrappers}.h header. r=snorp,geckoview-reviewers
This establishes a "high-water" mark that will make new files not be
"unified", and will allow to burn down the list of files require
unification.

Depends on D58573

Differential Revision: https://phabricator.services.mozilla.com/D58574
2020-05-13 18:11:06 +00:00
Nick Alexander
73af4ee38b Bug 1448428 - Part 1b: Maintain "unified" GeneratedJNI{Natives,Wrappers}.h header. r=snorp,geckoview-reviewers
It's not trivial to split the existing "unified" include declaration
into granular include declarations, so we continue generating a
unified header that can be incrementally abandoned until it can be
jettisoned.

Depends on D58572

Differential Revision: https://phabricator.services.mozilla.com/D58573
2020-05-13 17:46:54 +00:00
Nick Alexander
fe6281cdc0 Bug 1448428 - Part 1a: Split generated JNI wrappers into multiple files. r=snorp,geckoview-reviewers
This handles the build system bits.

The subsequent patch will restore the "unified"
GeneratedJNI{Natives,Wrappers}.h header files, and will be folded into
this one before landing.

What will still remain is to update the consumers of the .h files (all
the current #include lines) to use the fine-grained imports.  At that
time the "unified" header files can be removed entirely.

Differential Revision: https://phabricator.services.mozilla.com/D58572
2020-05-13 17:46:46 +00:00
John Lin
a76ca42590 Bug 1635446 - cancel async callback for released codec. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D74991
2020-05-13 15:25:19 +00:00
Agi Sferro
4acba26b6f Bug 1637324 - Clarify native app ids for GeckoView. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D74896
2020-05-13 15:14:29 +00:00
Agi Sferro
29cdfeaa15 Bug 1637324 - Update docs to use installBuiltIn r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D74894
2020-05-13 15:14:17 +00:00
Agi Sferro
10d7d02ef2 Bug 1637324 - Update examples to use installBuiltIn. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D74893
2020-05-13 15:14:37 +00:00
Razvan Maries
2fe860484b Backed out 5 changesets (bug 1448428) for build bustages at SocketProcessParent.cpp. CLOSED TREE
Backed out changeset 192294c1413a (bug 1448428)
Backed out changeset da732f0c37d5 (bug 1448428)
Backed out changeset c48617a975e9 (bug 1448428)
Backed out changeset 92ca5adb7eb3 (bug 1448428)
Backed out changeset 3a3c734343f3 (bug 1448428)
2020-05-13 02:20:24 +03:00
Nick Alexander
212dc32562 Bug 1448428 - Part 2: Transition "HardwareCodecCapabilityUtils" away from "unified" GeneratedJNI{Natives,Wrappers}.h header. r=snorp,geckoview-reviewers
Depends on D58574

Differential Revision: https://phabricator.services.mozilla.com/D58575
2020-05-12 23:04:59 +00:00
Aaron Klotz
2b93310c1b Bug 1448428 - Part 1d: Change naming scheme for generated source files; r=snorp,nalexander,geckoview-reviewers
We update the name generation code to dump the files into:
```
OBJDIR/widget/android/jni/GeneratedJNI{Natives, Wrappers}
```

which are then exported to `mozilla/jni/natives` and `mozilla/jni/wrappers`

Differential Revision: https://phabricator.services.mozilla.com/D74720
2020-05-12 23:04:59 +00:00
Nick Alexander
1332cb4147 Bug 1448428 - Part 1c: Allow incremental transition away from "unified" GeneratedJNI{Natives,Wrappers}.h header. r=snorp,geckoview-reviewers
This establishes a "high-water" mark that will make new files not be
"unified", and will allow to burn down the list of files require
unification.

Depends on D58573

Differential Revision: https://phabricator.services.mozilla.com/D58574
2020-05-12 23:04:59 +00:00
Nick Alexander
ee100fb1bf Bug 1448428 - Part 1b: Maintain "unified" GeneratedJNI{Natives,Wrappers}.h header. r=snorp,geckoview-reviewers
It's not trivial to split the existing "unified" include declaration
into granular include declarations, so we continue generating a
unified header that can be incrementally abandoned until it can be
jettisoned.

Depends on D58572

Differential Revision: https://phabricator.services.mozilla.com/D58573
2020-05-12 23:02:07 +00:00
Nick Alexander
09bb5a923b Bug 1448428 - Part 1a: Split generated JNI wrappers into multiple files. r=snorp,geckoview-reviewers
This handles the build system bits.

The subsequent patch will restore the "unified"
GeneratedJNI{Natives,Wrappers}.h header files, and will be folded into
this one before landing.

What will still remain is to update the consumers of the .h files (all
the current #include lines) to use the fine-grained imports.  At that
time the "unified" header files can be removed entirely.

Differential Revision: https://phabricator.services.mozilla.com/D58572
2020-05-12 23:01:49 +00:00
Mike Conley
e08905a04a Bug 1634703 - Return nsIMediaDevice active devices list from mediaCaptureWindowState. r=jib,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D73479
2020-05-12 14:49:46 +00:00
Aaron Klotz
796d8c15ae Bug 1630229: Part 4 - Register ChildConnection after bind instead of start; r=geckoview-reviewers,snorp
1. `GeckoProcessManager.ConnectionManager.onStartComplete` is called later than
   it ideally should be; it would be better to do this as soon as binding is
   complete, rather than as soon as `start` is complete. To accomplish this:

* We rename `onStartComplete` to `onBindComplete` and call it as soon as we
  have successfully bound.
* We call `IChildProcess.getPid` as soon as we're bound and immediately clean
  up if that fails.
* This implies that `getPid` should always have a pid and should not need to
  call into `IChildProcess` during the remaining lifetime of the connection.
  This allows us to eliminate exception throwing from `getPid`, and thus we may
  also remove `getPidFallible`.
* This also means that we no longer need to explicitly call `getPid` in
  `GeckoProcessManager.preload`.

2. We also use `XPCOMEventTarget.runOnLauncherThread` so that we do not need to
   bounce through the launcher thread's event queue unnecessarily.

3. I noticed that we do not unbind the connection if the start fails but we
   are not retrying. We should be unbinding regardless of whether we are going
   to retry.

Differential Revision: https://phabricator.services.mozilla.com/D74500
2020-05-12 18:59:20 +00:00
Makoto Kato
ec78483903 Bug 1632594 - Use Long.valueOf instead of Integer.valueOf on GeckoSession#onExternalResponse. r=geckoview-reviewers,agi
When content length is over 2GB, `WebResponseInfo.contentLength` is negative
value. Use Long.valueOf instead of Integer.valueOf to pass this value.

Differential Revision: https://phabricator.services.mozilla.com/D74586
2020-05-11 16:21:01 +00:00
Agi Sferro
3655bb2674 Bug 1636581 - Enable tabs_goBack_goForward disabled by mistake. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D74472
2020-05-11 21:47:31 +00:00
Bogdan Tara
8c5c4f1dd7 Backed out 7 changesets (bug 1634703) for testDeviceRecordingEventAudioAndVideo failures CLOSED TREE
Backed out changeset b982f5d74610 (bug 1634703)
Backed out changeset 59229853930e (bug 1634703)
Backed out changeset e017380f5539 (bug 1634703)
Backed out changeset 47a3a96b969b (bug 1634703)
Backed out changeset b4af76cfbdaf (bug 1634703)
Backed out changeset 7ef57434b09d (bug 1634703)
Backed out changeset 9df87d346b0f (bug 1634703)
2020-05-11 23:04:54 +03:00
owlishDeveloper
72cf60fade Bug 1635862 - Add object URI support to WebExecutor r=geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D74465
2020-05-11 17:51:05 +00:00
Mike Conley
f77df842d7 Bug 1634703 - Return nsIMediaDevice active devices list from mediaCaptureWindowState. r=jib,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D73479
2020-05-11 17:34:10 +00:00
Nikita Kozhemiakin
2158dd66ed Bug 1523544 - Change exoplayer2 package name. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D74068
2020-05-11 07:24:57 +00:00
Agi Sferro
6b2ccb034a Bug 1634493 - Re-read the policy object when exporting extensions. r=snorp
WebExtensionPolicy.getByID(id) will return a stub when called earlier during
startup. Once the startup process is complete, this object is sawpped with the
real extension policy.

Before this patch, we used to hold onto the stub object, which makes it so that
we read incorrect values even though we are waiting for the policy to be ready.

To fix this we just read the result value of the readyPromise promise.

Differential Revision: https://phabricator.services.mozilla.com/D74459
2020-05-08 19:59:49 +00:00
Dylan Roeh
cfe61718b3 Bug 1628388 - Add ACCEPT_FIRST_PARTY_AND_ISOLATE_OTHERS to CookieBehavior to support dFPI and add a setting to control it to GVE. r=esawin,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D73473
2020-05-08 15:51:09 +00:00
Atique Ahmed Ziad
0feacb38f7 Bug 1633328 - support tabs.goForward() and tabs.goBack() for Android r=zombie,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D73010
2020-05-08 08:23:43 +00:00
Agi Sferro
40aaada87c Bug 1635914 - Add workaround for docShellIsActive. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D74130
2020-05-06 20:49:39 +00:00
Dylan Roeh
a604ef3384 Bug 1634545 - Update GVE's tracking protection settings to fix some bugs and add more control. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D73348
2020-05-06 20:19:33 +00:00
John Lin
b873d056bc Bug 1634170 - clear crypto info before reusing recycled sample. r=geckoview-reviewers,esawin
Differential Revision: https://phabricator.services.mozilla.com/D73989
2020-05-06 12:00:22 +00:00
Simon Giesecke
d3e9abdf69 Bug 1626570 - Improve handling of copying arrays in mobile/. r=geckoview-reviewers,esawin
Differential Revision: https://phabricator.services.mozilla.com/D73682
2020-05-06 11:50:59 +00:00
Csoregi Natalia
d68addcbf2 Backed out changeset 44a166a4efdb (bug 1555255) for causing bustage of android-sdk-linux because the docs package doesn't exist anymore. CLOSED TREE 2020-05-06 07:12:30 +03:00
Agi Sferro
82fa9ddcde Bug 1601067 - Add deprecation notice for registerWebExtension. r=droeh
Differential Revision: https://phabricator.services.mozilla.com/D73514
2020-05-05 23:02:49 +00:00
Agi Sferro
a017477abe Bug 1601067 - Make the test-support extension installable. r=owlish,snorp
Differential Revision: https://phabricator.services.mozilla.com/D72980
2020-05-05 23:02:51 +00:00
Agi Sferro
2cf1ad60da Bug 1601067 - Use installBuiltIn in tests instead of registerWebExtension. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D72979
2020-05-05 23:02:53 +00:00
Agi Sferro
6122ab6818 Bug 1601067 - Implement installBuiltIn. r=mixedpuppy,owlish,snorp
Differential Revision: https://phabricator.services.mozilla.com/D72978
2020-05-05 23:02:56 +00:00
Agi Sferro
87a2e3d943 Bug 1601067 - Add IDs and nativeMessagingFromContent to tests. r=snorp
This in preparation to making these test extensions installable.

Differential Revision: https://phabricator.services.mozilla.com/D72977
2020-05-05 23:02:58 +00:00
Agi Sferro
ee5f146bcd Bug 1601067 - Add nativeMessagingFromContent privileged permission. r=zombie,snorp
Installed privileged addons in GeckoView sometimes need to send messages from
content scripts. Today we use the in-memory flag `ALLOW_CONTENT_MESSAGING` to
allow a specific built-in addon to send messages from content scripts, but for
installed extensions we need a way to persist this flag.

To do this, this patch introduces a new privileged permission
`nativeMessagingFromContent`, when this permission is present in the manifest,
the addon will be allowed to send native messages from content scripts (note:
the addon will also need `nativeMessaging` as usual).

When the permission is not present, any attempt to send a native message from a
content script will result in an error, similarly to what happens before this
patch.

Differential Revision: https://phabricator.services.mozilla.com/D72976
2020-05-05 23:02:47 +00:00
Agi Sferro
4827a18544 Bug 1601067 - Collect NewTab messages until a delegate is registered. r=snorp
Sometimes extensions call tabs.create immediately on startup. In that case the
delegate may not be attached yet. To avoid losing these messages we store them
until a delegate is attached.

This also includes a refactoring to unify behavior for delegates. Eventually I
want to factor out delegates similarly to what happens in GeckoSession today.

Differential Revision: https://phabricator.services.mozilla.com/D72975
2020-05-05 23:08:01 +00:00
Agi Sferro
596114f140 Bug 1601067 - Only send ActionDelegate:Attached when the delegate is not null. r=snorp
We use this to send a default action to the embedder, but if no one is
listening there's no point, and it causes problems in tests because sometimes
the delegate is attached / reattached too quickly and the second delegate will
end up getting two messages by mistake.

Differential Revision: https://phabricator.services.mozilla.com/D72974
2020-05-05 23:02:44 +00:00