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

27003 Коммитов

Автор SHA1 Сообщение Дата
Agi Sferro 91ef92b036 Bug 1737824 - Allow running GeckoSession::load from any thread. r=jonalmeida
Normally we always want GeckoResult callbacks to run in the same thread where
the GeckoResult has been created.

In the case where we don't have a looper, however, we cannot do that. For
delegate calls, we are going to send the call to the UI thread, so we can use
the UI thread to run the callback (which is what the embedder would have to do
in this case, anyway).

Differential Revision: https://phabricator.services.mozilla.com/D134056
2021-12-16 18:56:24 +00:00
Mike Hommey a559a86c18 Bug 1744857 - Remove MOZ_FS_LAYOUT. r=firefox-build-system-reviewers,mhentges
It's consistently set to bundle for all Darwin targets, and that's the
only value we really care about. Removing MOZ_FS_LAYOUT reduces the
differences between old-configure and js/src/old-configure one tiny bit.

Differential Revision: https://phabricator.services.mozilla.com/D133150
2021-12-16 07:37:33 +00:00
Cathy Lu af42e505e1 Bug 1746223 Move ScreenOrientation.lock to version 97 in changelog r=geckoview-reviewers,agi DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D133912
2021-12-15 17:55:40 +00:00
Cathy Lu 623627fafc Bug 1744101 - Support ScreenOrientation.unlock r=geckoview-reviewers,agi
Unlocking the screen orientation means locking the device to its default orientation. It is the same as calling `screen.orientation.lock('natural')`, where natural means the "device manufacturer's considered default orientation". That corresponds to the GeckoScreenOrientation constant `ScreenOrientation_Default`. In the Java public API, ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED corresponds to default, as specified by chromium (https://chromium.googlesource.com/chromium/src/+/66.0.3359.158/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java).

Differential Revision: https://phabricator.services.mozilla.com/D133083
2021-12-15 16:51:28 +00:00
Norisz Fay a34775e64f Backed out changeset ba1330ed02c7 (bug 1741610) for causing assertion failures on Android CLOSED TREE 2021-12-15 16:45:53 +02:00
Andreas Farre 37827b10de Bug 1741610 - Start LoginDetectionService on Android. r=agi,dimi
Differential Revision: https://phabricator.services.mozilla.com/D131357
2021-12-15 13:19:56 +00:00
Cosmin Sabou 045a43b2c8 Backed out 2 changesets (bug 1712837) for causing an increase in crashes (bug 1735798). a=backout
Backed out changeset 51773d1ab7b5 (bug 1712837)
Backed out changeset 97b0a77e4ce7 (bug 1712837)
2021-12-15 12:24:03 +02:00
Makoto Kato eb7e6786b8 Bug 1597897 - Use LayoutDeviceIntRect directly for IME composition rect. r=geckoview-reviewers,agi
Actually `nsIWidget::GetDefaultScale()` will always return 1.0 on GeckoView
([*1] and [*2]). When calculating CSS rect, although we have to consider zoom
factor too, but `ConvertRectArrayToJavaRectFArray` doesn't yet. So then,
GeckoView will notify IME of incorrect rect.

Now we already know the layout device rect, so we should use it directly
instead of converting to CSS unit.

Also, there is no way to add tests since we cannot have the physical keyboard
tests on geckoview-junit.

*1 https://searchfox.org/mozilla-central/rev/4646b826a25d3825cf209db890862b45fa09ffc3/widget/android/nsWindow.cpp#1919-1928
*2 https://searchfox.org/mozilla-central/rev/4646b826a25d3825cf209db890862b45fa09ffc3/widget/android/ScreenHelperAndroid.cpp#39-41

Differential Revision: https://phabricator.services.mozilla.com/D133710
2021-12-15 02:13:03 +00:00
Cathy Lu c02e87d268 Bug 1744372 Temporarily disable OrientationLockedAlready test until further investigation r=geckoview-reviewers,agi DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D133639
2021-12-14 17:04:19 +00:00
Dana Keeler fe0468b14a Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-13 23:59:08 +00:00
Nika Layzell 490e62e602 Bug 1732358 - Part 2: Add the ability to force-disable fission with an environment variable, r=ahal,fluent-reviewers,flod,mccr8
This is required to replace the existing MOZ_FORCE_ENABLE_FISSION environment
variables in environments which use that. In the future we'll want to stop
passing any environment variable when not passing a flag to `./mach run`
however that will require changes to the default test behaviour in bug 1744091.

Differential Revision: https://phabricator.services.mozilla.com/D133006
2021-12-13 20:28:33 +00:00
Makoto Kato e0d886ea90 Bug 1742347 - Add IntDef annotations for IME code. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D133311
2021-12-13 04:10:15 +00:00
Marian-Vasile Laza 2626f5571c Bug 1659481 - lint fix r=fix CLOSED TREE 2021-12-11 02:24:56 +02:00
Agi Sferro 42f0ec4718 Bug 1659481 - Move MediaControlChild to actor. r=calu
Child actors have access to `eventDispatcher` so we don't need to pass from the
module anymore.

Differential Revision: https://phabricator.services.mozilla.com/D133131
2021-12-11 00:03:47 +00:00
Agi Sferro 7957290efd Bug 1674034 - Move SetResolutionAndScaleTo to actor. r=calu
Differential Revision: https://phabricator.services.mozilla.com/D133142
2021-12-10 23:56:07 +00:00
Agi Sferro a2e023448b Bug 1674034 - Move GetLinkColor to actor. r=calu
Differential Revision: https://phabricator.services.mozilla.com/D133141
2021-12-10 23:56:07 +00:00
Agi Sferro 884604fdea Bug 1674034 - Use mainSession instead of sessionRule.session. r=calu
`mainSession` is an alias for `sessionRule.session`.

Differential Revision: https://phabricator.services.mozilla.com/D133140
2021-12-10 23:56:06 +00:00
Cristian Tuns b00f575d28 Merge mozilla-central to autoland on a CLOSED TREE 2021-12-10 09:41:08 -05:00
Cristian Tuns 9ad5101118 Backed out changeset 5396b58ddae7 (bug 1712837) for causing Android ARMv7 build bustages. a=backout 2021-12-10 09:35:39 -05:00
Hiroyuki Ikezoe 29ec3a9389 Bug 1740289 - Notify onShowDynamicToolbar on overflow: hidden case. r=geckoview-reviewers,agi,emilio
The reason why we don't change GetOverflowState is that GetOverflowState is also
used for overflow/underflow event firing and our frontend code expects both
the events are fired on overflow:hidden elements [1]. And it looks like it's by
design as per one of test cases for overflow events has `overflow:hidden` style
in the first place.

[1] https://searchfox.org/mozilla-central/rev/df6434d2ebfdf2b5f89f205fc81d60d64a774fe1/devtools/client/shared/components/tabs/Tabs.css#38-39
[2] https://searchfox.org/mozilla-central/rev/df6434d2ebfdf2b5f89f205fc81d60d64a774fe1/layout/generic/test/test_overflow_event.html#46

Differential Revision: https://phabricator.services.mozilla.com/D131103
2021-12-10 01:12:56 +00:00
Dana Keeler c52192ebff Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-10 00:24:49 +00:00
Noemi Erli 88ea88a467 Backed out 2 changesets (bug 1724480) for causing Bug 1745152 and Bug 1745153 CLOSED TREE
Backed out changeset f988b79d58f4 (bug 1724480)
Backed out changeset 8a2fb9a2a3db (bug 1724480)
2021-12-09 18:58:02 +02:00
Mike Hommey b6947993bc Bug 1745082 - Remove unused MOZ_ANDROID_ANR_REPORTER. r=geckoview-reviewers,agi
It's leftover from bug 1608570.

Differential Revision: https://phabricator.services.mozilla.com/D133299
2021-12-09 07:26:46 +00:00
Agi Sferro 49ed81f7e0 Bug 1724480 - Upgrade JDK to Java 17. r=glandium,ahal,calu
Differential Revision: https://phabricator.services.mozilla.com/D131972
2021-12-08 23:55:53 +00:00
Agi Sferro f45d4248aa Bug 1724480 - Upgrade to apilint 0.5.1. r=calu
Differential Revision: https://phabricator.services.mozilla.com/D132530
2021-12-08 23:55:52 +00:00
Chris H-C 59f494d61a Bug 1742133 - Expose FOG service as Services.fog and convert uses r=janerik
Differential Revision: https://phabricator.services.mozilla.com/D132742
2021-12-08 21:18:19 +00:00
Jamie Nicol 3e2edea9fd Bug 1743454 - Add junit test to ensure GPU process crash triggers GeckoView crash reporter. r=agi,aosmond
Add a function to GPUProcessManager to force the GPU process to crash,
and expose it through gfxInfo. Expose this to geckoview tests via the
test-support webextension.

Add a junit test GpuCrashTest, which triggers a GPU process crash and
ensures the crash reporter was notified.

Additionally, ensure the TestCrashHandler service is stopped in
between tests, as otherwise only the first crash test to run will be
notified of the crash.

Differential Revision: https://phabricator.services.mozilla.com/D132812
2021-12-08 19:08:17 +00:00
Jamie Nicol e8bce5ff6b Bug 1743454 - Notify GeckoView crash handler of GPU process crashes. r=agi,aosmond
Rename ContentCrashHandler.jsm to ChildCrashHandler.jsm as it is now
responsible for all types of child process crashes. Have it observe
"compositor:process-aborted" in addition to
"ipc:content-shutdown". Additionally, rename the
"GeckoView:ContentCrashReport" event it sends to
"GeckoView:ChildCrashReport".

In GPUChild::ActorDestroy, provide an out variable for
GenerateCrashReport to return the dump ID, and stuff this in to a
property bag, along with "abnormal: true", sent to
"compositor:process-aborted" observers.

In ChildCrashHandler, set the "processType" argument sent with the
GeckoView:ChildCrashReport event to BACKGROUND_CHILD for GPU process
crashes, and FOREGROUND_CHILD otherwise.

Differential Revision: https://phabricator.services.mozilla.com/D132810
2021-12-08 19:08:16 +00:00
Jamie Nicol 61bcf0d1a8 Bug 1743454 - Add EXTRA_CRASH_PROCESS_TYPE argument to GeckoView crash reporter. r=agi,gsvelto
Currently the geckoview crash reporter has an EXTRA_CRASH_FATAL
argument, which indicates whether a crash is fatal, ie it occured in
the parent process and cannot be recovered from. Crashes in content
processes are by contrast deemed non-fatal, as the application can
recover from them.

With the upcoming GPU process on Android we will start collecting GPU
process crashes. These are certainly not fatal, and in fact should
barely be noticed by users. Applications may want a way to distinguish
between non-fatal but prominent content process crashes, and barely
noticeable GPU process crashes, so that they can avoid showing an
intrusive UI for GPU process crashes.

This deprecates the old EXTRA_CRASH_FATAL argument, and instead adds a
EXTRA_CRASH_PROCESS_TYPE argument to crash intents, whose value is a
String matching a new CRASHED_PROCESS_TYPE_* constant.

These constants are as follows:

* CRASHED_PROCESS_TYPE_MAIN: indicating a fatal main-process crash.
* CRASHED_PROCESS_TYPE_FOREGROUND_CHILD: indicating a recoverable but
  obvious crash such as in a content process.
* CRASHED_PROCESS_TYPE_BACKGROUND_CHILD indicating a barely noticable
  crash in a background process such as the GPU process

Differential Revision: https://phabricator.services.mozilla.com/D132809
2021-12-08 19:08:16 +00:00
Karl Tomlinson b4927a6d98 Bug 1744346 use nsIMediaSource.rawId to initialize PermissionDelegate.MediaSource.id r=agi
and deprecate PermissionDelegate.MediaSource.rawId.
MediaSource.rawId is otherwise unused in GeckoView and Android Components.

GeckoView uses MediaSource.id simply as a unique identifier to find associated
nsIMediaSource objects.

Android Components uses MediaSource.id simply as a unique identifier to find
a MediaSource from an associated Permission object.
https://searchfox.org/mozilla-mobile/rev/2df7441e996a8e4adfc25a2190415d50f6cf810a/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/permission/GeckoPermissionRequest.kt#137
id is not used when storing the permission.
https://searchfox.org/mozilla-mobile/rev/2df7441e996a8e4adfc25a2190415d50f6cf810a/android-components/components/feature/sitepermissions/src/main/java/mozilla/components/feature/sitepermissions/SitePermissionsFeature.kt#643-648

Use of nsIMediaSource.rawId is consistent with Firefox for Desktop.
https://searchfox.org/mozilla-central/rev/0998b61022a1ece43afe3c750077e5804c6c6392/browser/actors/WebRTCChild.jsm#324

This will permit removal of nsIMediaSource.id which is otherwise unused.

Differential Revision: https://phabricator.services.mozilla.com/D132876
2021-12-08 03:09:51 +00:00
Richa Sharma c581e3ff18 Bug 1730931 - Supporting an array of cookieStoreId in the tabs.query API. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D125868
2021-12-07 13:46:53 +00:00
Makoto Kato aaa57dd959 Bug 1681261 - Test failure reduction for inputConnection_sendKeyEvent. r=geckoview-reviewers,calu
To reduce test failure of inputConnection_sendKeyEvent, I would like to add more workaround.
As long as I run this fix in local 200 times, it is no failure.

Differential Revision: https://phabricator.services.mozilla.com/D132931
2021-12-07 05:50:16 +00:00
owlishDeveloper 364ae8887a Bug 1619655 - Part 4. Set GV's COOP+COEP processCount for Release and Beta r=geckoview-reviewers,calu
Depends on D132962

Differential Revision: https://phabricator.services.mozilla.com/D132963
2021-12-07 00:19:01 +00:00
Andreea Pavel 041f6f706d Backed out 2 changesets (bug 1712837) for win build bustages on a CLOSED TREE
Backed out changeset e754af875d57 (bug 1712837)
Backed out changeset 020eaab241a8 (bug 1712837)
2021-12-07 02:21:09 +02:00
Dana Keeler 8d68ea1d86 Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika,jschanck
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-12-06 23:43:32 +00:00
Cathy Lu 8348b23f54 Bug 1697647 - Add screen orientation lock api r=ipc-reviewers,mccr8,agi,smaug,jonalmeida
Previously, the screenOrientation.lock API was for Fennec and not supported for Fenix and multi-process use. The overall idea is to now allow apps to use the API through a delegate and make asynchronous calls to LockDeviceOrientation. This required replacing the existing code that returned a default false bool to calls that perform the requested orientation change and instead return a promise that contained either an allow or deny value.

Returning a promise instead of a bool involved changing the API calls from the C++ side to Java. The new general control flow of screenOrientation lock follows: an app calls C++ ScreenOrientation.lock() which eventually dispatches LockOrientationTask to resolve the pending orientation promise. Hal.cpp sends an IPC call to the content process and RecvLockScreenOrientation retrieves the current instance of geckoRuntime and calls the java side LockScreenOrientation. Apps must create a delegate and override onOrientationLock to set the requested orientation. In geckoview's testing, this is done with the android API setRequestedOrientation. Once a device orientation change has been triggered, native OnOrientationChange calls to NotifyScreenConfigurationChange, which notifies all observers and dispatches a change event to resolve the pending orientation promise.

Testing:
I used a demo on the GeckoView Example (https://usefulangle.com/demos/105/screen.html) to test locking to landscape orientation. This required a change to the GVE to show the app from recreating the whole thing on orientation change. In the example AndroidManifest xml file, `orientation` prevents restart when orientation changes.

The Junit/Kotlin tests were to verify that the expected orientation delegate was called with the expected new orientation value, in an orientation change, if the new orientation was the same as the current, and if the pre-lock conditions such as being fullscreen were not met.

A static preference `dom.screenorientation.allow-lock` was added to the dom group, since it affects the ui dom) and is currently turned off. C++ can access it through its mirrored variable dom_screenorientation_allow_lock (same name but with underscores). The junit tests turn the preference on and test the lock feature.

Reference:
Orientation constant values:
    C++
        1 ScreenOrientation_PortraitPrimary); - vertical with button at bottom
        2 ScreenOrientation_PortraitSecondary); - vertical with button at top
        4 ScreenOrientation_LandscapePrimary); - horizational w button right
        8 ScreenOrientation_LandscapeSecondary); - horization button left
        16 ScreenOrientation_Default);
    Java
        1 GeckoScreenOrientation.ScreenOrientation.PORTRAIT_PRIMARY.value
        2 GeckoScreenOrientation.ScreenOrientation.PORTRAIT_SECONDARY.value
        4 GeckoScreenOrientation.ScreenOrientation.LANDSCAPE_PRIMARY.value
        8 GeckoScreenOrientation.ScreenOrientation.LANDSCAPE_SECONDARY.value

    Java public API
        0 ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
        1 Activitynfo.SCREEN_ORIENTATION_PORTRAIT

    Android
        1 ORIENTATION_PORTRAIT
        2 ORIENTATION_LANDSCAPE

