There are two things that make an element not be a combobox:
* <select multiple>
* <select size=N> where N > 1
I was only handling the former. Expose the gecko-internal method we have
for this via WebIDL to get this fully right forever.
The other issue reported in this bug is not a GeckoView issue, it's an
android-components issue, will file / maybe fix there if I figure out
how.
Differential Revision: https://phabricator.services.mozilla.com/D137295
When user/App rotates screen 180 degree, `onConfigurationChanged` isn't called.
But If API is 17+, we can use `DisplayManager.DisplayListener` to detect
rotation change instead.
Also, since orientation value in `android.content.res.Configuration` won't be
updated immediately, we shouldn't use it, excepting to `onConfigurationChanged`.
Differential Revision: https://phabricator.services.mozilla.com/D136869
Two issues:
* Set the openInParentProcess flag in GeckoViewPrompt.jsm for
dropdowns. This avoids needing two taps to re-open the dropdown.
* Make the "input" event composed, see bug 1734040.
Differential Revision: https://phabricator.services.mozilla.com/D137038
WebRender retains about 50MBs of memory for every window. When switching
between lots of tabs on Android (where 1 tab = 1 window), this can cause
problems as the app will consume a significant amount of memory.
To avoid this problem, we send a memory pressure event whenever a session is
deactivated, which signals to WebRender that it should deallocate the memory.
This message is sent on a delay of 10s to avoid interfering with tab switching,
and we cancel the message if the tab becomes active again before we fire the
memory pressure event.
Co-Authored-By: Cathy Lu <calu@mozilla.com>
Co-Authored-By: Jonathan Almeida [:jonalmeida] <jonalmeida942@gmail.com>
Differential Revision: https://phabricator.services.mozilla.com/D136965
We had zero coverage for this, apparently. Upon writing tests, the only
test we had for this was `@Ignore`d :(
Write better tests for this. Add tests for <select multiple> which I
broke because the mozshowdropdown events only fire for dropdown selects.
I'm sorry anyways, I should've tested manually, but I was traveling and
found issues when trying to do an artifact build so I relied on try, oh
well.
Differential Revision: https://phabricator.services.mozilla.com/D136772
After bug 1744009 Gecko will consistently fire these events. This allows
activating stuff via keyboard on Android like in every other OS (if you
have a keyboard attached of course) and is generally more consistent.
We remove MOZ_USE_NATIVE_POPUP_WINDOWS since it's unused.
Differential Revision: https://phabricator.services.mozilla.com/D136073
This patch refactors the memory handling code for child processes into
MemoryController and applies the same logic for the main process.
This patch also makes it so we respond to `onLowMemory` and `onTrimMemory` for
non-background processes too, since we have reports that this might cause
problems when switching between tabs in Fenix.
Differential Revision: https://phabricator.services.mozilla.com/D136383
The web-platform-tests of Screen orientation API is often failure due to
"Request for fullscreen was denied because requesting element is not in the
currently focused tab.". Because, when orientation is changed, activity is
restarted.
So we should prevent restarting activity when changing it.
Differential Revision: https://phabricator.services.mozilla.com/D136441
This patch refactors the memory handling code for child processes into
MemoryController and applies the same logic for the main process.
This patch also makes it so we respond to `onLowMemory` and `onTrimMemory` for
non-background processes too, since we have reports that this might cause
problems when switching between tabs in Fenix.
Differential Revision: https://phabricator.services.mozilla.com/D136383
Although this test is included in `testing/web-platform/tests/screen-orientation/lock-basic.html`,
it is still timed out until fixing bug 1750147.
Differential Revision: https://phabricator.services.mozilla.com/D136118
This ensures that geckoview's startup() calls
Blocklist.loadBlocklistAsync(). Due to bug 1730026, this is run for
each new tab rather than just once, so we also ensure that we only
check for new entries the first time the blocklist is loaded.
We also add a mochitest that simply ensures that the gfx blocklist is
initialized. We already have extensive xpcshell tests to test the
blocklist functionality. And due to the fact the blocklist is lazily
initialized, attempting to do more extensive testing would initialize
the blocklist even if it wasn't initialized in startup, negating the
value of the test.
Differential Revision: https://phabricator.services.mozilla.com/D135607
On Android we use SurfaceTextures and Surfaces to render video and
webgl. These are allocated by content processes using the
SurfaceAllocator, which connects to a SurfaceAllocatorService running
in the parent process. The content process renders in to the
Surface (by attaching it to a media codec, or creating a GL context
with it for webgl), and the compositor renders the output
SurfaceTexture in the parent process.
With the GPU process this poses a difficulty, as we need to allocate
SurfaceTextures in either the parent process or GPU process, depending
on whether the GPU process is enabled. Additionally, we don't want to
run extra android Services in child processes such as the GPU process,
as process management is tricky and we want to contain it to a single
place.
This patch makes it so that SurfaceAllocatorService is not really an
android Service any more, just an singleton object which implements
the ISurfaceAllocator interface. It is renamed to
RemoteSurfaceAllocator to reflect that. A new method
getProcessManager() is added to the IProcessManager interface, which
child processes can use to fetch the surface allocator. It returns
either the parent process instance, or fetches the instance from the
GPU process using IChildProcess.getSurfaceAllocator().
Differential Revision: https://phabricator.services.mozilla.com/D133107
When looking test failure, I found that `onOrientationLock` always returned
null in geckoview-junit since default method is called.
We should use use `delegateDuringNextWait` instead of `waitUntilCalled`.
Differential Revision: https://phabricator.services.mozilla.com/D135574
`OrientationDelegateTest#orientationLockedExistingOrientation` often timed out
since Gecko's orientation information and GeckoView's aren't same value.
If `GeckoScreenOrientation.update()` is called during `mShouldNotify` is false,
GeckoView doesn't notify Gecko of current orientation information.
Then, `GeckoScreenOrientation.enableNotifications()` also doesn't notify it
since `mShouldNotify` was false. So then, when `update()` is called by lock
screen, since cached orientation information in GeckoView is same value,
GeckoView doesn't notify it even if Gecko's orientation information and
GeckoView's information aren't same value.
So we should notify Gecko of current orientation information to all processes
when `enableNotifications` is called.
Differential Revision: https://phabricator.services.mozilla.com/D135855
Not sure how this code came to be, but it produces an empty javadoc jar.
The patch fixes the javadoc jar task so that it actually collects the javadoc
files.
Differential Revision: https://phabricator.services.mozilla.com/D135752
In Bug 1724480, a change was made to not sync libraries if there is no compile
environment.
This change did not account for artifact builds, for which there is no compile
environment but do have libraries anyway.
Differential Revision: https://phabricator.services.mozilla.com/D135721
geckoview-exoplayer2 does not differ between lite and omni builds so we don't
publish an -omni version.
The dependency to exoplayer2, however, does specify the -omni suffix so
geckoview ends up depending on a non-existent geckoview-exoplayer2-omni.
To fix this we don't add the -omni suffix in geckoview-exoplayer2 and keep it
only for geckoview.
Differential Revision: https://phabricator.services.mozilla.com/D135707
When looking test failure, I found that `onOrientationLock` always returned
null in geckoview-junit since default method is called.
We should use use `delegateDuringNextWait` instead of `waitUntilCalled`.
Differential Revision: https://phabricator.services.mozilla.com/D135574
This allows us to decouple GeckoView from exoplayer2, have it's own Java
settings and not pollute GeckoView's dependencies.
Differential Revision: https://phabricator.services.mozilla.com/D133792
Temporary commit to help code review.
This patch just moves the files without any further change. Actual build
changes will happen in a later patch.
Differential Revision: https://phabricator.services.mozilla.com/D133791
This patch introduces a new field maven-artifacts which allows specifying a
list of maven artifacts that will be generated by a build and published to our
maven repository.
This allows us to split up GeckoView into separate maven packages.
Differential Revision: https://phabricator.services.mozilla.com/D133790
When content uses Shadow DOM, `event.target.activeElement` is custom element,
not focused element. So we use `nsIFocusManager` to get real focused element.
Also, "Select All" has same issue. If focused element is into shadow root, its
menu doesn't appear.
Differential Revision: https://phabricator.services.mozilla.com/D135309
`sender.frameId` should be set iff `sender.tab` is set, as documented at
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/MessageSender
The removal of the `viewType == "tab"` condition broke this in
https://hg.mozilla.org/mozilla-central/rev/2dc4f1baccc8
This patch makes the presence of `frameId` conditional on `tab`, and
fixes several tests that relied on the incorrect behavior:
- Move the runtime.onConnect test from test_ext_contentscript_in_background.js
to a new mochitest at test_ext_runtime_connect_iframe.html.
- Simplify test_ext_contentscript_in_background.js to continue to
provide test coverage for contentScripts.register + allFrames.
- Replace runtime.onConnect with runtime.getFrameId in
test_ext_contentscript_xorigin_frame.js, since sender.frameId is no
longer available in xpcshell tests (because internals to support the
tabs extension API are not available in xpcshell tests). The test
cannot be moved to a mochitest because its purpose is to provide test
coverage for process switching in a xpcshell test (bug 1580811).
Differential Revision: https://phabricator.services.mozilla.com/D135057
`sender.frameId` should be set iff `sender.tab` is set, as documented at
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/MessageSender
The removal of the `viewType == "tab"` condition broke this in
https://hg.mozilla.org/mozilla-central/rev/2dc4f1baccc8
This patch makes the presence of `frameId` conditional on `tab`, and
fixes several tests that relied on the incorrect behavior:
- Move the runtime.onConnect test from test_ext_contentscript_in_background.js
to a new mochitest at test_ext_runtime_connect_iframe.html.
- Simplify test_ext_contentscript_in_background.js to continue to
provide test coverage for contentScripts.register + allFrames.
- Replace runtime.onConnect with runtime.getFrameId in
test_ext_contentscript_xorigin_frame.js, since sender.frameId is no
longer available in xpcshell tests (because internals to support the
tabs extension API are not available in xpcshell tests). The test
cannot be moved to a mochitest because its purpose is to provide test
coverage for process switching in a xpcshell test (bug 1580811).
Differential Revision: https://phabricator.services.mozilla.com/D135057