Commit Graph

2688 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
8ca5b42689 Bug 1646558 - Remove the old android "native" theme. r=geckoview-reviewers,agi
We've had nsNativeBasicTheme enabled since 75, and all reported issues
were fixed real soon (and I haven't heard of any of them recently).

Given the non-native theme is likely changing in the future, I'd rather
not maintain three themes for Android :)

Differential Revision: https://phabricator.services.mozilla.com/D80105
2020-06-18 20:34:16 +00:00
Jeff Gilbert
a97c615de2 Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-15 18:25:55 +00:00
Emilio Cobos Álvarez
d8b15e8369 Bug 1645770 - Fix dark mode settings on GeckoView's content processes. r=geckoview-reviewers,snorp
GeckoRuntime is not around in content processes so we need to remote it
like we remote the prefers-reduced-motion values.

Differential Revision: https://phabricator.services.mozilla.com/D79670
2020-06-15 15:55:23 +00:00
Dorel Luca
255f146f14 Backed out 7 changesets (bug 1632249) for Gtest perma chrash in [@ mozilla::BlockingResourceBase::CheckAcquire()]. CLOSED TREE
Backed out changeset 4ff99aab3ee8 (bug 1632249)
Backed out changeset d5b7fe789001 (bug 1632249)
Backed out changeset 64fbb616a0f3 (bug 1632249)
Backed out changeset 6f19f43e0a0b (bug 1632249)
Backed out changeset 073302d26c5e (bug 1632249)
Backed out changeset 7c94d37c446e (bug 1632249)
Backed out changeset 204b899f436d (bug 1632249)
2020-06-11 19:44:20 +03:00
Emilio Cobos Álvarez
ef3d21048d Bug 1640623 - Use enum classes for LookAndFeel int and float IDs. r=jmathies,geckoview-reviewers,esawin
Differential Revision: https://phabricator.services.mozilla.com/D76694
2020-06-11 11:27:43 +00:00
Jeff Gilbert
cf3c8fedea Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-11 06:37:35 +00:00
Mihai Alexandru Michis
59ad7ed333 Backed out 6 changesets (bug 1632249) for causing bustages in CanvasRenderingContext2D.cpp
CLOSED TREE

Backed out changeset c93972b05d4f (bug 1632249)
Backed out changeset 04f5127c85d5 (bug 1632249)
Backed out changeset b15d91e64a25 (bug 1632249)
Backed out changeset 71ad2ed8e9ba (bug 1632249)
Backed out changeset 6e9a89ead3a5 (bug 1632249)
Backed out changeset dd00e2da3a0f (bug 1632249)
2020-06-11 02:43:35 +03:00
Jeff Gilbert
9b09e54345 Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-10 22:21:02 +00:00
Emilio Cobos Álvarez
4e88a12703 Bug 1643656 - Fix GeckoRuntimeSettings color scheme configuration. r=geckoview-reviewers,snorp
So as to not use a pref with an invalid value, which I would've changed
the behavior of with the previous patch.

Differential Revision: https://phabricator.services.mozilla.com/D78957
2020-06-09 22:40:22 +00:00
Haik Aftandilian
b1f63ced7e Bug 1632845 - Firefox gets stuck when quit from the dock if the user cancels quitting from a beforeunload prompt r=Gijs,spohl,necko-reviewers,geckoview-reviewers,dragana,agi
Return NSTerminateCancel from applicationShouldTerminate when the user chooses to "Stay on Page".

Differential Revision: https://phabricator.services.mozilla.com/D78839
2020-06-09 18:20:36 +00:00
James Willcox
ed11539ff5 Bug 1642345 - Add 'source' field to WebNotification r=geckoview-reviewers,agi,esawin
Differential Revision: https://phabricator.services.mozilla.com/D78168
2020-06-09 13:47:53 +00:00
Colomban Wendling
120fea1c42 Bug 1628762 - Fix tree column header color to follow theme. r=geckoview-reviewers,snorp
The background color for the tree column headers is drawn using the
system APIs, but the foreground uses custom colors, which didn't follow
theme.  This can lead to unreadable text with specific colors, e.g.
leading to black on black.

Fix this by using system colors for the foreground as well.  It also
adds on-hover styling to match possible background change on hover.

Differential Revision: https://phabricator.services.mozilla.com/D78073
2020-06-03 20:52:55 +00:00
alwu
934302cd0d Bug 1640998 - part9 : use MediaControlKey to replace MediaControlKeysEvent r=chunmin,agi,geckoview-reviewers
This patch will
- remove `MediaControlKeysEvent` and use `MediaControlKey` to replace it
- rename names for all `MediaControlKey` related methods, functions, classes and descriptions

The advantage of doing so are
- remove the duplicated type so that we only need to maintain `MediaControlKey`

Differential Revision: https://phabricator.services.mozilla.com/D78140
2020-06-09 02:59:57 +00:00
Dorel Luca
7289b66d6f Backed out 4 changesets (bug 1632249) for Build bustages and mda failures. CLOSED TREE
Backed out changeset cdaa8a4e9e36 (bug 1632249)
Backed out changeset 9ff26bcc580c (bug 1632249)
Backed out changeset 16d84439756f (bug 1632249)
Backed out changeset bbfe23c61add (bug 1632249)
2020-06-09 03:19:48 +03:00
Dzmitry Malyshau
59b6551dd5 Bug 1638672 - Use shaders to clear texture cache regions r=geckoview-reviewers,gw,snorp
This is a suggested workaround for an interesting visual bug that we see on
some platforms with Intel Broadwell GPUs.

Also reverts https://phabricator.services.mozilla.com/D57100

Differential Revision: https://phabricator.services.mozilla.com/D78705
2020-06-08 21:05:03 +00:00
Jeff Gilbert
de6377896c Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-08 20:34:15 +00:00
Dorel Luca
d05df77874 Backed out changeset d52680bbda73 (bug 1642345) for Mochitest failures in toolkit/components/alerts/test/test_alerts_noobserve.html. CLOSED TREE 2020-06-08 23:50:35 +03:00
James Willcox
d9995bd658 Bug 1642345 - Add 'source' field to WebNotification r=geckoview-reviewers,agi,esawin
Differential Revision: https://phabricator.services.mozilla.com/D78168
2020-06-08 17:22:17 +00:00
James Willcox
dff6c8722d Bug 1641064 - Fail screenshot captures immediately if we pause the compositor r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D78373
2020-06-04 23:40:01 +00:00
James Willcox
feb9d115fd Bug 1536833 - Fix overscroll effect on Android r=botond,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D78130
2020-06-08 17:13:28 +00:00
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