Differential Revision: https://phabricator.services.mozilla.com/D129427
2021-12-06 13:58:37 +00:00
Edgar Chen be408c368a Bug 1742714 - Get rid of nsIFormSubmitObserver; r=geckoview-reviewers,agi,smaug
Differential Revision: https://phabricator.services.mozilla.com/D132091
2021-12-06 12:23:08 +00:00
Butkovits Atila cd8a98f0df Backed out changeset 05897abf2c4e (bug 1697647) for causing failures at lock-sandboxed-iframe.html. CLOSED TREE 2021-12-04 04:32:48 +02:00
Cathy Lu 3e9924d513 Bug 1697647 - Add screen orientation lock api r=ipc-reviewers,mccr8,agi,smaug,jonalmeida
Previously, the screenOrientation.lock API was for Fennec and not supported for Fenix and multi-process use. The overall idea is to now allow apps to use the API through a delegate and make asynchronous calls to LockDeviceOrientation. This required replacing the existing code that returned a default false bool to calls that perform the requested orientation change and instead return a promise that contained either an allow or deny value.

Returning a promise instead of a bool involved changing the API calls from the C++ side to Java. The new general control flow of screenOrientation lock follows: an app calls C++ ScreenOrientation.lock() which eventually dispatches LockOrientationTask to resolve the pending orientation promise. Hal.cpp sends an IPC call to the content process and RecvLockScreenOrientation retrieves the current instance of geckoRuntime and calls the java side LockScreenOrientation. Apps must create a delegate and override onOrientationLock to set the requested orientation. In geckoview's testing, this is done with the android API setRequestedOrientation. Once a device orientation change has been triggered, native OnOrientationChange calls to NotifyScreenConfigurationChange, which notifies all observers and dispatches a change event to resolve the pending orientation promise.

