The problem here is that sometimes the test clicks on the two links too quickly
and only the second click goes through the onBeforeUnload path and the first
one is ignored.
Differential Revision: https://phabricator.services.mozilla.com/D82442
The problem here is that sometimes the test clicks on the two links too quickly
and only the second click goes through the onBeforeUnload path and the first
one is ignored.
Differential Revision: https://phabricator.services.mozilla.com/D82442
If client script wants to commit composition string per input, it sometimes
use the following script.
```
let input = document.getElementById('input');
input.addEventListener('input', () => {
input.blur();
input.focus();
});
```
Since `blur` will commit composition string, this script can commit text. But
since Gecko has an optimization for this situation, focus won't be lost
completely.
Although GeckoView synchronizes Java text and selection with Gecko text when
getting focus, this sample may be failed due to timing issue. `blur` tries to
commit string, but result is never returned since focus is lost as temporary
(although text is finally committed in Gecko.). Then, GeckoView are waiting
for result that is never returned forever, So this synchronization is failed.
When getting focus again, we should synchronize it at force.
Differential Revision: https://phabricator.services.mozilla.com/D80147
I intend to uplift this patch to v79, so the changelog references 79 and the
version for removal is indicated as v82.
Differential Revision: https://phabricator.services.mozilla.com/D82033
Note: These comments reference GeckoView 82 instead of GeckoView 83 because I
plan to uplift this to GeckoView 79. Ditto for the changelog entry.
Tests that use the parcelable functionality are flagged to ignore deprecation
warnings.
Differential Revision: https://phabricator.services.mozilla.com/D81768
Note: These comments reference GeckoView 82 instead of GeckoView 83 because I
plan to uplift this to GeckoView 79. Ditto for the changelog entry.
Tests that use the parcelable functionality are flagged to ignore deprecation
warnings.
Differential Revision: https://phabricator.services.mozilla.com/D81768
The profiler can be "paused", which stops sampling, and since bug 1578329 stops markers as well.
Some test suites use pausing between tests (to better differentiate the tests, to keep the profiler ready to run, and to lower the amount of recorded data). But this causes problems with some tracing markers, as their matching ends have not been recorded (e.g., an end marker is missing), which show up as very loooong markers.
To solve this, we need to be able to pause sampling only, but keep recording markers.
But we still need to be able to pause the whole profiler, in particular before capturing, to avoid recording anything around that time.
This big patch is mostly mechanical changes: Wherever there are "Pause" and "Unpause/Resume" profiler functions, we add matching "PauseSampling" and "UnpauseSampling/ResumeSampling" functions that only impact the periodic sampling loop; And existing "Pause/Unpause/Resume" imply pausing sampling as well.
Exceptions and extra work:
- nsIProfiler (the JS API) already had `Pause/ResumeSampling()`, which misleadingly paused everything! Now they do the right thing, and we have `Pause/Resume()` as well.
- All tests using `Pause/ResumeSampling()` now use `Pause/Resume()`, except for Talos tests that only pause sampling between tests; Added some extra `Pause()` calls to pause everything before capturing profiles.
- GeckoJavaSampler doesn't handle pausing/resuming everything, this should be done in a follow-up bug.
- Sampling-only pauses are not streamed into JSON. If needed, we should follow-up, with potential work on the front-end to deal with these.
Differential Revision: https://phabricator.services.mozilla.com/D81492
Because jar_maker is not in the libs tier, we also rename the libs-%
targets for l10n repacks to l10n-%, which make it clearer what they are
for.
And because multilocale.txt is both a GeneratedFile and a file that is
generated (and installed) via manual build rules, keeping it in the misc
target actually breaks building in toolkit/locales during l10n repacks,
so move it to libs for now.
Differential Revision: https://phabricator.services.mozilla.com/D81766
The only fallout from part 1 is a single test where we run `evaluateJS` on a session, serialize it to a `Parcel`,
deserialize it to new, distinct `GeckoSession` object, and then perform additional `evaluateJS` on the latter.
Since the deserialization of the `Parcel` transferred the session's contents from the original session to the new
session, we also need to transfer the `WebExtension.Port` used by `evaluateJS` to the new session.
Note that this fix is kind of hacky, but because we are going to deprecate the parcelability of `GeckoSession`, I
do not believe that it is worth the effort to implement a "perfect" fix; that would likely involve adding new APIs
to support another API that we are going to deprecate anyway.
Depends on D81746
Differential Revision: https://phabricator.services.mozilla.com/D81748
Because `GeckoSession`'s overrides of `hashCode` and `equals` look solely at session ID, this may cause
strange behaviors if a `GeckoSession` is reloaded with session state from a previous instance, and the
previous instance still exists. For example, suppose the previous instance is closed and the new instance is
open. As far as the Android runtime is concerned, both objects are equivalent. Trying to insert both objects
into the same container will not work as expected.
In this patch, we revert those overrides. To ensure that we still have a short-circuit path in
`GeckoView.restoreSession`, we add and utilize a new, `package`-scoped, `equalsId` method.
Differential Revision: https://phabricator.services.mozilla.com/D81746
The only fallout from part 1 is a single test where we run `evaluateJS` on a session, serialize it to a `Parcel`,
deserialize it to new, distinct `GeckoSession` object, and then perform additional `evaluateJS` on the latter.
Since the deserialization of the `Parcel` transferred the session's contents from the original session to the new
session, we also need to transfer the `WebExtension.Port` used by `evaluateJS` to the new session.
Note that this fix is kind of hacky, but because we are going to deprecate the parcelability of `GeckoSession`, I
do not believe that it is worth the effort to implement a "perfect" fix; that would likely involve adding new APIs
to support another API that we are going to deprecate anyway.
Depends on D81746
Differential Revision: https://phabricator.services.mozilla.com/D81748
Because `GeckoSession`'s overrides of `hashCode` and `equals` look solely at session ID, this may cause
strange behaviors if a `GeckoSession` is reloaded with session state from a previous instance, and the
previous instance still exists. For example, suppose the previous instance is closed and the new instance is
open. As far as the Android runtime is concerned, both objects are equivalent. Trying to insert both objects
into the same container will not work as expected.
In this patch, we revert those overrides. To ensure that we still have a short-circuit path in
`GeckoView.restoreSession`, we add and utilize a new, `package`-scoped, `equalsId` method.
Differential Revision: https://phabricator.services.mozilla.com/D81746
We don't use it and causes confusion when `mach install` fails because the
signature of `geckoview_example.test` doesn't match.
Differential Revision: https://phabricator.services.mozilla.com/D81606
In bug 1645264, extension resources could not be loaded when extensions
were loaded through the deprecated `registerWebExtension` method,
because the base URL of such extensions were not correctly resolved.
This does work as expected with the new `installBuiltin` method because
that relies on the AddonManager, which internally does resolve the URL
as expected.
This patch does not fix the bug because the deprecated method is going
to be removed, but introduces a regression test to make sure that this
functionality continues to work as expected.
Differential Revision: https://phabricator.services.mozilla.com/D80300
No behavior change actually (as instant is the default behavior), but I
just noticed it while debugging these.
Depends on D80723
Differential Revision: https://phabricator.services.mozilla.com/D80724
`charsetMenu.properies` was for "Text Encoding" menu in Fennec (bug 611580).
EN was off as default, but some language such JA turned on this menu.
Since Fennec is gone, it is unnecessary now, so let's remove this resource.
Differential Revision: https://phabricator.services.mozilla.com/D79634
When using `enterkeyhint` attribute, key event must be be fired as enter key.
So by previous changeset, I change action type to `maybenext` if inferring
action type without `enterkeyhint`.
Also, `enterkeyhint` can have additional values (enter and previous), so Android
back end should support it.
Differential Revision: https://phabricator.services.mozilla.com/D79646
`charsetMenu.properies` was for "Text Encoding" menu in Fennec (bug 611580).
EN was off as default, but some language such JA turned on this menu.
Since Fennec is gone, it is unnecessary now, so let's remove this resource.
Differential Revision: https://phabricator.services.mozilla.com/D79634
Additionally, recommends the installation of AdoptOpenJDK instead of the Oracle JDK.
This required a different "JAVA_HOME" detection mechanism, which is implemented in this revision.
Differential Revision: https://phabricator.services.mozilla.com/D79547
This removes the support for the 'geckoview' telemetry in
the core and in the JSM files. It also cleans up testing
and the configurations.
Differential Revision: https://phabricator.services.mozilla.com/D79521
This removes the support for the 'geckoview' telemetry in
the core and in the JSM files. It also cleans up testing
and the configurations.
Differential Revision: https://phabricator.services.mozilla.com/D79521
This removes the diagnostic warnings which used to be logged when the
Large-Allocation header was present, but failed to switch into a
Large-Allocation process. Due to the low adoption of the header, this shouldn't
be too large of a problem, but we can look into re-adding the diagnostics if
needed in the future.
The new codepath no longer performs multiple network requests for
Large-Allocation resources, and now relies on the battle-tested
DocumentLoadListener codepath for process switching.
Differential Revision: https://phabricator.services.mozilla.com/D78998
This is a weird conversion because the existing VarCache mirror prefs are in a
two static structs, one for touch prefs and one for the equivalent mouse prefs,
and we dynamically select the appropriate struct in `GetPrefsFor()`.
(But note that `ui.mouse.radius.reposition` and
`ui.mouse.radius.inputSource.touchOnly` do not have corresponding `touch`
prefs! For touch events they are always considered to be false.)
The commit make the following changes.
- It makes the prefs into static prefs.
- It moves the code in `GetPrefsFor()` into a constructor for
`EventRadiusPrefs`, and copies the pref values into a temporary object of
that type. Those copied values are then used by the subsequent code.
- It removes the two static `EventRadiusPrefs` structs.
- It renames some fields in `EventRadiusPrefs` to make them more closely match
the pref names.
Differential Revision: https://phabricator.services.mozilla.com/D79405
This removes the diagnostic warnings which used to be logged when the
Large-Allocation header was present, but failed to switch into a
Large-Allocation process. Due to the low adoption of the header, this shouldn't
be too large of a problem, but we can look into re-adding the diagnostics if
needed in the future.
The new codepath no longer performs multiple network requests for
Large-Allocation resources, and now relies on the battle-tested
DocumentLoadListener codepath for process switching.
Differential Revision: https://phabricator.services.mozilla.com/D78998