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
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
When tapping accessiblecaret and moving/releasing it, the follow error occurs.
```
GeckoViewContent[C]: handleEvent: mozcaretstatechanged
Web Content: [JavaScript Error: "TypeError: can't access property "sendRequest", this.eventDispatcher is undefined" {file: "resource:///actors/GeckoViewContentChild.jsm" line: 291}]
Web Content: handleEvent@resource:///actors/GeckoViewContentChild.jsm:291:11
```
I think that we miss super.actorCreated() call in actorCreate(). This might be
regression by bug 1661480.
Differential Revision: https://phabricator.services.mozilla.com/D124639
Hiro found this race condition.
The problem is in this code:
```
338: this.eventDispatcher
339: .sendRequestForResult(message)
340: .then(sessionId => {
341: return this.waitAndSetupWindow(sessionId, aOpenWindowInfo, aName);
342: })
```
At line 339 we ask the Java front-end to create a session and return back the
id of the session just created.
We then, at line 341, wait until the `geckoview-window-created` event fires
which signals that the session has been opened. We then _synchronously_ set
some attributes on the window object that allows us to connect the Java session
to the JavaScript window object.
Synchronicity is important as right after the `geckoview-window-created` event
fires all actors expect the embedderElement to be set on the window.
This, however, races with the code that creates the session:
```
540: } else if ("GeckoView:OnNewSession".equals(event)) {
541: final String uri = message.getString("uri");
542: final GeckoResult<GeckoSession> result = delegate.onNewSession(GeckoSession.this, uri);
...
547:
548: callback.resolveTo(result.map(session -> {
...
562: session.open(GeckoSession.this.mWindow.runtime);
563: return session.getId();
564: }));
```
As you can see, at line 562 we open the session, which asynchronously builds
the Gecko window and eventually fires the `geckoview-window-create` event. In
most cases, the message with the sessionId, sent at line 563, reaches the
JavaScript layer before the window has been opened, but sometimes it doesn't.
When the window opens before the JavaScript layer receives the sessionId back,
the promise at line 341 will never complete, causing intermittent failures in
our testing harness (and causing missing windows in consumer devices).
To fix this problem we modify the timing of creating the GeckoSession id.
The GeckoSession id only makes sense when the session is associated to a
GeckoRuntime instance, as the id is only used by Gecko. We can thus generate
the id whenever the Session is opened.
For sessions that are opened by the embedder directly, we can generate the id
randomly like usual. However, when the session is opened as a result of a
onNewSession (or onNewTab) call, we will set the id of the session using the id
given by the JavaScript layer.
This will enable the JavaScript layer to wait for the `geckoview-window-create`
before the Java layer has opportunity to respond, fixing the race condition.
Co-Authored-By: Hiroyuki Ikezoe <hikezoe.birchill@mozilla.com>
Differential Revision: https://phabricator.services.mozilla.com/D124502
Actually `inputConnection_sendKeyEvent` test is rarely failed such as bug
1676245. Because we have no way to wait for correct selection data.
`TextInputDelegate.updateSelection` isn't called when view isn't attached to
window like geckoview-junit case.
So I would like to comment out this check now.
Depends on D124435
Differential Revision: https://phabricator.services.mozilla.com/D124436
The code in this patch is not needed anymore because now we can handle multiple
in-app runtimes after Bug 1696460.
This reverts commit d49a34c51bc537caffcd559cda07be994105cebb.
Differential Revision: https://phabricator.services.mozilla.com/D123980
This commit allows Android to use the login storage for HTTP auth by migrating
some common toolkit code to promptUsernameAndPassword and promptPassword which
use the login storage.
Differential Revision: https://phabricator.services.mozilla.com/D122508
Historically, only session delegates have been allowed in GeckoSessionTestRule
utilities like delegateUntilTestEnd or delegateDuringNextWait.
There's no reason it has to be that way though, and allowing runtime delegates
to use the same utilities removes a lot of boilerplate code that we don't need.
Differential Revision: https://phabricator.services.mozilla.com/D122507
Almost all delegates have getters except for these two. These are also helpful
when implementing delegateUntilTestEnd for runtime delegates.
Differential Revision: https://phabricator.services.mozilla.com/D122505
This change adds a new API that allows Gecko to dismiss a prompt automatically.
This will be used to dismiss prompts when they shouldn't be displayed anymore,
e.g. when using basic auth, we hide the prompt if the server rejects the login
information, as we know that the login info is not correct, so there's no point
in saving it.
We will also dismiss prompts automatically when they become stale, e.g. if a
permission prompt is raised and then the user navigates away.
To be able to dismiss a prompt we need to keep track of existing prompt
instances for a Session. We assign each prompt a unique, randomly generated,
UUID that is used to match the javascript prompt instance with the java
counterpart.
The prompts are stored in PromptHolder. Because the PromptController is owned
by the GeckoSession, whenever the session is GC'd we will also release the
prompts associated to it (if any).
Differential Revision: https://phabricator.services.mozilla.com/D122504
The code in this patch is not needed anymore because now we can handle multiple
in-app runtimes after Bug 1696460.
This reverts commit d49a34c51bc537caffcd559cda07be994105cebb.
Differential Revision: https://phabricator.services.mozilla.com/D123980
This commit allows Android to use the login storage for HTTP auth by migrating
some common toolkit code to promptUsernameAndPassword and promptPassword which
use the login storage.
Differential Revision: https://phabricator.services.mozilla.com/D122508
Historically, only session delegates have been allowed in GeckoSessionTestRule
utilities like delegateUntilTestEnd or delegateDuringNextWait.
There's no reason it has to be that way though, and allowing runtime delegates
to use the same utilities removes a lot of boilerplate code that we don't need.
Differential Revision: https://phabricator.services.mozilla.com/D122507
Almost all delegates have getters except for these two. These are also helpful
when implementing delegateUntilTestEnd for runtime delegates.
Differential Revision: https://phabricator.services.mozilla.com/D122505
This change adds a new API that allows Gecko to dismiss a prompt automatically.
This will be used to dismiss prompts when they shouldn't be displayed anymore,
e.g. when using basic auth, we hide the prompt if the server rejects the login
information, as we know that the login info is not correct, so there's no point
in saving it.
We will also dismiss prompts automatically when they become stale, e.g. if a
permission prompt is raised and then the user navigates away.
To be able to dismiss a prompt we need to keep track of existing prompt
instances for a Session. We assign each prompt a unique, randomly generated,
UUID that is used to match the javascript prompt instance with the java
counterpart.
The prompts are stored in PromptHolder. Because the PromptController is owned
by the GeckoSession, whenever the session is GC'd we will also release the
prompts associated to it (if any).
Differential Revision: https://phabricator.services.mozilla.com/D122504
Depending on glean creates a circular dependency as glean depends on
glean-native which is substituted with GeckoView in omni builds.
Since Gradle 6 capabilities are passed on to consumers using the Gradle Module
Metadata, so now we can just define a glean capability in GeckoView and Fenix
will consume glean-native from GeckoView instead of adding a duplicated
libglean blob (there is code in the glean plugin to make sure this happens).
See also: https://docs.gradle.org/current/userguide/component_capabilities.html
Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>
Differential Revision: https://phabricator.services.mozilla.com/D123572
There's a lot of code that we don't need anymore in our publication path (I'm
assuming it was needed when it was written but then gradle/the android plugin
caught up).
This has the nice side effect of producing better metadata (e.g. our
implementation dependencies end up in the |runtime| dependency group instead of
the default one where they were before, which means the app doesn't inherit our
private dependencies).
Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>
Differential Revision: https://phabricator.services.mozilla.com/D123571
This is the last version that doesn't require Java 11, we will upgrade to
Gradle 7 once all components are ready (namely, apilint).
Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>
Differential Revision: https://phabricator.services.mozilla.com/D123569
Looks like 6G is not enough for an ASAN build when updating the gradle version.
I tried 8G and 16G on try but that's not enough either.
This also:
* Moves the asan job to `b-linux-large` as the `b-linux` builder does not have
enough memory to run this build.
* Stops running a full build during lints, which is not necessary (and
sometimes uses more memory than the build runner has, failing the lint).
Differential Revision: https://phabricator.services.mozilla.com/D123970
Although we set all selected text to intent that is text processing, it may
cause `RemoteException` since binder cannot handle large data.
So we should truncate the text if it is more than 100K. This value is same as
Blink's limitation (https://crbug.com/1077599).
Differential Revision: https://phabricator.services.mozilla.com/D123410
Depending on glean creates a circular dependency as glean depends on
glean-native which is substituted with GeckoView in omni builds.
Since Gradle 6 capabilities are passed on to consumers using the Gradle Module
Metadata, so now we can just define a glean capability in GeckoView and Fenix
will consume glean-native from GeckoView instead of adding a duplicated
libglean blob (there is code in the glean plugin to make sure this happens).
See also: https://docs.gradle.org/current/userguide/component_capabilities.html
Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>
Differential Revision: https://phabricator.services.mozilla.com/D123572
There's a lot of code that we don't need anymore in our publication path (I'm
assuming it was needed when it was written but then gradle/the android plugin
caught up).
This has the nice side effect of producing better metadata (e.g. our
implementation dependencies end up in the |runtime| dependency group instead of
the default one where they were before, which means the app doesn't inherit our
private dependencies).
Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>
Differential Revision: https://phabricator.services.mozilla.com/D123571
This is the last version that doesn't require Java 11, we will upgrade to
Gradle 7 once all components are ready (namely, apilint).
Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>
Differential Revision: https://phabricator.services.mozilla.com/D123569
Looks like 6G is not enough for an ASAN build when updating the gradle version.
I tried 8G on try but that's not enough either.
Differential Revision: https://phabricator.services.mozilla.com/D123970
When focus isn't changed and inputmode in focused element is changed to none,
we should dismiss software keyboard.
Also, this has same issue for changing from none to text to show software
keyboard.
When changing inputmode, icNotifyIMEContext is called then we should control
software keyboard open/close state too.
Differential Revision: https://phabricator.services.mozilla.com/D122491
Depending on glean creates a circular dependency as glean depends on
glean-native which is substituted with GeckoView in omni builds.
Since Gradle 6 capabilities are passed on to consumers using the Gradle Module
Metadata, so now we can just define a glean capability in GeckoView and Fenix
will consume glean-native from GeckoView instead of adding a duplicated
libglean blob (there is code in the glean plugin to make sure this happens).
See also: https://docs.gradle.org/current/userguide/component_capabilities.html
Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>
Differential Revision: https://phabricator.services.mozilla.com/D123572
There's a lot of code that we don't need anymore in our publication path (I'm
assuming it was needed when it was written but then gradle/the android plugin
caught up).
This has the nice side effect of producing better metadata (e.g. our
implementation dependencies end up in the |runtime| dependency group instead of
the default one where they were before, which means the app doesn't inherit our
private dependencies).
Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>
Differential Revision: https://phabricator.services.mozilla.com/D123571
This is the last version that doesn't require Java 11, we will upgrade to
Gradle 7 once all components are ready (namely, apilint).
Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>
Differential Revision: https://phabricator.services.mozilla.com/D123569
The purpose of this is to remove as many docstrings from CommandProvider
classes to make the step of moving commands out of classes simpler.
Where possible, the docstring has been moved to or merged with the function.
Differential Revision: https://phabricator.services.mozilla.com/D123288
This commit allows Android to use the login storage for HTTP auth by migrating
some common toolkit code to promptUsernameAndPassword and promptPassword which
use the login storage.
Differential Revision: https://phabricator.services.mozilla.com/D122508
Historically, only session delegates have been allowed in GeckoSessionTestRule
utilities like delegateUntilTestEnd or delegateDuringNextWait.
There's no reason it has to be that way though, and allowing runtime delegates
to use the same utilities removes a lot of boilerplate code that we don't need.
Differential Revision: https://phabricator.services.mozilla.com/D122507
Almost all delegates have getters except for these two. These are also helpful
when implementing delegateUntilTestEnd for runtime delegates.
Differential Revision: https://phabricator.services.mozilla.com/D122505
This change adds a new API that allows Gecko to dismiss a prompt automatically.
This will be used to dismiss prompts when they shouldn't be displayed anymore,
e.g. when using basic auth, we hide the prompt if the server rejects the login
information, as we know that the login info is not correct, so there's no point
in saving it.
We will also dismiss prompts automatically when they become stale, e.g. if a
permission prompt is raised and then the user navigates away.
To be able to dismiss a prompt we need to keep track of existing prompt
instances for a Session. We assign each prompt a unique, randomly generated,
UUID that is used to match the javascript prompt instance with the java
counterpart.
The prompts are stored in PromptHolder. Because the PromptController is owned
by the GeckoSession, whenever the session is GC'd we will also release the
prompts associated to it (if any).
Differential Revision: https://phabricator.services.mozilla.com/D122504
It's an unnecessary difference with our other clang builds. It looks
like it was cargo-culted from some external script. It makes the
android-cross clang different in the way it finds e.g. compiler
runtimes, some of which are in lib/, and others in lib64/, and only the
latter are actually found.
Differential Revision: https://phabricator.services.mozilla.com/D123017
Glean introduced a new type of dependencies (for us), "api". Since we build our
pom file manually we need to look at api dependencies too now.
Differential Revision: https://phabricator.services.mozilla.com/D122869
AFAICT, all roads lead though [`nsAppStartup::Quit`](https://searchfox.org/mozilla-central/rev/0fec57c05d3996cc00c55a66f20dd5793a9bfb5d/toolkit/components/startup/nsAppStartup.cpp#448),
which is responsible for firing the `"quit-application"` observer notification
and then posting the `nsAppExitEvent` that causes the `nsAppShell` to break out
of its event loop and proceed with shutdown.
If we trigger a native crash in the observer, we should be able to capture a
symbolicated stack of whatever called `Quit`. We might as well force-crash
anyway, since AC is going to throw an exception regardless...
Before we crash, we annotate the current `GeckoThread` state to enable us to
find out whether we were fully initialized at the time of the shutdown.
Differential Revision: https://phabricator.services.mozilla.com/D122256
AFAICT, all roads lead though [`nsAppStartup::Quit`](https://searchfox.org/mozilla-central/rev/0fec57c05d3996cc00c55a66f20dd5793a9bfb5d/toolkit/components/startup/nsAppStartup.cpp#448),
which is responsible for firing the `"quit-application"` observer notification
and then posting the `nsAppExitEvent` that causes the `nsAppShell` to break out
of its event loop and proceed with shutdown.
If we trigger a native crash in the observer, we should be able to capture a
symbolicated stack of whatever called `Quit`. We might as well force-crash
anyway, since AC is going to throw an exception regardless...
Before we crash, we annotate the current `GeckoThread` state to enable us to
find out whether we were fully initialized at the time of the shutdown.
Differential Revision: https://phabricator.services.mozilla.com/D122256
The problem here is that the release artifactId was using single quotes instead
of double. I rewrote this code a little bit to avoid this sort of problem next
time by not having a release-build-only conditional branch.
Differential Revision: https://phabricator.services.mozilla.com/D122496
This function will be used in the next commit to make sure there's no remaining
paint requests before proceeding each test cases. This code was mostly copied
and pasted from the commit when we introduced flushApzRepaints in bug 1660357.
This `promiseAllPaintsDone` is a simplified version of promiseAllPaintsDone in
paint_listener.js. Though the paint_listener version is supposed to be loaded
and supposed to add an event listener for MozAfterPaint events in the first
place, whereas this version is supposed to keep adding an event listener for a
MozAfterPaint event until there's no pending paint request when it gets called,
it's a compromise but it should work as expected in most cases.
Differential Revision: https://phabricator.services.mozilla.com/D122310
And make sure the caret ends up being visible, rather than _not_
visible.
This should be implementable on windows as well. It seems macOS doesn't
have a timeout thing.
Differential Revision: https://phabricator.services.mozilla.com/D122132
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.
The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
state such as the current remoteType when possible. This makes reasoning
about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
ensure that if an existing document in the same BCG is found, the load will
finish in the required content process. This should make dynamic checks such
as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
easier to log just the information related to process selection when
debugging.
5. Null result principal precursors are considered when performing process
selection.
Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.
Differential Revision: https://phabricator.services.mozilla.com/D120673
In GeckoView we need to depend on the same Glean version as the included
Glean Rust crate has.
We _could_ let Gradle read that from Cargo.lock directly,
but that complicates the build.
Instead we manually update both versions to the same
and have Gradle ensure we don't forget that.
Differential Revision: https://phabricator.services.mozilla.com/D116602
This also upgrades to Kotlin 1.3.50, which is required to due Glean
requirements. Fenix is already on 1.4, so that's no problem.
We also turn the geckoview_example into a multiDex application.
Otherwise we run into the 64k dex symbols size limit.
Differential Revision: https://phabricator.services.mozilla.com/D116601
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.
The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
state such as the current remoteType when possible. This makes reasoning
about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
ensure that if an existing document in the same BCG is found, the load will
finish in the required content process. This should make dynamic checks such
as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
easier to log just the information related to process selection when
debugging.
5. Null result principal precursors are considered when performing process
selection.
Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.
Differential Revision: https://phabricator.services.mozilla.com/D120673
Actually, Gecko cannot set caret position that is out of composing range. When
having composition, caret (in other word, IME caret) has to be within composing
string.
But Android's text framework can set caret position (selection) that is out of
composing range. Example, Android can have the following. `"ABCD[]"` is current
text and `[]` is selection and AB is composing string. But Gecko cannot.
So if this situation, we have to remove composing state then set selection from
Android's.
Differential Revision: https://phabricator.services.mozilla.com/D121502
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.
The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
state such as the current remoteType when possible. This makes reasoning
about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
ensure that if an existing document in the same BCG is found, the load will
finish in the required content process. This should make dynamic checks such
as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
easier to log just the information related to process selection when
debugging.
5. Null result principal precursors are considered when performing process
selection.
Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.
Differential Revision: https://phabricator.services.mozilla.com/D120673
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.
The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
state such as the current remoteType when possible. This makes reasoning
about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
ensure that if an existing document in the same BCG is found, the load will
finish in the required content process. This should make dynamic checks such
as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
easier to log just the information related to process selection when
debugging.
5. Null result principal precursors are considered when performing process
selection.
Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.
Differential Revision: https://phabricator.services.mozilla.com/D120673
In GeckoView we need to depend on the same Glean version as the included
Glean Rust crate has.
We _could_ let Gradle read that from Cargo.lock directly,
but that complicates the build.
Instead we manually update both versions to the same
and have Gradle ensure we don't forget that.
Differential Revision: https://phabricator.services.mozilla.com/D116602
This also upgrades to Kotlin 1.3.50, which is required to due Glean
requirements. Fenix is already on 1.4, so that's no problem.
We also turn the geckoview_example into a multiDex application.
Otherwise we run into the 64k dex symbols size limit.
Differential Revision: https://phabricator.services.mozilla.com/D116601
This patch removes the `extensions.webextPermissionPrompts` pref as well as
`permissionPromptsEnabled` prop on `mozAddonManager`.
While working on this patch, we noticed that some of the `browser_webapi.js`
weren't testing anything for a while now. That has been fixed. In addition,
the `test_blocklistchange.js` file has been updated to handle the permissions
prompt.
Differential Revision: https://phabricator.services.mozilla.com/D121114
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.
The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
state such as the current remoteType when possible. This makes reasoning
about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
ensure that if an existing document in the same BCG is found, the load will
finish in the required content process. This should make dynamic checks such
as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
easier to log just the information related to process selection when
debugging.
5. Null result principal precursors are considered when performing process
selection.
Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.
Differential Revision: https://phabricator.services.mozilla.com/D120673
Two issues:
1. We were missing the `originAttributes` argument to `nsICertOverrideService.hasMatchingOverride`.
2. If the override *does* exist, we should flagging it as insecure.
I also enhanced a test to check this.
Differential Revision: https://phabricator.services.mozilla.com/D121009
* Per advice from Emilio on Matrix, I consolidated overflow checks into `ScrollFrameHelper::GetOverflowState()`.
* In `ScrollFrameHelper::ReflowFinished` we detect the condition requring the app to expand the toolbar.
(Hiro, I know that you suggested a second place to detect this. If you feel that it is important enough to add that,
we'd prefer filing a follow-up bug in Layout for that case that your team can follow up on.)
* We then propagate the notification through `PresShell`, up through `PBrowser`, through the `nsWindow`, then into the `GeckoSession`
* We invoke a new method on the `ContentDelegate`. This seemed like the reasonable delegate to use given other existing
callbacks in the similar vein (such as going fullscreen), but let me know if this should go elsewhere.
* We update GVE and JUnit tests to test this.
Differential Revision: https://phabricator.services.mozilla.com/D120499
This allows us to style them with system colors. The SVGs are comment 2
but:
* Cleaned up manually (removed random ids / namespaces / etc).
* With -moz-accent-color as the fill color rather than orange.
* With license added (since it was added by a mozilla.com address I'm
pretty sure we can use them pretty much as-is, thanks :antlam!).
Differential Revision: https://phabricator.services.mozilla.com/D120910
I tied it to the use-theme-accent bit in non-native-theme just for
convenience (so that form controls just react to this).
This works nicely, but I didn't turn this on by default because the
accessiblecaret images are hardcoded-blue pngs, and they look ugly
without being the same color as the native accent.
Differential Revision: https://phabricator.services.mozilla.com/D120898
It probably did something more useful in the past, but right now it's
only used to avoid throttling some overflow-causing animations.
It returns 0 everywhere except on Android (for some reason?), but in any
case it doesn't seem this would need to be a LookAndFeel integer, it
could just be a regular pref that we turn on for tests.
However the tests pass with this patch locally, so for now I'm not
adding a pref to replace it.
Differential Revision: https://phabricator.services.mozilla.com/D120871
This patch adds a new GeckoView build variant dubbed "lite". We are in the
process of adding some optional dependencies to GeckoView that are needed by
Fenix (like Glean and Nimbus) which are likely not going to be used by anyone
else at Mozilla. To avoid bloating third party consumers, we provide a
geckoview-lite build that doesn't contain any optional dependency.
The min SDK version of GeckoView (non-lite) is being increased to 21 to match
Glean's min SDK. Given that Fenix's min SDK version is already 21 and that the
lite version's min SDK is still at 16 this change is safe to do and will not
incur in any loss of usability.
Differential Revision: https://phabricator.services.mozilla.com/D114370
The ARM emulator images have very poor support and haven't been updated for a
long time.
Normally x86_64 images need KVM acceleration which is not available on build
machines (see Bug 1545497). We can work around this by starting the emulator
with the command line |--no-accel|.
Differential Revision: https://phabricator.services.mozilla.com/D119223
This patch adds a new GeckoView build variant dubbed "lite". We are in the
process of adding some optional dependencies to GeckoView that are needed by
Fenix (like Glean and Nimbus) which are likely not going to be used by anyone
else at Mozilla. To avoid bloating third party consumers, we provide a
geckoview-lite build that doesn't contain any optional dependency.
The min SDK version of GeckoView (non-lite) is being increased to 21 to match
Glean's min SDK. Given that Fenix's min SDK version is already 21 and that the
lite version's min SDK is still at 16 this change is safe to do and will not
incur in any loss of usability.
Differential Revision: https://phabricator.services.mozilla.com/D114370
The ARM emulator images have very poor support and haven't been updated for a
long time.
Normally x86_64 images need KVM acceleration which is not available on build
machines (see Bug 1545497). We can work around this by starting the emulator
with the command line |--no-accel|.
Differential Revision: https://phabricator.services.mozilla.com/D119223
This step removes all the dependencies of mach commands to
having a MachCommandBase as the `self` by using the `command_context`
argument instead. This also removes any remaining statefulness from those
classes that implement mach commands, ultimately making it easier to move
existing commands out of classes in a follow-up.
Differential Revision: https://phabricator.services.mozilla.com/D118058
This patch adds a new GeckoView build variant dubbed "lite". We are in the
process of adding some optional dependencies to GeckoView that are needed by
Fenix (like Glean and Nimbus) which are likely not going to be used by anyone
else at Mozilla. To avoid bloating third party consumers, we provide a
geckoview-lite build that doesn't contain any optional dependency.
The min SDK version of GeckoView (non-lite) is being increased to 21 to match
Glean's min SDK. Given that Fenix's min SDK version is already 21 and that the
lite version's min SDK is still at 16 this change is safe to do and will not
incur in any loss of usability.
Differential Revision: https://phabricator.services.mozilla.com/D114370
The ARM emulator images have very poor support and haven't been updated for a
long time.
Normally x86_64 images need KVM acceleration which is not available on build
machines (see Bug 1545497). We can work around this by starting the emulator
with the command line |--no-accel|.
Differential Revision: https://phabricator.services.mozilla.com/D119223
This step removes all the dependencies of mach commands to
having a MachCommandBase as the `self` by using the `command_context`
argument instead. This also removes any remaining statefulness from those
classes that implement mach commands, ultimately making it easier to move
existing commands out of classes in a follow-up.
Differential Revision: https://phabricator.services.mozilla.com/D118058
The ARM emulator images have very poor support and haven't been updated for a
long time.
Normally x86_64 images need KVM acceleration which is not available on build
machines (see Bug 1545497). We can work around this by starting the emulator
with the command line |--no-accel|.
Differential Revision: https://phabricator.services.mozilla.com/D119223
The fact that we were checking for `extensions` seems like a typo to me? We
never set anything other than `fidoAppId` in the `extensions` bundle, which
makes sense to me (authenticatorAttachment is not an extension from what I can
tell).
Differential Revision: https://phabricator.services.mozilla.com/D119675
Package a summary of the RemoteSettings dumps with the application, so
that RemoteSettings clients can look up the last_modified value of a
dump without loading the whole JSON dump file.
For simplicity, the initial version of `gen_last_modified.py` generates
only one entry for the only present use case. A more generic version of
the script will be implemented in bug 1719560.
Differential Revision: https://phabricator.services.mozilla.com/D119336
By bug 1697680, Gecko removes Presentation API. `Wifi:GetIPAddress` was only used on this API implementation.
So now, this is unused.
Differential Revision: https://phabricator.services.mozilla.com/D118911
When landing bug 1711626, I reuse /assets/www/forms.html for this issue. But
this causes unexpected issue. Although this HTML has iframe,
`loadTestPath(FORMS_HTML_PATH)` doesn't wait for iframe content, so then,
it seems to cause unexpected form initialization and editorInfo becomes
invalid value.
So I would like to rewrite this test.
InputConnection is updated asynchronously, so we need to check whether it is
created. Then even if it is created, editorInfo may not be ready. So we need
to flush IC's thread task.
Differential Revision: https://phabricator.services.mozilla.com/D118371
This is slightly complicated by the fact that the editor code wants to be able
to set this from the content process, so we really need separate
BrowsingContext and WindowContext flags, the latter of which can be set by the
owning process.
Differential Revision: https://phabricator.services.mozilla.com/D114899
Extension.jsm, ContextualIdentityService.jsm and GeckoViewConsole.jsm still reference browser.properties.
Depends on D117622
Differential Revision: https://phabricator.services.mozilla.com/D117623
`GeckoHlsPlayer.release()` releases `ExoPlayer` object on player thread. But it
doesn't wait for whether it calls stop and callback is released. But
`HLSDecoder` calls `GeckoHLSResourceWrapper.destroy()` then dispose JNI
callback object immediately. So `GeckoHlsPlayer` may calls callback even if
callback is disposed.
We should check `mReleasing` before calling callback.
Differential Revision: https://phabricator.services.mozilla.com/D117505