Testing:
I used a demo on the GeckoView Example (https://usefulangle.com/demos/105/screen.html) to test locking to landscape orientation. This required a change to the GVE to show the app from recreating the whole thing on orientation change. In the example AndroidManifest xml file, `orientation` prevents restart when orientation changes.

The Junit/Kotlin tests were to verify that the expected orientation delegate was called with the expected new orientation value, in an orientation change, if the new orientation was the same as the current, and if the pre-lock conditions such as being fullscreen were not met.

A static preference `dom.screenorientation.allow-lock` was added to the dom group, since it affects the ui dom) and is currently turned off. C++ can access it through its mirrored variable dom_screenorientation_allow_lock (same name but with underscores). The junit tests turn the preference on and test the lock feature.

Reference:
Orientation constant values:
    C++
        1 ScreenOrientation_PortraitPrimary); - vertical with button at bottom
        2 ScreenOrientation_PortraitSecondary); - vertical with button at top
        4 ScreenOrientation_LandscapePrimary); - horizational w button right
        8 ScreenOrientation_LandscapeSecondary); - horization button left
        16 ScreenOrientation_Default);
    Java
        1 GeckoScreenOrientation.ScreenOrientation.PORTRAIT_PRIMARY.value
        2 GeckoScreenOrientation.ScreenOrientation.PORTRAIT_SECONDARY.value
        4 GeckoScreenOrientation.ScreenOrientation.LANDSCAPE_PRIMARY.value
        8 GeckoScreenOrientation.ScreenOrientation.LANDSCAPE_SECONDARY.value

    Java public API
        0 ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
        1 Activitynfo.SCREEN_ORIENTATION_PORTRAIT

    Android
        1 ORIENTATION_PORTRAIT
        2 ORIENTATION_LANDSCAPE

Differential Revision: https://phabricator.services.mozilla.com/D129427
2021-12-03 23:49:25 +00:00
criss daea1328b7 Backed out changeset 9c623cac6b96 (bug 1697647) for causing mozlint failures. CLOSED TREE 2021-12-04 01:34:21 +02:00
Cathy Lu 1e4d05e6fd Bug 1697647 - Add screen orientation lock api r=ipc-reviewers,mccr8,agi,smaug,jonalmeida
Previously, the screenOrientation.lock API was for Fennec and not supported for Fenix and multi-process use. The overall idea is to now allow apps to use the API through a delegate and make asynchronous calls to LockDeviceOrientation. This required replacing the existing code that returned a default false bool to calls that perform the requested orientation change and instead return a promise that contained either an allow or deny value.

Returning a promise instead of a bool involved changing the API calls from the C++ side to Java. The new general control flow of screenOrientation lock follows: an app calls C++ ScreenOrientation.lock() which eventually dispatches LockOrientationTask to resolve the pending orientation promise. Hal.cpp sends an IPC call to the content process and RecvLockScreenOrientation retrieves the current instance of geckoRuntime and calls the java side LockScreenOrientation. Apps must create a delegate and override onOrientationLock to set the requested orientation. In geckoview's testing, this is done with the android API setRequestedOrientation. Once a device orientation change has been triggered, native OnOrientationChange calls to NotifyScreenConfigurationChange, which notifies all observers and dispatches a change event to resolve the pending orientation promise.

Testing:
I used a demo on the GeckoView Example (https://usefulangle.com/demos/105/screen.html) to test locking to landscape orientation. This required a change to the GVE to show the app from recreating the whole thing on orientation change. In the example AndroidManifest xml file, `orientation` prevents restart when orientation changes.

The Junit/Kotlin tests were to verify that the expected orientation delegate was called with the expected new orientation value, in an orientation change, if the new orientation was the same as the current, and if the pre-lock conditions such as being fullscreen were not met.

A static preference `dom.screenorientation.allow-lock` was added to the dom group, since it affects the ui dom) and is currently turned off. C++ can access it through its mirrored variable dom_screenorientation_allow_lock (same name but with underscores). The junit tests turn the preference on and test the lock feature.

Reference:
Orientation constant values:
    C++
        1 ScreenOrientation_PortraitPrimary); - vertical with button at bottom
        2 ScreenOrientation_PortraitSecondary); - vertical with button at top
        4 ScreenOrientation_LandscapePrimary); - horizational w button right
        8 ScreenOrientation_LandscapeSecondary); - horization button left
        16 ScreenOrientation_Default);
    Java
        1 GeckoScreenOrientation.ScreenOrientation.PORTRAIT_PRIMARY.value
        2 GeckoScreenOrientation.ScreenOrientation.PORTRAIT_SECONDARY.value
        4 GeckoScreenOrientation.ScreenOrientation.LANDSCAPE_PRIMARY.value
        8 GeckoScreenOrientation.ScreenOrientation.LANDSCAPE_SECONDARY.value

    Java public API
        0 ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
        1 Activitynfo.SCREEN_ORIENTATION_PORTRAIT

    Android
        1 ORIENTATION_PORTRAIT
        2 ORIENTATION_LANDSCAPE

Differential Revision: https://phabricator.services.mozilla.com/D129427
2021-12-03 22:35:22 +00:00
Agi Sferro fbac1b6dd7 Bug 1743706 - Remove deprecated content-blocking-exception. r=jonalmeida,calu
Differential Revision: https://phabricator.services.mozilla.com/D132833
2021-12-03 21:46:36 +00:00
Agi Sferro 79940ac0dd Bug 1740358 - Download Java from adoptium. r=mhentges,glandium
We already use the adoptopenjdk on some platforms, this allows us to have a
more predictable Java binary on all platforms.

Differential Revision: https://phabricator.services.mozilla.com/D130878
2021-11-30 16:10:59 +00:00
Makoto Kato e3ff6e435d Bug 1701234 - Add more null check on the background thread. r=geckoview-reviewers,agi
Even if landing bug 1697683, this NullPointerException occurs on the
background thread. So I would like to add more null check for this crash.

Differential Revision: https://phabricator.services.mozilla.com/D132329
2021-11-30 04:29:09 +00:00
Makoto Kato 3b892800d0 Bug 1743354 - Considering SecurityException by calling coerceToText(). r=geckoview-reviewers,agi
`ClipData.Item.coerceToText` seems to be possible to throws SecurityException,
so we have to consider this situation.

