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
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
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
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
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
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
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
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
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
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
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
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
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
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
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