By means of setting the browser's initial activeness to false, a newly created background tab will
no longer have an active browsing context which reduces its cpu consumption while it is not selected.
The setTimeout callback is going to be throttled when the tab is created in the background by the
help of this fix.
Differential Revision: https://phabricator.services.mozilla.com/D173320
In Bug 1765835, some adjustments were made to improve high accuracy on
Android. One of those changes made Android to always pull a new location
and not use a “last known location” on high accuracy requests. It seems
on some devices, require a new location can lead to long timeouts.
This bug reverts that change back to the prior behavior.
(High location is still improved because part of the issue in the other
bug was a Gecko callback not occurring.)
Differential Revision: https://phabricator.services.mozilla.com/D173212
Android's memory profiler can show current java-heap size. Android M+
can get this usages from API. So this fix adds this entry to
about:memory.
Differential Revision: https://phabricator.services.mozilla.com/D172211
We did this to give more semantic information when swiping through
read-only list items. This doesn't work when there are actionable
children in the list item. Chrome never navigates by list items, so we
shouldn't bother to either.
Differential Revision: https://phabricator.services.mozilla.com/D172503
While writing part 1 of this patch, I noticed that the geckoview code
for client.openWindow was returning the outer chrome window's
BrowsingContext rather than the BrowsingContext of the primary content
frame when opening a pop-up window. This meant that the native code
would fail to start navigating the pop-up window (as it would try to
navigate the chrome window which is not allowed).
It turns out the tests were still passing because the geckoview code was
actually starting the load itself, though with the wrong options and
properties. In this patch I remove that call to load a URI from the Java
code, and fix the code in ClientOpenWindowUtils to return the content
BrowsingContext instead of the chrome one.
Differential Revision: https://phabricator.services.mozilla.com/D171756
This makes various changes to the named lookup/navigation code to make
them more precise, and avoid issues which could happen if a window is
closed while script is still executing.
This also should improve handling for inactive windows in some cases, by
more frequently working off of the WindowContext tree rather than the
BrowsingContext tree.
As part of these changes, some behaviour was changed around e.g. the
file URI exception to avoid the deprecated nsIPrincipal::GetURI method.
I don't believe the behaviour should have changed in a meaningful way.
Differential Revision: https://phabricator.services.mozilla.com/D171755
This bug implements and opens window.print() for Android in Nightly.
Adds "GeckoView:DotPrintRequest" and "GeckoView:DotPrintFinish" events.
GeckoView:DotPrintRequest requests a PDF of the current window.print
page for Android to print. GeckoView:DotPrintFinish releases the static
browser clone created by window.print. PDF generation was additionally
adjusted to get the expected canonical browser context when printing
iframes.
Differential Revision: https://phabricator.services.mozilla.com/D171159
I think the flag was cargo-culted from the linux builds, but only worked
kind of accidentally: the Android NDK doesn't provide the valgrind
header, but as we weren't using a sysroot, we ended up picking the
system one, which kinda sorta works ok. Unfortunately, now that we are
switching to using a sysroot, the valgrind header can't be picked that
way anymore. I don't think this has an impact on ASan itself.
Differential Revision: https://phabricator.services.mozilla.com/D172507
This new method can be used to check if the nsIOutputStream has been
closed without having data available to write. It should avoid blocking
to discover this information.
Differential Revision: https://phabricator.services.mozilla.com/D170696
When using split window, the position of selection context menu is
strange position.
When on Android 11+, it has independent window manager per split
window, `onGetContentRect` of `ActionMode.Callback2` seems to use this
coordinates, instead of screen coordinate.
So we should consider this situation.
Also, our CI has no Android 11+ and no way to set split window, so I
cannot add unit test for it.
Differential Revision: https://phabricator.services.mozilla.com/D170472
While writing part 1 of this patch, I noticed that the geckoview code
for client.openWindow was returning the outer chrome window's
BrowsingContext rather than the BrowsingContext of the primary content
frame when opening a pop-up window. This meant that the native code
would fail to start navigating the pop-up window (as it would try to
navigate the chrome window which is not allowed).
It turns out the tests were still passing because the geckoview code was
actually starting the load itself, though with the wrong options and
properties. In this patch I remove that call to load a URI from the Java
code, and fix the code in ClientOpenWindowUtils to return the content
BrowsingContext instead of the chrome one.
Depends on D171755
Differential Revision: https://phabricator.services.mozilla.com/D171756
This makes various changes to the named lookup/navigation code to make
them more precise, and avoid issues which could happen if a window is
closed while script is still executing.
This also should improve handling for inactive windows in some cases, by
more frequently working off of the WindowContext tree rather than the
BrowsingContext tree.
As part of these changes, some behaviour was changed around e.g. the
file URI exception to avoid the deprecated nsIPrincipal::GetURI method.
I don't believe the behaviour should have changed in a meaningful way.
Differential Revision: https://phabricator.services.mozilla.com/D171755
Reducing the number of characters in the TextInputDelegateTest content
large test prevents timeouts from occurring when using UIAutomator.
UIAutomator tests will be reactivated in bug 1659818.
Differential Revision: https://phabricator.services.mozilla.com/D171899
When getting virtual ID of a11y tree, we use internal method via
reflection. But `AccessibilityNodeInfo.getChildId` is hidden now.
As workaround, since `mChildNodeIds` is still `@UnsupportedAppUsage`,
we can use it to get child node id.
This has another fix. Clipboard access requires foreground on Android 10+.
So we have to set window foucs when using clipboard.
Also, `AccessibilityTest` won't work on Android 12 since more methods
seem to be hidden from Android 12.
(by `@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R)`).
Differential Revision: https://phabricator.services.mozilla.com/D170550