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

2668 Коммитов

Автор SHA1 Сообщение Дата
Makoto Kato 0917864e45 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-06-01 08:36:29 +00:00
Makoto Kato 83fbd04e63 Bug 1593683 - Part 1. Restore caret position after committing composition. r=geckoview-reviewers,esawin
When calling `InputConnection.finishComposingText` commits composition string,
but caret position isn't changed. But
`RemoveComposition(COMMIT_IME_COMPOSITION)` sets caret position to end of
string.

So we have to restore caret position after calling
`RemoveComposition(COMMIT_IME_COMPOSITION)` via `finishComposingText`.

Differential Revision: https://phabricator.services.mozilla.com/D76657
2020-06-01 08:36:26 +00:00
Ricky Stewart 0bbaac721b Bug 1641693 - Replace a bunch of uses of `GENERATED_FILES` with the `GeneratedFile` template r=necko-reviewers,geckoview-reviewers,aklotz,dragana,froydnj
Also update documentation to suggest using the `GeneratedFile` template rather than directly referencing `GENERATED_FILES` where possible.

Differential Revision: https://phabricator.services.mozilla.com/D77496
2020-06-01 16:00:28 +00:00
Mihai Alexandru Michis 7ac149a023 Backed out 2 changesets (bug 1593683) for causing failures in test_selectevents.html
Backed out changeset 05d7ad574df4 (bug 1593683)
Backed out changeset 16cc9284bc5f (bug 1593683)
2020-06-01 06:29:24 +03:00
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
Makoto Kato 605c87a3ce Bug 1593683 - Part 1. Restore caret position after committing composition. r=geckoview-reviewers,esawin
When calling `InputConnection.finishComposingText` commits composition string,
but caret position isn't changed. But
`RemoveComposition(COMMIT_IME_COMPOSITION)` sets caret position to end of
string.

So we have to restore caret position after calling
`RemoveComposition(COMMIT_IME_COMPOSITION)` via `finishComposingText`.

Differential Revision: https://phabricator.services.mozilla.com/D76657
2020-05-28 15:38:03 +00:00
Makoto Kato 2a241751b2 Bug 1639071 - Don't dispatch key press when key down handler calls preventDefault. r=geckoview-reviewers,esawin
If key down event handler calls `event.preventDefault()`, web browser
shouldn't fire key press event. But GeckoView may fire key press
unfortunately if using software keyboard.

So we don't fire key press event when dispatching `eKeyDown` returns
`nsEventStatus_eConsumeNoDefault`.

Differential Revision: https://phabricator.services.mozilla.com/D75981
2020-05-30 07:00:46 +00:00
Emilio Cobos Álvarez 54fd961a29 Bug 1641245 - Make string comparators not virtual. r=froydnj,necko-reviewers,geckoview-reviewers,jgilbert,agi,valentin
There's no use case for stateful comparators, so they can be just plain
function pointers.

This is used in some hot places like CSS selector matching.

Differential Revision: https://phabricator.services.mozilla.com/D77084
2020-05-27 18:11:12 +00:00
Emilio Cobos Álvarez bb457d5b09 Bug 1640264 - Simplify the "notify of theme changes in all windows" code in Android. r=geckoview-reviewers,agi
I want to do something similar in the child process, and turns out
we already kinda have something like this.

Differential Revision: https://phabricator.services.mozilla.com/D76535
2020-05-22 23:03:43 +00:00
Aaron Klotz cbb73e22c8 Bug 1634585: Return a rejected promise instead of nullptr from mozilla::GetProcInfo on Android; r=geckoview-reviewers,agi
This is a simple fix to eliminate crashing. Proper implementation of this
function will be done in bug 1529510.

Differential Revision: https://phabricator.services.mozilla.com/D76269
2020-05-21 20:21:39 +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
James Willcox b23385a7d5 Bug 1639275 - Add some null checking to Base64Utils r=geckoview-reviewers,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D76219
2020-05-20 21:58:33 +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
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
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
Aaron Klotz 852cd2b63c Bug 1637452: Part 1 - Fix JNI includes in widget/android; r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D75364
2020-05-15 17:04:10 +00:00
Sebastian Streich 1ec5974790 Bug 1636148 - "BandAid" - Cast Remaining Callers To BasePrincipal r=ckerschb,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D74248
2020-05-14 19:42:57 +00:00
Kartikaya Gupta a8c2fc579a Bug 1631754 - Improve code to distinguish between root and content handling of events. r=snorp,geckoview-reviewers
In particular, the eConsumeNoDefault case also needs to check for mTargetIsRoot
and the apz aware listeners flag.

Differential Revision: https://phabricator.services.mozilla.com/D75301
2020-05-14 13:51:34 +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 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
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 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
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
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
Jean-Yves Avenard 2df41aacc8 Bug 1635001 - P2. Don't use MessageLoop threads with APZ. r=kats,geckoview-reviewers,snorp
It is unclear on why MessageLoop was ever used with this code.

