Граф коммитов

31138 Коммитов

Автор SHA1 Сообщение Дата
William Durand b459566546 Bug 1751154 - More consistent error handling for frameIds parameter in scripting API. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D137005
2022-01-28 19:13:05 +00:00
Emilio Cobos Álvarez 1f99c522f0 Bug 1752523 - Fix handling of non-multiple <select> with size >1. r=agi
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
2022-01-28 18:40:13 +00:00
Anastasios Bithas d756776295 Bug 1751923 - Add targetSdkVersion and minSdkVersion to gradle.build of exoplayer2 r=agi
Adding the targetSdkVersion and minSdkVersion so that the READ_PHONE_STATE android permission is no longer implied.

Differential Revision: https://phabricator.services.mozilla.com/D137072
2022-01-28 16:36:55 +00:00
Makoto Kato 77a88ff153 Bug 1750147 - Use DisplayManager to detect orientation change. r=geckoview-reviewers,agi,calu
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
2022-01-27 06:17:21 +00:00
Agi Sferro 722cb28924 Bug 1750231 - Add WebRequest::beConservative. r=calu,jonalmeida
Differential Revision: https://phabricator.services.mozilla.com/D136387
2022-01-26 20:11:45 +00:00
Agi Sferro b968f24595 Bug 1750231 - Add bug # to CHANGELOG. r=calu
Differential Revision: https://phabricator.services.mozilla.com/D136385
2022-01-26 20:11:44 +00:00
Emilio Cobos Álvarez 90a0deb6cb Bug 1752133 - Fix a couple more issues with the select dropdown on Android. r=agi
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
2022-01-26 16:48:55 +00:00
Agi Sferro b1f93026e6 Bug 1745996 - Send a memory pressure event when deactivating sessions. r=jnicol,calu
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
2022-01-26 16:40:56 +00:00
Agi Sferro bea25df6ff Bug 1751941 - Add version{Code,Name} to geckoview_example, test_runner. r=calu
This allows consumers like Marionette to query the Gecko version for
GeckoViewExample and test_runner.