Differential Revision: https://phabricator.services.mozilla.com/D132337
2021-11-30 00:21:52 +00:00
Jamie Nicol a9dd0d2943 Bug 1741156 - Initial GPU process implementation on Android. r=aosmond,agi
Declare a GPU process and corresponding Service in the
AndroidManifest. This is of a new class GeckoServiceGpuProcess which
inherits from GeckoServiceChildProcess, and provides a binder
interface ICompositorSurfaceManager which allows the parent process to
set the compositor Surface for a given widget ID, and the compositor
in the GPU process to look up the Surface for a widget ID. The
ICompositorSurfaceManager interface is exposed to the parent process
through a new method getCompositorSurfaceManager() in the
IChildProcess interface.

Add a new connection type for GPU processes to GeckoProcessManager,
along with a function to look up the GPU process connection and fetch
the ICompositorSurfaceManager binder. When the GPU process is launched
we store the returned binder in the GPUProcessHost, and when each
widget's compositor is created we store a reference to the binder in
the UiCompositorControllerChild.

Each nsWindow is given a unique ID, and whenever the Surface changes
due to an Android resume event, it sends the new surface for that ID
to the GPU process (if enabled) by calling
ICompositorSurfaceManager.onSurfaceChanged().

Stop inheriting AndroidCompositorWidget from InProcessCompositorWidget
and instead inherit from CompositorWidget directly. This class holds a
reference to the Surface that will be rendered in to. The
CompositorBridgeParent notifies the CompositorWidget whenever it has
been resumed, allowing it to fetch the new Surface. For the
cross-process CompositorWidgetParent implementation it fetches that
Surface from the CompositorSurfaceManagerService, whereas the
InProcessAndroidCompositorWidget can read it directly from the real
widget.

AndroidCompositorWidget::GetClientSize() can now calculate its size
from the Surface, rather than racily reading the value from the
nsWindow. This means RenderCompositorEGL and RenderCompositorOGLSWGL
can now use GetClientSize() again rather than querying their own size
from the Surface.

With this patch, setting layers.gpu-process.enabled to true will cause
us to launch a GPU process and render from it. We do not yet
gracefully recover from a GPU process crash, nor can we render
anything using SurfaceTextures (eg video or webgl). Those will come in
future patches.

Differential Revision: https://phabricator.services.mozilla.com/D131231
2021-11-29 20:52:31 +00:00
Christoph Kerschbaumer 0e7cd4d730 Bug 1742941: Update tests wtihin mobile/android/ to work with https-first enabled r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D132154
2021-11-29 18:06:32 +00:00
cschanaj cf4639f5bd Bug 1632568 - Use `Arrays.hashCode` insteads of custom `hashCode` implementation r=agi
There is a few spots where a custom `hashCode` implementation is being used.
This PR replaces them with `Objects.hash`

Differential Revision: https://phabricator.services.mozilla.com/D121481
2021-11-23 21:01:57 +00:00
Jonathan Almeida [:jonalmeida] 9503390f00 Bug 1680332 - Use createContentPrincipalFromOrigin to split scopeAndPrincipal r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D131801
2021-11-23 17:01:56 +00:00
Makoto Kato b0c8748fa0 Bug 1510667 - Performance Warning: Should use valueOf instead of new. r=geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D131753
2021-11-23 06:47:44 +00:00
Shane Caraveo 5f84116fa5 Bug 1740634 fix anchor link in changelog r=agi
Differential Revision: https://phabricator.services.mozilla.com/D131804
2021-11-22 18:11:45 +00:00
Eemeli Aro 368a8a1650 Bug 1733495 - Migrate plugins.properties to aboutPlugins.ftl. r=Gijs,fluent-reviewers,nbaumgardner,kpatenio
This is the first patch made using the properties-to-ftl tooling:
https://github.com/mozilla/properties-to-ftl

Differential Revision: https://phabricator.services.mozilla.com/D130984
2021-11-22 09:16:25 +00:00
Makoto Kato 5fd81c7a81 Bug 1740414 - Support "Paste as plain text" on Android O+. r=geckoview-reviewers,agi,calu
Android O supports "Paste as plain text" in text toolbar. This is already
supported in Blink.

This change contains geckoview-junit test for this feature, but our taskcluster
job runs on Android 7, so this isn't run. (I verified this on my Android 8
emulator image).

Differential Revision: https://phabricator.services.mozilla.com/D131383
2021-11-22 03:35:33 +00:00
Shane Caraveo 4b5bda15cb Bug 1740634: Add install_domain failure panel text r=rpl,agi,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D131028
2021-11-17 23:23:56 +00:00
Julian Descottes 2e9e1cc305 Bug 1741369 - [devtools] Update paths to loader files outside devtools/ r=perftest-reviewers,preferences-reviewers,sparky,Gijs
Depends on D131217

Differential Revision: https://phabricator.services.mozilla.com/D131218
2021-11-17 12:43:27 +00:00
Makoto Kato 7f3e52cd43 Bug 1741312 - Set reversed selection from selection cache. r=geckoview-reviewers,agi
This is a regression of bug 1724811.

I should consider that selection order is reversed when fixing bug 1724811.

Differential Revision: https://phabricator.services.mozilla.com/D131196
2021-11-17 02:32:45 +00:00
Sylvestre Ledru 1df999712f Bug 1714788 - doc: do not provide the language if the code isn't valid r=firefox-source-docs-reviewers,championshuttler DONTBUILD
Otherwise, the warning is displayed:
```
WARNING: Could not lex literal_block as "json". Highlighting skipped.
```

Depends on D131092

Differential Revision: https://phabricator.services.mozilla.com/D131093
2021-11-16 07:59:48 +00:00
Sylvestre Ledru 2c055de75d Bug 1714788 - doc: Add a missing image r=firefox-source-docs-reviewers,championshuttler DONTBUILD
Depends on D131089

Differential Revision: https://phabricator.services.mozilla.com/D131090
2021-11-16 07:59:46 +00:00
Agi Sferro 4fb0467b73 Bug 1735786 - Fix GeckoView tests for https-first. r=calu
Differential Revision: https://phabricator.services.mozilla.com/D131014
2021-11-15 15:49:21 +00:00
Makoto Kato 44f94fa3e3 Bug 1630119 - Set initial text and selection correctly on sendDummyKeyboardEvent. r=geckoview-reviewers,owlish
This test is rarely failure when initial text and selection correctly. Because
we don't wait for setting initial data, or it is text is too short to update
text.

So I re-write this tests. And also, this has typo fix for test name.

Differential Revision: https://phabricator.services.mozilla.com/D131048
2021-11-15 02:14:41 +00:00
Emilio Cobos Álvarez 4456ebd295 Bug 1737131 - Enable more async stacks in webextension tests. r=extension-reviewers,zombie
This made debugging this a bit more tractable.

Differential Revision: https://phabricator.services.mozilla.com/D131076
2021-11-14 12:34:35 +00:00
Makoto Kato 2ccc290bd7 Bug 1637416 - Don't use selectionchange event sinec this isn't fired expectedly. r=geckoview-reviewers,agi
We use seelectionchange event to wait selection is set correctly, it isn't
rarely fired according to test failure of this test.

So I use other way (using key operation) to set selection.

Differential Revision: https://phabricator.services.mozilla.com/D130821
2021-11-11 02:24:36 +00:00
Agi Sferro 9c6be8a1c5 Bug 1739701 - Add support for the arm64 Android emulator. r=gbrown,calu
My understanding is that this is the only version of the emulator that is
supported on Apple silicon.

Differential Revision: https://phabricator.services.mozilla.com/D130510
2021-11-09 21:47:25 +00:00
Rob Wu 10c78cd36d Bug 1739746 - Restrict nativeMessaging to privileged extensions on Android r=agi,zombie,extension-reviewers
Make nativeMessaging a privileged permission on Android, to hide the
connectNative/sendNativeMessage APIs from non-builtin add-ons,
and to avoid the permission warning on regular extensions (where the API
is unavailable).

Add unit tests to get coverage on the availability and behavior of the
native messaging APIs on Android, since we did not have any yet.

And fix a small serialization issue in ExtensionParent.jsm

Differential Revision: https://phabricator.services.mozilla.com/D130529
2021-11-09 16:49:28 +00:00
Olivia Hall 71323994b5 Bug 1682599 - Check if media URL is valid before returning it to onContextMenu. r=geckoview-reviewers,agi
Added a check to see if the media blob URL was valid and could be downloaded.
Added a few general unit tests for ContentDelegateChild.