Differential Revision: https://phabricator.services.mozilla.com/D73829
2020-05-08 20:46:13 +00:00
Narcis Beleuzu 2a7e80bbbb Backed out 3 changesets (bug 1635001) for causing bustages on RemoteContentController.cpp . CLOSED TREE
Backed out changeset 62d98215d177 (bug 1635001)
Backed out changeset bc73609fc638 (bug 1635001)
Backed out changeset 26daca5f7dab (bug 1635001)
2020-05-08 23:41:40 +03:00
Jean-Yves Avenard 4329c55477 Bug 1635001 - P2. Don't use MessageLoop threads with APZ. r=kats,geckoview-reviewers,snorp
It is unclear on why MessageLoop was ever used with this code.

Differential Revision: https://phabricator.services.mozilla.com/D73829
2020-05-07 08:30:22 +00:00
Aaron Klotz 429648e903 Bug 1636285: Add a descriptive message to EnsureJNIObject; r=geckoview-reviewers,droeh
Differential Revision: https://phabricator.services.mozilla.com/D74328
2020-05-07 22:18:48 +00:00
Dorel Luca 9340fa2b2d Backed out 11 changesets (bug 1635001, bug 1634253) for Browser-chrome failures in browser_bug295977_autoscroll_overflow.js
Backed out changeset c3c27cb46db6 (bug 1635001)
Backed out changeset 6cea251e5910 (bug 1635001)
Backed out changeset 3cb0a05be7fc (bug 1635001)
Backed out changeset 1cbb2866a3ad (bug 1634253)
Backed out changeset 53fd00dcf95c (bug 1634253)
Backed out changeset e3acd9db7065 (bug 1634253)
Backed out changeset 5c0b7aa99406 (bug 1634253)
Backed out changeset dc7e17f772be (bug 1634253)
Backed out changeset 6e47af64396a (bug 1634253)
Backed out changeset 8865de9ae0ef (bug 1634253)
Backed out changeset 6fac93b596c2 (bug 1634253)
2020-05-07 11:00:04 +03:00
Jean-Yves Avenard e6903a6550 Bug 1635001 - P2. Don't use MessageLoop threads with APZ. r=kats,geckoview-reviewers,snorp
It is unclear on why MessageLoop was ever used with this code.

Differential Revision: https://phabricator.services.mozilla.com/D73829
2020-05-07 05:07:00 +00:00
David Teller 18a8fad225 Bug 1632794 - Bare bones about:processes;r=fluent-reviewers,florian,Pike
This is a very first iteration of about:processes, so that people who actually need the tool can start using it immediately and provide feedback.

Differential Revision: https://phabricator.services.mozilla.com/D72617
2020-05-06 20:11:55 +00:00
Mihai Alexandru Michis 6c13bc9a50 Backed out changeset 2f5143da4986 (bug 1631584) for causing gv jobs to fail as exceptions.
CLOSED TREE
2020-05-06 02:23:54 +03:00
Markus Stange 1bb0550030 Bug 1631584 - Add profiler labels for JNI binding method/getter/setter/constructor calls. r=gerald,snorp,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D71645
2020-05-05 21:42:21 +00:00
Botond Ballo 7cf10dca6d Bug 1556556 - Remove many uses of IgnoreRootScrollFrame. r=mstange,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D68913
2020-05-05 19:23:35 +00:00
Gerald Squelart 6f36a3fdb8 Bug 1609907 - Remove AUTO_PROFILER_THREAD_SLEEP before mozilla::CondVar waits - r=mstange
CondVar already calls `AUTO_PROFILER_THREAD_SLEEP`, which shouldn't be called recursively.

mozilla::Monitor also uses CondVar, so it shouldn't be surrounded by `AUTO_PROFILER_THREAD_SLEEP` either.

Depends on D72850

Differential Revision: https://phabricator.services.mozilla.com/D72851
2020-05-01 22:12:22 +00:00
Makoto Kato fc29e1e8e1 Bug 1596920 - Don't set selection on dispatching key event if unnecessary. r=geckoview-reviewers,snorp
Actually we emulate key event (down, press and up) from replace transaction of
`Editable`. When dispatching key press, we always update current caret position.