Differential Revision: https://phabricator.services.mozilla.com/D136937
2022-01-25 20:00:30 +00:00
Emilio Cobos Álvarez a5779bc197 Bug 1751674 - Appease eslint.
MANUAL PUSH: Trivial tweak CLOSED TREE
2022-01-24 22:18:06 +01:00
Emilio Cobos Álvarez 7aa9538490 Bug 1751674 - Fix a couple issues with my patch for bug 1750395. r=agi
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
2022-01-24 21:07:41 +00:00
Emilio Cobos Álvarez 91bea3f4fb Bug 1750395 - Use mozshowdropdown events to show select dropdown. r=agi
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
2022-01-21 11:08:38 +00:00
Agi Sferro 8dcdd10903 Bug 1750878 - Send low-memory events in main process. r=calu
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
2022-01-20 23:47:15 +00:00
Cristian Tuns 2cb68401e0 Backed out changeset 62ff4a66c1c6 (bug 1750878) for causing Btime failures CLOSED TREE 2022-01-20 04:03:20 -05:00
Makoto Kato 961343254e Bug 1750937 - Don't restart test runner activity when orientation is changed. r=geckoview-reviewers,owlish
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
2022-01-20 02:20:26 +00:00
Agi Sferro 8047880a90 Bug 1750878 - Send low-memory events in main process. r=calu
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
2022-01-19 20:23:14 +00:00
Jamie Nicol 3d79bd207c Bug 1750569 - Add test to ensure screen pixels requests succeed if the GPU process crashes. r=agi
Differential Revision: https://phabricator.services.mozilla.com/D136152
2022-01-19 16:14:30 +00:00
Agi Sferro 9e8a5434d9 Bug 1728742 - Reject invalid schemes in onLoadRequest. r=jonalmeida
Differential Revision: https://phabricator.services.mozilla.com/D135629
2022-01-18 22:14:28 +00:00
Makoto Kato 6881fd9c1b Bug 1750498 - Better support orientation.lock('portrait') and orientation.lock('landscape'). r=geckoview-reviewers,owlish
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
2022-01-18 10:36:25 +00:00
Jamie Nicol 86e768faf8 Bug 1749520 - Ensure remote gfx blocklist is initialized on geckoview. r=robwu,agi
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
2022-01-17 15:24:34 +00:00
Makoto Kato 9e9748390b Bug 1750142 - Support screen.orientation.lock('any') on GeckoView backend. r=geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D135981
2022-01-15 11:19:55 +00:00
Jamie Nicol 012c682e1a Bug 1742569 - Create RemoteSurfaceAllocator in either parent or GPU process. r=agi,gfx-reviewers,aosmond
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
2022-01-14 16:20:59 +00:00
Makoto Kato df7f7503f4 Bug 1748981 - Use delegateDuringNextWait when returning GeckoResult. r=calu
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
2022-01-14 08:33:14 +00:00
Makoto Kato 71bbf38c5a Bug 1747039 - We should notify Gecko of current orientation information to all process when enableNotifications is called. r=calu
`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
2022-01-14 05:53:34 +00:00
Mike Kaply 0b3cfeaed2 Bug 1733497 - Remove region.properties. r=geckoview-reviewers,m_kato,flod
Differential Revision: https://phabricator.services.mozilla.com/D134427
2022-01-13 21:18:30 +00:00
Agi Sferro 2448786acb Bug 1749838 - Fix typo in CHANGELOG.md. r=calu
Differential Revision: https://phabricator.services.mozilla.com/D135750
2022-01-13 15:58:53 +00:00
Agi Sferro 3d9d9f6607 Bug 1749652 - Actually publish javadoc jar contents. r=calu
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
2022-01-13 15:58:52 +00:00
Alexandru Michis c5fbfa6ff2 Backed out changeset db861e2fd044 (bug 1749652) as requested by agi.
CLOSED TREE
2022-01-13 17:55:26 +02:00
Hannah Peuckmann f5c826b962 Bug 1745389 - Split up SecuritySettingsCleaner. r=geckoview-reviewers,pbz,keeler,jonalmeida
Differential Revision: https://phabricator.services.mozilla.com/D134119
2022-01-13 15:04:05 +00:00
Alexandre Lissy 161f130b0a Bug 1731890 - Adding Utility process with basic sandbox r=agi,nika,bobowen
Differential Revision: https://phabricator.services.mozilla.com/D126297
2022-01-12 20:52:58 +00:00
Agi Sferro 24fb67bde3 Bug 1749693 - Include libraries in artifact builds. r=calu,jonalmeida
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
2022-01-12 18:06:13 +00:00
Agi Sferro 41207f7833 Bug 1749729 - Do not include -omni suffix in geckoview-exoplayer2. r=jonalmeida
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
2022-01-12 18:04:09 +00:00
Hannah Peuckmann de7d505cc3 Bug 1748978 - Clean up CLEAR_APPCACHE flag. r=pbz,geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D135342
2022-01-12 16:50:23 +00:00
Agi Sferro f993cdb15f Bug 1749652 - Fix javadoc path in gv-docs. r=calu
The javdoc path changed after Bug 1724480.

Differential Revision: https://phabricator.services.mozilla.com/D135708
2022-01-12 16:37:16 +00:00
Marian-Vasile Laza d562d1fa70 Backed out 2 changesets (bug 1748981) for causing geckoview test failures. CLOSED TREE
Backed out changeset 5e151bd74f2a (bug 1748981)
Backed out changeset 4df658fcf42d (bug 1748981)
2022-01-12 14:15:25 +02:00
Makoto Kato caf7db3528 Bug 1748981 - Use delegateDuringNextWait when returning GeckoResult. r=calu
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
2022-01-12 00:12:15 +00:00
Agi Sferro de1bc2e2d0 Bug 1744855 - Upgrade GeckoView dependencies. r=owlish
Differential Revision: https://phabricator.services.mozilla.com/D133154
2022-01-11 19:16:04 +00:00
Agi Sferro fe94caaf56 Bug 1743469 - Target android 31. r=jgraham,jnicol,calu
Differential Revision: https://phabricator.services.mozilla.com/D133153
2022-01-11 19:16:03 +00:00
Agi Sferro 3004b12f76 Bug 1745246 - Make @interface classes public. r=jonalmeida
Differential Revision: https://phabricator.services.mozilla.com/D135616
2022-01-11 19:16:03 +00:00
Agi Sferro 53378a9401 Bug 1745246 - Move org/mozilla/thirdparty to it's own module. r=calu
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
2022-01-11 19:16:02 +00:00
Agi Sferro b27078be09 Bug 1745246 - Move org/mozilla/thirdparty to mobile/android/exoplayer2. r=calu
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
2022-01-11 19:16:02 +00:00
Agi Sferro 51f42fd9a0 Bug 1745246 - Allow specifying multiple maven artifacts from build. r=calu,ahal
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
2022-01-11 19:16:01 +00:00
Agi Sferro 024994e801 Bug 1724480 - Upgrade JDK to Java 17. r=glandium,ahal,calu
Differential Revision: https://phabricator.services.mozilla.com/D131972
2022-01-11 19:16:01 +00:00
Agi Sferro 10649c9480 Bug 1724480 - Upgrade to apilint 0.5.1. r=calu
Differential Revision: https://phabricator.services.mozilla.com/D132530
2022-01-11 19:16:01 +00:00
Makoto Kato 2cb85f3675 Bug 1748417 - "Paste as plain text" shouldn't be shown on <input> element into shadow root. r=geckoview-reviewers,calu
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
2022-01-10 07:29:38 +00:00
Rob Wu 2a62c0c6f2 Bug 1748158 - Omit sender.frameId if sender.tab is unset r=rpl,geckoview-reviewers,jonalmeida
`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
2022-01-06 14:15:47 +00:00
Alexandru Michis 2aa5137dc4 Backed out changeset 4ae7738694e1 (bug 1748158) for causing xpcshell failures in test_ext_native_messaging_permissions.js
CLOSED TREE
2022-01-06 02:55:58 +02:00
Rob Wu b890a346b4 Bug 1748158 - Omit sender.frameId if sender.tab is unset r=rpl,geckoview-reviewers,jonalmeida
`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
2022-01-05 20:41:07 +00:00
Mike Hommey a25d0c97d9 Bug 1747856 - Move MOZ_NO_SMART_CARDS to python configure. r=firefox-build-system-reviewers,geckoview-reviewers,mhentges,calu
Differential Revision: https://phabricator.services.mozilla.com/D134770
2021-12-30 00:54:02 +00:00
Mike Hommey a1425cc7d4 Bug 1747855 - Move --disable-updater to python configure. r=firefox-build-system-reviewers,geckoview-reviewers,mhentges,calu
Differential Revision: https://phabricator.services.mozilla.com/D134769
2021-12-30 00:54:02 +00:00