Differential Revision: https://phabricator.services.mozilla.com/D129859
2021-11-05 17:20:36 +00:00
Dimi 1170d5bd99 Bug 1729640 - P3. Notify event when a form with password is submitted r=sfoster,tgiles,geckoview-reviewers,agi
Notify "passwordmgr-form-submission-detected" when a form with password
is submitted.
The event should be notified regardless of whether the password manager
decides to show the doorhanger or not. To support this, this patch
also refactors _maybeSendFormInteractionMessage function to distinguish
"onFormSubmit" event and "showDoorhanger" event.

Differential Revision: https://phabricator.services.mozilla.com/D127104
2021-11-05 17:11:31 +00:00
Agi Sferro 426b9a2fd8 Bug 1717506 - Re-enable autofillNavigation. r=owlish
There is a potential intermittent where we try to execute javascript in the
page before the page navigates away, causing a hang. To ensure that that is not
possible we also wait for a PageStop event.

Differential Revision: https://phabricator.services.mozilla.com/D130377
2021-11-05 15:58:54 +00:00
Agi Sferro 175a5c05ff Bug 1717506 - Handle out-of-order page{hide,show}. r=owlish
With Fission BFCache, when navigating back the two pages might run in different
processes, even though they belong to the same domain.

This means that `pagehide` and `pageshow` might come out of order. For example,
navigating from `a.html` to `b.html` and back, we might get

```
pageshow b.html
pageshow a.html
pagehide b.html
```

notice we get the `pageshow` event for `a.html` _before_ the `pagehide` event
for `b.html`.

Internally in our test framework, we use `pagehide` and `pageshow` to establish
a connection between a page and the Java layer through a WebExtension port.

Before this patch, we assumed tha all `pageshow` events will match a `pagehide`
event in order, and thus disconnect the port early for `a.html` when getting
the event for `b.html` in the above example.

There is also a separate problem where if a port was established for a given
web page and then a navigation was issued, we would hang waiting for a response
from the page that navigated away (and thus, we would not be able to send
messages anymore).

To fix both of these issues, we keep track of all pending messages and discard
them properly when a Port is disconnected, and make sure that the port that's
disconnecting matches the one that's currently associated with the session (to
ensure that we are not disconnecting because of a out-of-order port event).

Differential Revision: https://phabricator.services.mozilla.com/D130376
2021-11-05 15:58:54 +00:00
Csoregi Natalia d2f8488b6a Backed out 7 changesets (bug 1729640) for causing permafailures on browser_web_process_isolation.js. a=backout
Backed out changeset 5b2a1799ce4e (bug 1729640)
Backed out changeset fcd4b833ad73 (bug 1729640)
Backed out changeset 5ff8d3adc6eb (bug 1729640)
Backed out changeset b8fd0343ca42 (bug 1729640)
Backed out changeset fbd6928e34ef (bug 1729640)
Backed out changeset 4ce2eebab0c4 (bug 1729640)
Backed out changeset c7c50c85f911 (bug 1729640)
2021-11-04 23:44:26 +02:00
Dimi c6f5d58bfb Bug 1729640 - P3. Notify event when a form with password is submitted r=sfoster,tgiles,geckoview-reviewers,agi
Notify "passwordmgr-form-submission-detected" when a form with password
is submitted.
The event should be notified regardless of whether the password manager
decides to show the doorhanger or not. To support this, this patch
also refactors _maybeSendFormInteractionMessage function to distinguish
"onFormSubmit" event and "showDoorhanger" event.

Differential Revision: https://phabricator.services.mozilla.com/D127104
2021-11-04 11:17:03 +00:00
owlishDeveloper dd9d805fa5 Bug 1699845 - Remove cleanup code for app_tmpdir r=geckoview-reviewers,agi,calu
Differential Revision: https://phabricator.services.mozilla.com/D130123
2021-11-02 19:37:33 +00:00
Agi Sferro d4e0174d2c Bug 1529082 - Use bundletool to install apps as aab packages. r=ahal,owlish
This patch adds a new command line argument --aab which allows users to install
GVE as an AAB.

This will also be used in a future patch to install the test runner as AAB.

Differential Revision: https://phabricator.services.mozilla.com/D127323
2021-11-02 18:56:28 +00:00
Agi Sferro dccddb81bc Bug 1529082 - Move TestRunnerActivity to test_runner. r=ahal,owlish
The fact that the test runner app is defined inside the geckoview test package
has always felt like a hack to me. I've mistakenly thought that
TestRunnerActivity was used in GeckoView's junit tests many times (even though
that's not the case).

From what I can see, there's no way to generate an AAB package for androidTest,
so to be able to run Gecko tests as AAB we finally need to define the
TestRunner as an ordinary package instead.

Differential Revision: https://phabricator.services.mozilla.com/D127320
2021-11-02 18:56:26 +00:00
Agi Sferro 088243109c Bug 1529082 - Locate lib folder within the APK. r=owlish
Before this patch, we would load mozglue using the unqualified
`System.loadLibrary("mozglue")` and then we would try to load all the other
native libraries from the path returned from `nativeLibraryDir`.

Note that since the path is unqualified, we might end up loading a library
that's not inside the APK, potentially a malicious one.

Android App Bundles (or AAB) is a new feature of Android where apps can be
split in multiple APKs (called "splits"). Each APK split contains a functinal
part of the app, e.g. a specific resolution asset folder, all the native
libraries for one CPU architecture etc.

For AAB, `nativeLibraryDir` returns an empty folder as the libraries are
stored, uncompressed, inside one of the APK splits, so GeckoView fails to load
libxul and other libraries when starting up.

The current code also doesn't work for any case where `System.loadLibrary`
fails to load mozglue (we do have code that accounts for that, but I'm not sure
how much of it is funcitonal).

To fix that, we locate the mozglue using code ported from Chromium and use that
to locate all the other native libraries.

Note this still doesn't fix the problem of loading an unqualified mozglue
library, but there's not a lot we can do about that right now (and that's not a
new problem, so we can address it in a separate patch).

Differential Revision: https://phabricator.services.mozilla.com/D122909
2021-11-02 18:56:25 +00:00
Agi Sferro 4d6d26edcd Bug 1736433 - Close File Descriptors when disconnecting from a busy service. r=calu,owlish
Failing to close the File Descriptors causes a shutdown hang, as the main
process is not able to detect when the child process dies because we're leaking
the File Descriptors.

Differential Revision: https://phabricator.services.mozilla.com/D128938
2021-11-02 18:17:41 +00:00
Agi Sferro 6825be4e35 Bug 1736433 - Keep log of launch failures in GeckoProcessManager. r=owlish
This patch refactors `GeckoProcessManager`. Before this patch, we would pass
all arguments needed to start a process in every method call, together with the
previous error (if present).

This patch groups the arguments in a class `StartInfo` and keeps the failure
information separately in a list of exceptions that can be used to generate a
log in case of failure.

This patch also fixes two problems:

- We were calling `detachFd` right after connecting to a process, which is
  incorrect when the binding fails, as we still need a reference to the File
  Descriptor to retry the connection. After the patch, we will call detach only
  at the end when we either have established a connection or we have given up.

- We were taking ownership of the File Descriptors from Gecko. This is
  incorrect because Gecko owns them already and calling `close` accidentally
  will crash the app. We now `dup` them instead, using
  `ParcelFileDescriptor.from`.  This also means that the call to `detachFd` is
  now a call to `close`.

Differential Revision: https://phabricator.services.mozilla.com/D128935
2021-11-02 18:17:40 +00:00
Agi Sferro a1ec46fb8c Bug 1736433 - Don't use unneeded Integer.valueOf. r=calu,owlish
The argument is already an `int` so we don't need to call `valueOf`.

Differential Revision: https://phabricator.services.mozilla.com/D128934
2021-11-02 18:17:39 +00:00
Agi Sferro 09be856797 Bug 1736433 - Add InitInfo::builder. r=owlish
This patch adds a builder for InitInfo and allows us to define its members as
final.

This is especially useful for File Descriptors which are all of the same type,
and could be easily swapped in method calls.

Differential Revision: https://phabricator.services.mozilla.com/D128933
2021-11-02 18:17:39 +00:00
Agi Sferro 1b309951d6 Bug 1736433 - Add GeckoResult::finally_. r=owlish,calu
This method is called regardless of whether the GeckoResult completes
successfully or not.