Most situations is the following.
1. Dispatch keypress
2. Dispatch another keypress
3. Receive merged text/selection change result by 1. and 2.
4. Sync shadow (Java's Editable) text with 3.'s result. It means selection is
   correct position now.
5. Dispatch keypress with correct position.

When this issue occurs, the following situation occurs.
1. Dispatch keypress
2. Dispatch another keypress
3. Receive text/selection change result of 1.
4. Sync shadow (Java's Editable) text with 3.'s result. It means selection is
   old position now.
5. Dispatch another keypress with old position.
6. Receive text/selection change result of 2.
7. Receive text/selection change result of 5.

So when dispatching key press, we shouldn't always update selection if unnecessary.
Because selection range is already often set before dispatching key press.

Differential Revision: https://phabricator.services.mozilla.com/D71179
2020-04-28 14:02:10 +00:00
Csoregi Natalia b073baab86 Backed out 30 changesets (bug 1556556, bug 1631568) for multiple mochitest failures. CLOSED TREE
Backed out changeset edd529f7a9c5 (bug 1631568)
Backed out changeset 1cc0881e244b (bug 1631568)
Backed out changeset ed3c1e85d5e3 (bug 1556556)
Backed out changeset 38ffc6215bbf (bug 1556556)
Backed out changeset 03c2c25d8023 (bug 1556556)
Backed out changeset 9c717eb067b8 (bug 1556556)
Backed out changeset 98e26bc98b85 (bug 1556556)
Backed out changeset 05a6a581e755 (bug 1556556)
Backed out changeset 867946cf05bb (bug 1556556)
Backed out changeset 20d72a334530 (bug 1556556)
Backed out changeset 2c62e61d9054 (bug 1556556)
Backed out changeset 62a223d057d2 (bug 1556556)
Backed out changeset 2c5d55a1f0b1 (bug 1556556)
Backed out changeset 700447945b4e (bug 1556556)
Backed out changeset 93190ae4f5ff (bug 1556556)
Backed out changeset a7bd34d961bb (bug 1556556)
Backed out changeset fccd1d3c7189 (bug 1556556)
Backed out changeset 24056e47183d (bug 1556556)
Backed out changeset 204881474cc1 (bug 1556556)
Backed out changeset 387320881876 (bug 1556556)
Backed out changeset be8f5eb58460 (bug 1556556)
Backed out changeset 629c58a9166b (bug 1556556)
Backed out changeset 4312b2b5dda8 (bug 1556556)
Backed out changeset d11dbf6403a5 (bug 1556556)
Backed out changeset 95c54c023779 (bug 1556556)
Backed out changeset 80fcb7e71188 (bug 1556556)
Backed out changeset d75a4ecb0d47 (bug 1556556)
Backed out changeset 903c4de34e7a (bug 1556556)
Backed out changeset f15334a3e803 (bug 1556556)
Backed out changeset 9553e99137ea (bug 1556556)
2020-04-28 12:43:11 +03:00
Botond Ballo b11a399d42 Bug 1556556 - Remove many uses of IgnoreRootScrollFrame. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D68913
2020-04-28 02:25:51 +00:00
Kartikaya Gupta 763e05dece Bug 1627716 - Remove GeckoView API exposing the DynamicToolbarAnimator. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D71776
2020-04-22 11:50:40 +00:00
Makoto Kato 784bdca25f Bug 1626389 - Part 1. Use JNI to get password setting even if content process. r=geckoview-reviewers,snorp
Now we can use JNI on content process, so it is unnecessary to use sync IPC
to get password setting.

Differential Revision: https://phabricator.services.mozilla.com/D71707
2020-04-21 14:54:29 +00:00
Kris Taeleman 0ec13882ab Bug 1607322 - Enable webrender for Pixel 2/3 on release r=jnicol
Preparing change to enable webrender on Fenix once the shader compilation changes are in.

Differential Revision: https://phabricator.services.mozilla.com/D70944
2020-04-17 16:34:10 +00:00
Makoto Kato ac14cb654b Bug 1629759 - Remove unused dom.event.touch.coalescing.enabled preference. r=geckoview-reviewers,agi
No one seems to reference `dom.event.touch.coalescing.enabled` after landing Bug 1291373.
So remove it.

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

--HG--
extra : moz-landing-system : lando
2020-04-15 21:20:11 +00:00
Makoto Kato ff4dcdc969 Bug 1629730 - Remove unnecessary AKEYCODE defines from GeckoEditableSupport. r=geckoview-reviewers,agi
Old NDK requires AKEYCODE defines for newer API version, but it is unnecessary
to define it when using NDK r20.

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

--HG--
extra : moz-landing-system : lando
2020-04-15 21:25:46 +00:00
alwu ef4a16e0ae Bug 1628929 - part1 : break the cyclic reference after receiving decoded image. r=emilio,agi
Currently, there is a cyclic reference between `ImageDecoderListener` and `ImageCallbackHelper` that causes a memory leak on Android. `ImageDecoderListener` is holding `imgIContainerCallback` which is a `ImageCallbackHelper` and `ImageCallbackHelper` is holding `imgIContainer`, which is actually a `ImageDecoderListener`.

Therefore, we should break the cyclic reference after receiving decoded image.

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

--HG--
extra : moz-landing-system : lando
2020-04-15 02:48:34 +00:00
Dylan Roeh 9541273b5d Bug 1619798 - Move GeckoView onLoadRequest calls to DocumentLoadListener.cpp r=snorp,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D69594

--HG--
extra : moz-landing-system : lando
2020-04-10 16:38:48 +00:00