The 500ms value was completely arbitrary (we're trying to test that the rAF
rate is reduced, not that it's exactly 500ms), looks like in some cases we get
updates _just_ below the 500ms mark, so to avoid false failures we can reduce
the value to 450ms.
Differential Revision: https://phabricator.services.mozilla.com/D115744
We call initMouseAsTouch when creating GeckoSession, normally this happens
after a GeckoRuntime has been created, so GeckoAppShell.getApplicationContext()
will return a non-null value.
If the GeckoSession is created before then, however, that method will return
null causing a NullPointerException (a AC unit test does that).
We fix this problem by initializing sTreatMouseAsTouch lazily, and not assuming
that the Context is present.
Differential Revision: https://phabricator.services.mozilla.com/D115727
Android 12 introduces a new type of overscroll effect named TYPE_STRETCH which
stretches the whole surface when overscrolling.
Unforunately, given how it's implemented, SurfaceView does not support this
type of effect, similarly to many other View effects.
The OverscrollEffect is currently crashing on Android 12 builds so we restore the
type to the previous (and only) default to fix the crash.
Note that Overscroll is still not displayed, I'll open a new bug to fix that
part.
This patch also avoids using reflection for setBlendMode on API 29 and later
where an API is actually available. Using reflection to access private APIs is
not available since Android 9 so this code was a no-op before this patch.
Differential Revision: https://phabricator.services.mozilla.com/D115031
Android 12 introduces a new type of overscroll effect named TYPE_STRETCH which
stretches the whole surface when overscrolling.
Unforunately, given how it's implemented, SurfaceView does not support this
type of effect, similarly to many other View effects.
The OverscrollEffect is currently crashing on Android 12 builds so we restore the
type to the previous (and only) default to fix the crash.
Note that Overscroll is still not displayed, I'll open a new bug to fix that
part.
This patch also avoids using reflection for setBlendMode on API 29 and later
where an API is actually available. Using reflection to access private APIs is
not available since Android 9 so this code was a no-op before this patch.
Differential Revision: https://phabricator.services.mozilla.com/D115031
As an intermediate step to allow mach commands as standalone functions, the MachCommandBase
subclass instance that currently corresponds to self has to be made available as a separate
argument (named command_context).
Differential Revision: https://phabricator.services.mozilla.com/D109650
When taking focus on <input> element that has large text such as 1MB, we
cannot pass current text to InputConnection.
Since we use binder call to set initial text to InputConnection, large text
causes TransactionTooLargeException exception. So we use small chunked data
(64K length) instead.
Differential Revision: https://phabricator.services.mozilla.com/D114710
I'm changing this to be unconditional so that it may ride the trains.
If we later decide that we need to hold it back for another release, we can
revert this in Beta.
I'm talking to data people about analyzing Fenix's tab retention probes. I'll
obviously be keeping an eye on those numbers as this change propagates.
Differential Revision: https://phabricator.services.mozilla.com/D114404
HangData is the only member left in the union and SLOW_SCRIPT is the only member left in the enum.
This patch also migrates the one remaining (invalid) use of PLUGIN_HANG in testing to work as a SLOW_SCRIPT instead.
Differential Revision: https://phabricator.services.mozilla.com/D113885
Marionette enables itself only when --marionette is passed in. Given that
command line arguments can only be passed in using the debug configuration, it
is safe to send this event all the time.
Differential Revision: https://phabricator.services.mozilla.com/D113829
The latest version of GBoard seems to call `InputConnection.closeConnection`
without calling `InputConnection.endBatchEdit`. Since we recycle
`InputConnection` object, we have to reset batch edit count on
`closeConnection`.
Also there is no way to write GV-junit and mochitests because we cannot check
whether current text transaction is batch mode or not.
Differential Revision: https://phabricator.services.mozilla.com/D113297
Marionette uses GVE and sometimes closes the last tab and calls |Quit| at the
same time. When the last tab is closed, GVE will try to open a new tab with the
same content in it, to avoid leaving the browser in the "zero tabs" state. This
causes a race condition where the browser is shutting down and a new tab is
being created, which trips an assertion in our widget code.
During real life usage of the browser, calling Quit only happens during errors.
Because of that, and the fact that we're not seing this crash in the wild,
it should be safe to just fix the problem in GVE instead of supporting this
edge case in GeckoView.
To support the Marionette case, we allow GVE to stay at zero tabs. Some menu
elements need to be disabled (like reload tab and the url bar).
This has the added benefit of being able to test the "no windows" case in GVE
which wasn't possible until now.
Differential Revision: https://phabricator.services.mozilla.com/D113202
As an intermediate step to allow mach commands as standalone functions, the MachCommandBase
subclass instance that currently corresponds to self has to be made available as a separate
argument (named command_context).
Differential Revision: https://phabricator.services.mozilla.com/D109650