Differential Revision: https://phabricator.services.mozilla.com/D128932
2021-11-02 18:17:38 +00:00
Agi Sferro 69c7fc95b8 Bug 1733423 - Implement getAllLoginsAsync. r=calu,owlish
This patch adds a new API onLoginFetch() which will be called when Gecko needs
access to all logins saved on the device (as opposed to just logins for a
domain).

Differential Revision: https://phabricator.services.mozilla.com/D129862
2021-11-02 15:59:54 +00:00
Norisz Fay 47a4e47af2 Backed out 7 changesets (bug 1729640) for causing Bp-hybrid bustages on LoginDetectionService.o CLOSED TREE
Backed out changeset 4d3532da5652 (bug 1729640)
Backed out changeset 9ec5346cf9d9 (bug 1729640)
Backed out changeset 43dd05680186 (bug 1729640)
Backed out changeset f44a8f37d84c (bug 1729640)
Backed out changeset 66376bee8cef (bug 1729640)
Backed out changeset c7ffe85380d7 (bug 1729640)
Backed out changeset ae9c5de3902a (bug 1729640)
2021-11-02 16:33:01 +02:00
Dimi c31102442d Bug 1729640 - P3. Notify event when a form with password is submitted r=sfoster,tgiles,geckoview-reviewers,agi
Notify "passwordmgr-form-submission-detected" when a form with password
is submitted.
The event should be notified regardless of whether the password manager
decides to show the doorhanger or not. To support this, this patch
also refactors _maybeSendFormInteractionMessage function to distinguish
"onFormSubmit" event and "showDoorhanger" event.

Differential Revision: https://phabricator.services.mozilla.com/D127104
2021-11-02 13:47:48 +00:00
Makoto Kato 1be11f4ee1 Bug 1556983 - Primary pointer capability should be coarse when having touch screen. r=geckoview-reviewers,agi
Many users report that GeckoView returns non-coarse value for primary pointer
capabilities. Actually, we assume that primary pointer device is 1st device by
`InputDevice.getDeviceIds`, but some mobile devices seems not to return touch
screen as 1st item according to user reports.

Also, Android's `InputDevice` API doesn't define what is primary pointer
device, so we cannot assume primary pointer device well.

Other implements are,

- Chrome returns coarse if something input device has coarse capability.
- Firefox for Windows seems to return coarse if it is tablet mode.

So we should return coarse as primary pointer capability when having touch
screen, like Chrome.

But there is still another issue.

When I check some devices (including Android VM on Chrome OS), even if no touch
screen, the `InputDevice`'s source may has `SOURCE_TOUCHSCREEN`. Chrome checks
that fine pointer at first, then it checks coarse pointer. But current GV is
coarse pointer at first. Since the `InputDevice`'s source may have both
`SOURCE_MOUSE` and `SOURCE_TOUCHSCREEN` on touchpad/mouse, GV returns different
result. So we shouldn't check `SOURCE_TOUCHSCREEN` at first.

Differential Revision: https://phabricator.services.mozilla.com/D129901
2021-11-02 02:04:06 +00:00
Sebastian Hengst d21e359bd2 Merge autoland to mozilla-central. a=merge 2021-11-01 22:58:34 +01:00
Agi Sferro 3b13343187 Bug 1738687 - Suggest running ./mach try auto in GV docs. r=calu
Differential Revision: https://phabricator.services.mozilla.com/D130094
2021-11-01 15:54:11 +00:00
Jan-Erik Rediger ba5c77a572 Bug 1708669 - Register FOG custom pings on Android builds to enable Glean functionality. r=chutten,geckoview-reviewers,agi
This instantiates the FOG service, which in turn registers an idle
observer, which is required for FOG IPC to be triggered occasionally.

Glean itself will be controlled by the surrounding Android application.
Glean symbols are shipped in this GeckoView build.
Any metrics recorded in Gecko will be passed through to the Android
application, e.g. Fenix.

This also re-exports `rlb_flush_dispatcher` to be called by Glean Core from the Kotlin side.

Currently this does not support sending custom pings inside Gecko.
Testing Glean metrics in an Android build will be enabled in subsequent commits.

Differential Revision: https://phabricator.services.mozilla.com/D126799
2021-10-22 08:53:28 +00:00
Gabriel Luong c7a4bab1b6 Bug 1732219 - Add API for fetching the preview image. r=geckoview-reviewers,agi,mconley
Differential Revision: https://phabricator.services.mozilla.com/D128815
2021-10-22 06:04:04 +00:00
Narcis Beleuzu d9da4a1ac6 Backed out changeset bd57366e61d8 (bug 1732219) for bc failures on browser_bad_meta_tags.js. CLOSED TREE 2021-10-22 00:46:39 +03:00
Gabriel Luong 4f70f62317 Bug 1732219 - Add API for fetching the preview image. r=geckoview-reviewers,agi,mconley
Differential Revision: https://phabricator.services.mozilla.com/D128815
2021-10-21 18:48:49 +00:00
owlishDeveloper d308ffcc3a Bug 1733737 - Make sure autocomplete search is initialized with a value r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D128278
2021-10-21 18:35:38 +00:00
Andi-Bogdan Postelnicu 0d12e234b2 Bug 1731582 - Move to clang-13 r=firefox-build-system-reviewers,mhentges,decoder
Join work with glandium.

Differential Revision: https://phabricator.services.mozilla.com/D126208
2021-10-20 12:03:20 +00:00
Butkovits Atila c56f15eca0 Backed out changeset 7de44eaecb13 (bug 1731582) as requested by Andi. CLOSED TREE 2021-10-19 20:52:08 +03:00
Andi-Bogdan Postelnicu 151c81623a Bug 1731582 - Move to clang-13 r=firefox-build-system-reviewers,mhentges,decoder
Join work with glandium.

Differential Revision: https://phabricator.services.mozilla.com/D126208
2021-10-19 14:45:59 +00:00
Timothy Nikkel 35a0a509c6 Bug 1734571. Remove old unused layers tiling left over code bits. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D127787
2021-10-19 10:12:25 +00:00
Marian-Vasile Laza 3883f0ad91 Backed out changeset f3cf8baf4f0a (bug 1731582) for causing build bustages. CLOSED TREE 2021-10-19 12:36:47 +03:00
Andi-Bogdan Postelnicu da72439c02 Bug 1731582 - Move to clang-13 r=firefox-build-system-reviewers,mhentges
Join work with glandium.

Differential Revision: https://phabricator.services.mozilla.com/D126208
2021-10-19 08:00:30 +00:00
Evgenia Kotovich 0d0980ee0d Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-18 09:26:33 +00:00
Noemi Erli 2bba3cec69 Backed out changeset 2ab6bb03dcc1 (bug 1576768) for causing failures in test_double_submit.html CLOSED TREE 2021-10-18 02:05:57 +03:00
Evgenia Kotovich 3e3dff109c Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-17 14:59:14 +00:00
Alexandru Michis dac6815201 Backed out changeset 7c08aa027893 (bug 1576768) for causing multiple failures.
CLOSED TREE
2021-10-15 16:52:43 +03:00
Evgenia Kotovich a8b32926fa Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-15 12:58:11 +00:00
Mike Hommey 7debb35262 Bug 1572618 - Statically link the rlbox library to libxul. r=firefox-build-system-reviewers,nika,andi
We still rely on dynamic loading to find the symbols, but since we get
them from libxul, we don't need to load the library before activating
the process sandbox anymore.

Differential Revision: https://phabricator.services.mozilla.com/D128333
2021-10-15 01:17:58 +00:00
Hiroyuki Ikezoe c61c568d4a Bug 1696785 - Use (400x400) display size in SelectionActionDelegateTest to avoid unexpected multiple updateposition events during the test. r=geckoview-reviewers,agi
SelectionActionDelegateTest does just respond a single event in each test cases,
so if there are multiple events we need to respond, the test stops working since
the response will be discarded in SelectionActionDelegateChild.jsm [1].

We use a lager display size here to avoid the situation, in bug 1735655 the situation
will be eliminated.

[1] https://searchfox.org/mozilla-central/rev/0998b61022a1ece43afe3c750077e5804c6c6392/mobile/android/actors/SelectionActionDelegateChild.jsm#260-264

Differential Revision: https://phabricator.services.mozilla.com/D128418
2021-10-14 02:54:58 +00:00
Michael Comella 94cf414dcd Bug 1734935 - add marker for GeckoSession.onLoadRequest. r=agi
Here is a profile demonstrating the change (debug build) when the request is
resolved UI thread -> Gecko thread -> UI thread:
https://share.firefox.dev/3Aru9NW

Here is a profile when the request is resolved synchronously on the UI thread:
https://share.firefox.dev/3BzGTDs

Differential Revision: https://phabricator.services.mozilla.com/D127989
2021-10-12 21:21:42 +00:00
Agi Sferro e8e0f7e153 Bug 1571899 - Format Java codebase with google-java-formatter. r=owlish
This commit was generated by running |./mach lint -l android-formatter --fix|.

Differential Revision: https://phabricator.services.mozilla.com/D127733
2021-10-11 18:11:56 +00:00
Agi Sferro 2bd64785fc Bug 1571899 - Use google-java-format via spotless to enforce Java formatting. r=ahal,owlish
This change adds a new lint `android-format` which enforces formatting of Java
code using google-java-format.

To run the lint simply run:

./mach lint -l android-format

This command also support automatically fixing all errors running by adding
--fix:

./mach lint -l android-format --fix

This change also removes all the formatting-related checkstyle checks which are
now implicitly enforced by the formatter.

Differential Revision: https://phabricator.services.mozilla.com/D127734
2021-10-11 18:11:55 +00:00
Jamie Nicol 54efd0cd5a Bug 1733732 - Disable display port multiplier on Android. r=tnikkel
On Android we currently apply a 4x multiplier to the size of the
display port. When using the old Layers rendering backend, we would
render the non-multiplied "critical display port" at normal
resolution, and if required we would render the inflated display port
in low resolution. This helped avoid checkerboarding.

With webrender we only render what is currently visible on the
screen, so having an inflated display port is probably less
useful. There are still circumstances when it could help avoid
checkerboarding, for example when the main thread is busy it allows
for more scrolling without a new scene being built. But this benefit
is likely outweighed by the increased display list and scene building
time caused by the larger display port.

As a first step this patch simply sets the layers.low-precision-buffer
pref to false, which will prevent us from increasing the display port
size. This will make the change easy to revert in case it does cause
any issues. If this has the desired effect then we can remove the
relevant code in a follow up patch.

Differential Revision: https://phabricator.services.mozilla.com/D128062
2021-10-11 17:52:14 +00:00
Makoto Kato 9408d87ba5 Bug 1734552 - Don't walk though the accessibility nodes on autofill. r=geckoview-reviewers,agi
When Autofill service runs with compatibility mode [*1] (such as Bitwarden),
`View.onProvideAutofillStructure` walks through the accessibility nodes.
Walking through it spends a lot of times.

When checking Android's source code, the following walks through it.

- `onProvideAutofillVirtualStructure`
- `autofill`
- `isVisibleToUserForAutofill`

Actually, since we already add autofill's virtual nodes, it is unnecessary to
walk through it.

*1 https://developer.android.com/reference/android/service/autofill/AutofillService#compatibility-mode

Differential Revision: https://phabricator.services.mozilla.com/D127952
2021-10-11 13:16:45 +00:00
Tomislav Jovanovic 1b801a123d Bug 1708243 - Part 4: Remove tab-content.js and onExtensionBrowser.js, stop touching .content eagerly r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D127750
2021-10-09 22:45:28 +00:00
Michael Comella 97fefdd3af Bug 1734941 - add marker for EventDispatcher handleMessage. r=agi
Here's a sample profile when loading a page while using this marker (debug
build): https://share.firefox.dev/3Fni5kq

Differential Revision: https://phabricator.services.mozilla.com/D127990
2021-10-08 21:39:36 +00:00
Cathy Lu dcdbccb976 Bug 1708815 - Rename enterpiseRootsEnabled r=geckoview-reviewers,agi,owlish
Differential Revision: https://phabricator.services.mozilla.com/D127729
2021-10-07 19:16:41 +00:00
owlishDeveloper 7a6decb12a Bug 1734028 - Update GeckoView Contributor Guide r=geckoview-reviewers,agi,calu
Differential Revision: https://phabricator.services.mozilla.com/D127493
2021-10-06 16:12:02 +00:00
Agi Sferro 4fa08131c7 Bug 1714945 - Add StorageController::setPrivateBrowsingPermanentPermission. r=owlish
Normally, a private browsing session doesn't store any data permamently. This
extends to permissions, which are cleared at the end of the browsing session
(i.e. when the GeckoRuntime is closed or killed).

There are cases, however, where we want to keep the data around. For example
Focus needs to store tracking protection permissions permanently.

For this reason, this patch introduces a new API that allows embedders to set
permanent permissions for private browsing GeckoSession.

This patch also always sends a tracking protection permission for every page
load, this allows embedders to set the tracking protection permission without
using the deprecated API `setPermission`, this was an oversight during the
implementation of the new StorageController API.

Differential Revision: https://phabricator.services.mozilla.com/D126546
2021-10-05 22:09:59 +00:00
Agi Sferro 486cf25495 Bug 1714945 - Clean up PermissionDelegateTest. r=owlish
Removes redundant namespaces, adds some static imports, cleans up some java-ism
(like .equals and semicolons).

Differential Revision: https://phabricator.services.mozilla.com/D126545
2021-10-05 22:09:59 +00:00
Agi Sferro 165f96a8a2 Bug 1714945 - Actually deprecate ContentBlockingController. r=owlish
Differential Revision: https://phabricator.services.mozilla.com/D126543
2021-10-05 22:09:58 +00:00
Agi Sferro 36efcb63bd Bug 1572245 - Add TestRuntimeService to restart runtime in tests. r=owlish
This patch adds a new test service class that can be used to more easily write
a test that needs to run multiple runtimes or needs to reset the runtime.

The service also includes an optional Instance class that can be used to
control the service and send and receive messages from the remote runtime.

Differential Revision: https://phabricator.services.mozilla.com/D126542
2021-10-05 22:09:58 +00:00
Andrew Halberstadt 95449daa6d Bug 1732723 - Rename "taskgraph" Python module to "gecko_taskgraph". r=jmaher
For a long time two copies of the 'taskgraph' module have existed in parallel.
We've attempted to keep them in sync, but over time they have diverged and the
maintenance burden has increased.

In order to reduce this burden, we'd like to re-join the two code bases. The
canonical repo will be the one that lives outside of mozilla-central, and this
module will depend on it. Since they both have the same module name (taskgraph)
we need to rename the version in mozilla-central to avoid collisions.

Other consumers of 'taskgraph' (like mobile repos) have standardized on
'<project>_taskgraph' as their module names. So replicating that here as well.

Differential Revision: https://phabricator.services.mozilla.com/D127118
2021-09-30 09:50:08 -04:00
Makoto Kato c4cc01692d Bug 1672609 - Implement nsWindow::SetCursor to support cursor property on GeckoView. r=geckoview-reviewers,emilio,owlish
This change also supports pointer icon change such as I-beam etc when pointer
is on text box etc.

Differential Revision: https://phabricator.services.mozilla.com/D126062
2021-10-05 11:42:00 +00:00
Makoto Kato ac58befba4 Bug 1672609 - Add GeckoSessionTestRule.synthesizeMouseMove. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D127019
2021-10-05 11:41:59 +00:00
Mirko Brodesser c61c10a2ce Bug 1731994: part 8) Rename `nsIContentPermissionRequest`'s `isHandlingUserInput` to `hasValidTransientUserGestureActivation`. r=edgar
It's more accurate.

Differential Revision: https://phabricator.services.mozilla.com/D126916
2021-10-04 12:16:00 +00:00
owlishDeveloper 82a30bcd6d Bug 1703976 - [1.0] Extend Autocomplete API to support credit card saving r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D111341
2021-10-02 00:28:05 +00:00
Makoto Kato c3d7964c59 Bug 1582606 - Allow data: url on GVE. r=geckoview-reviewers,agi
If data: url has space, it doesn't be recognized as data: url on GVE.

Differential Revision: https://phabricator.services.mozilla.com/D127124
2021-10-01 04:34:10 +00:00
Agi Sferro 1f930e4253 Bug 1557796 - Custom mozconfig for gradle build. r=nalexander,owlish
This patch introduces a new local.settings field: mozilla-central.mozconfig.

This field can be used to set a custom mozconfig file for the gradle build (and
for Android Studio).

The environment variable MOZCONFIG will take precedence over what is defined in
local.settings to allow Gecko engineers to use multiple mozconfig files.

Co-Authored-By: Nick Alexander <nalexander@mozilla.com>

Differential Revision: https://phabricator.services.mozilla.com/D124830
2021-09-29 17:54:57 +00:00
Noemi Erli 5ae6eff43a Backed out changeset 3339b501299a (bug 1703976) for causing geckoview failures CLOSED TREE 2021-09-28 02:38:01 +03:00
owlishDeveloper 20ea47506e Bug 1703976 - [1.0] Extend Autocomplete API to support credit card saving r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D111341
2021-09-27 21:41:13 +00:00
criss f968bf6006 Backed out changeset cd12974c5646 (bug 1703976) for causing lint failures in api.txt. CLOSED TREE 2021-09-28 00:03:31 +03:00
criss 1dc219c943 Backed out changeset ba8b96449fbd (bug 1703976) for causing Lint failures on Autocomplete.java. CLOSED TREE 2021-09-27 23:48:19 +03:00
owlishDeveloper e6812a3528 Bug 1703976 - [2.0] Update API changelog r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D111343
2021-09-27 20:37:06 +00:00
owlishDeveloper de738da4c8 Bug 1703976 - [1.0] Extend Autocomplete API to support credit card saving r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D111341
2021-09-27 20:16:25 +00:00
Alex Lopez 63022efc7a Bug 1696251: Allow mach commands as stand-alone functions and adapt existing commands. r=mhentges,webdriver-reviewers,perftest-reviewers,sparky,whimboo
This removes the `@CommandProvider` decorator and the need to implement
mach commands inside subclasses of `MachCommandBase`, and moves all
existing commands out from classes to module level functions.

Differential Revision: https://phabricator.services.mozilla.com/D121512
2021-09-27 18:12:51 +00:00
Cristian Tuns e3e80a22dc Bug 1717506 Disabled AutofillDelegate on debug build r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D126613
2021-09-27 15:32:57 +00:00
Rob Wu 32398ebd89 Bug 1641735 - Re-enable some tabs tests on Android r=agi,extension-reviewers,zombie
test_ext_tab_runtimeConnect.html can be re-enabled since bug 1534640 got fixed.
test_ext_tabs_reload.html had a race condition.
test_ext_tabs_reload_bypass_cache.html fix similar to bug 1335180.

Differential Revision: https://phabricator.services.mozilla.com/D124090
2021-09-27 13:34:55 +00:00
Rob Wu f3cf76cb48 Bug 1641735 - Code cleanup of some extension tests r=geckoview-reviewers,agi,mixedpuppy
In the past, add_task was generator-based, and tests were automatically
rewritten to use Promises. Some tests have weird constructs such as the
use of Promise.all+await or still using generators. These have been
fixed.

Some tests request the tabs permission without actually needing it.

This patch does not affect the behavior of the tests.

Differential Revision: https://phabricator.services.mozilla.com/D124089
2021-09-27 13:34:55 +00:00
Rob Wu 8c0d686282 Bug 1641735 - Replace unnecessary uses of useAddonManager of ExtensionTestUtils.loadExtension r=zombie,agi,extension-reviewers
In mochitests on Android, ExtensionTestUtils.loadExtension defaults to
`useAddonManager: "android-only"` to allow Android tests to correctly
register with the AddonManager without unnecessarily forcing this
registration on desktop.

This patch removes all unnecessary uses of useAddonManager, to make it
obvious when a test really depends on the AddonManager (on desktop),
opposed to only depending on it indirectly as part of the GeckoView
implementation.

Differential Revision: https://phabricator.services.mozilla.com/D124088
2021-09-27 13:34:54 +00:00
Butkovits Atila eb735ac57e Backed out changeset 53b1fa0faa6d (bug 1696251) for breaking the static-analysis integration. a=backout 2021-09-23 13:06:40 +03:00
owlishDeveloper 800e6ffa5d Bug 1697866 - Add HTTPS-only specific error code and pass it to GeckoView, to handle HTTPS-only specific errors correctly r=agi,JulianWels,nika,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D120914
2021-09-23 01:41:47 +00:00
Noemi Erli 50d4e6c878 Backed out changeset 890d147bad1d (bug 1697866) for causing bustages in WindowGlobalParent.cpp CLOSED TREE 2021-09-23 01:20:43 +03:00
Katherine Patenio d2129b2d30 Bug 1731381 - remove brandProductName properties for Fluent migration r=fluent-reviewers,flod,mtigley
Differential Revision: https://phabricator.services.mozilla.com/D126027
2021-09-22 19:55:57 +00:00
owlishDeveloper 7acebc65af Bug 1697866 - Add HTTPS-only specific error code and pass it to GeckoView, to handle HTTPS-only specific errors correctly r=agi,JulianWels,nika,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D120914
2021-09-22 18:30:39 +00:00
Makoto Kato ac34e350cd Bug 1731517 - GeckoViewStreamListener::WriteSegment returns error instead of crash by java.lang.OutOfMemoryError. r=geckoview-reviewers,agi
It is better to return error instead of crash since
`nsIInputStream::ReadSegment` can handle error.

Differential Revision: https://phabricator.services.mozilla.com/D126060
2021-09-22 09:47:58 +00:00
Christoph Kerschbaumer 62ef76f6fa Bug 1731750: Adjust test loadWithHTTPSOnlyMode to work with https-first-mode enabled r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D126239
2021-09-22 09:45:40 +00:00
Alex Lopez a8e7083c84 Bug 1696251: Allow mach commands as stand-alone functions and adapt existing commands. r=mhentges,webdriver-reviewers,perftest-reviewers,sparky,whimboo
This removes the `@CommandProvider` decorator and the need to implement
mach commands inside subclasses of `MachCommandBase`, and moves all
existing commands out from classes to module level functions.

Differential Revision: https://phabricator.services.mozilla.com/D121512
2021-09-21 20:38:16 +00:00
Butkovits Atila c06a3dd9fa Backed out changeset 510dd46a9de7 (bug 1696251) for causing Android build bustages. 2021-09-21 05:16:50 +03:00
Alex Lopez fe61e94ec8 Bug 1696251: Allow mach commands as stand-alone functions and adapt existing commands. r=mhentges,webdriver-reviewers,perftest-reviewers,sparky,whimboo
This removes the `@CommandProvider` decorator and the need to implement
mach commands inside subclasses of `MachCommandBase`, and moves all
existing commands out from classes to module level functions.

Differential Revision: https://phabricator.services.mozilla.com/D121512
2021-09-20 20:21:07 +00:00
Katherine Patenio 4b0addaf02 Bug 1730972 - remove brandProductName from DTD. r=mtigley
Differential Revision: https://phabricator.services.mozilla.com/D125750
2021-09-20 14:39:05 +00:00
Noemi Erli 91aa2e2b9c Backed out changeset 5f5b612878f3 (bug 1696251) for causing multiple bustages 2021-09-18 02:22:39 +03:00
John Lin bae830176f Bug 1665776 - p5: add VPx support to AndroidEncoderModule. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D121022
2021-09-17 19:10:59 +00:00
Alex Lopez bf860fe7dc Bug 1696251: Allow mach commands as stand-alone functions and adapt existing commands. r=mhentges,webdriver-reviewers,perftest-reviewers,sparky,whimboo
This removes the `@CommandProvider` decorator and the need to implement
mach commands inside subclasses of `MachCommandBase`, and moves all
existing commands out from classes to module level functions.

Differential Revision: https://phabricator.services.mozilla.com/D121512
2021-09-17 19:00:39 +00:00
Rob Wu b92b9a1695 Bug 1728461 - Properly remove startup canary on Android to avoid purged caches r=agi,rpl,mossop
See https://bugzilla.mozilla.org/show_bug.cgi?id=1728461#c12 for
the analysis of the problem.

Differential Revision: https://phabricator.services.mozilla.com/D125131
2021-09-16 14:25:45 +00:00
Makoto Kato 00b8414f9b Bug 1717464 - Handle ACTION_CANCEL for TrackPad scroll. r=geckoview-reviewers,agi
This will be a bug of Android VM on Chrome OS.

When touching trackpad, Android VM on Chrome OS might fire scroll event for
trackpad, then, it fires cancel event immediately.

Actually, since we don't consider this situation, APZ detects that this is
log tap unfortunately.

So we should dispatch ACTION_CANCEL as scroll event.

Differential Revision: https://phabricator.services.mozilla.com/D125643
2021-09-16 00:57:18 +00:00