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

32084 Коммитов

Автор SHA1 Сообщение Дата
Makoto Kato 9c6893e72e Bug 1841492 - Convert GeckoViewTestUtils.jsm to ESM. r=webdriver-reviewers,geckoview-reviewers,whimboo,calu
Differential Revision: https://phabricator.services.mozilla.com/D182655
2023-07-09 16:11:39 +00:00
Makoto Kato e9b8c73771 Bug 1837126 - Disable org.mozilla.geckoview.test.AccessibilityTest#testClipboard on opt build. r=geckoview-reviewers,calu
I mistake previous. We should disable testClipboard test on opt build
as temporary due to frequency failures until this is fixed.

Differential Revision: https://phabricator.services.mozilla.com/D182470
2023-07-07 06:10:49 +00:00
Gregory Pappas 9007e8c855 Bug 1800770 - Enable Storage Access API everywhere r=pbz,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D182869
2023-07-07 04:39:43 +00:00
Makoto Kato 0266d92dba Bug 1841498 - Convert BrowserUsageTelemetry.jsm to ESM. r=geckoview-reviewers,calu
Bug 1834831 forgot converting mobile version since
`Document::AutomaticStorageAccessPermissionCanBeGranted` uses this module.

Differential Revision: https://phabricator.services.mozilla.com/D182661
2023-07-06 01:04:51 +00:00
Cosmin Sabou 1bc0231943 Backed out changeset b2154b397ef7 (bug 1838048) for geckoview failures on onSelectIdentityCredentialAccount. 2023-07-05 20:20:17 +03:00
Titouan Thibaud 023fd55a9d Bug 1838048 - Create a Test for validating the nsIIdentityCredentialPromptService.showAccountPrompt is handled in GeckoView r=geckoview-reviewers,amejiamarmol
Differential Revision: https://phabricator.services.mozilla.com/D182579
2023-07-05 15:55:58 +00:00
Gregory Pappas dd79948377 Bug 1773094 - Remove security.alternate_certificate_error_page pref r=keeler,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D182262
2023-07-04 11:26:24 +00:00
Hiroyuki Ikezoe 7118a0eee6 Bug 1839964 - Call `waitForRoundTrip()` to make sure `evaluatePromiseJS` has set up the given JS. r=botond,geckoview-reviewers,m_kato
There's a race in between a call of `evaluatePromiseJS` and a call of
`flushApzRepaints` which is similar to bug 1743857. If the given JS for the
`evaluatePromiseJS` call returns a Promise and if the call site doesn't wait for
the Promise, we can't ensure the given JS has set up in the content.

Unforutnately there's no good way to avoid the race, adding `waitForRoundTrip`
seems to work.

Differential Revision: https://phabricator.services.mozilla.com/D182439
2023-07-04 06:32:05 +00:00
Hiroyuki Ikezoe 3d156124fd Bug 1839964 - Use `promiseAllPaintsDone` rather than waiting for the first-contentful-paint. r=botond,geckoview-reviewers,m_kato
Just like what we did in bug 1678895, for APZ tests using
`promiseAllPaintsDone` makes the tests more robust.

Differential Revision: https://phabricator.services.mozilla.com/D182438
2023-07-04 06:32:05 +00:00
Titouan Thibaud 790913d462 Bug 1836772 - Adding tests on FedCM ProviderPrompt API r=amejiamarmol,geckoview-reviewers,ohall
Co-authored-by: Arturo Mejia <arturomejiamarmol@gmail.com>

Differential Revision: https://phabricator.services.mozilla.com/D182007
2023-06-27 20:01:40 +00:00
iorgamgabriel a4840acba1 Bug 1550206 - Move the CrashHandler class into org.mozilla.geckoview r=geckoview-reviewers,owlish,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D179550
2023-06-27 14:01:10 +00:00
Arturo Mejia 82275f835e Bug 1836358 - Add support for nsIIdentityCredentialPromptService.showPolicyPrompt in GeckoView. r=geckoview-reviewers,tthibaud,owlish
Differential Revision: https://phabricator.services.mozilla.com/D180729
2023-06-27 00:05:49 +00:00
Titouan Thibaud da1cb4f75d Bug 1836363 - Add Changelog entry for PromptInstanceDelegate.onSelectIdentityCredentialAccount r=geckoview-reviewers,amejiamarmol
Differential Revision: https://phabricator.services.mozilla.com/D181895
2023-06-26 13:27:05 +00:00
Sandor Molnar 80c9edafd5 Bug 1829615 - Disable org.mozilla.geckoview.test.SelectionActionDelegateTest#compareClientRect on fission for frequent failures. r=intermittent-reviewers,geckoview-reviewers,ahal,owlish
Differential Revision: https://phabricator.services.mozilla.com/D181341
2023-06-24 02:37:16 +00:00
Nazım Can Altınova dde20574dc Bug 1812452 - Increase the min profiler buffer limit to 128MiB r=florian,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D181654
2023-06-23 09:17:43 +00:00
Makoto Kato 73d5b58b22 Bug 1839151 - Convert Web extensions test assets to ESM. r=geckoview-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D181367
2023-06-23 07:14:40 +00:00
Olivia Hall 8dd8561c12 Bug 1839456 - GeckoView Setup Print Optimization r=geckoview-reviewers,amejiamarmol
This patch updates the GeckoViewPrintDocumentAdapter to make the PDF
file required for printing in the background.

Differential Revision: https://phabricator.services.mozilla.com/D181572
2023-06-22 21:12:55 +00:00
Gregory Pappas 4b964d39ba Bug 1814905 - Implement action.getUserSettings r=robwu,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D169102
2023-06-22 15:22:19 +00:00
Rob Wu 762fa78438 Bug 1811608 - Set inputHandling in browser/pageAction.onClicked on Android +tests r=extension-reviewers,amejiamarmol,geckoview-reviewers,willdurand
Set `inputHandling: true` in the onClicked event of the
action/browserAction and pageAction APIs, and add tests.

Besides the usual coverage for the feature here, this patch also
introduces the only Android test for the `page_action.show_matches`
manifest key and the `pageAction.isShown` API. These APIs were already
covered by desktop-specific tests in browser/, but had zero test
coverage on Android. Since toolkit mochitests are run on desktop and
Android, this provides better cross-browser coverage.

Differential Revision: https://phabricator.services.mozilla.com/D181012
2023-06-22 13:19:29 +00:00
Hiroyuki Ikezoe 4f568eaa04 Bug 1719855 - Add two flags to differentiate a state that it's ready to be handled in APZ but not yet ready to inform the handled result to GeckoView. r=geckoview-reviewers,botond,calu
Depends on D176481

Differential Revision: https://phabricator.services.mozilla.com/D176727
2023-06-22 03:01:44 +00:00
Natalia Csoregi 16231c2992 Bug 1837126 - Disable org.mozilla.geckoview.test.AccessibilityTest#testClipboard for having an extremely high failure rate. r=geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D181040
2023-06-21 10:26:55 +00:00
Gregory Pappas fb28cc97e2 Bug 1809094 - Implement tab.autoDiscardable property r=robwu,geckoview-reviewers,extension-reviewers,Gijs,owlish,tabbrowser-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D166440
2023-06-21 07:50:17 +00:00
Cosmin Sabou 87bdf668d4 Backed out changeset f3fe6cc42791 (bug 1809094) for bc failures on browser_ext_tabs_autoDiscardable.js. 2023-06-21 03:24:56 +03:00
Gregory Pappas 0289eeada1 Bug 1809094 - Implement tab.autoDiscardable property r=robwu,geckoview-reviewers,extension-reviewers,Gijs,owlish,tabbrowser-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D166440
2023-06-20 23:59:08 +00:00
Sandor Molnar 9549861449 Backed out changeset 0ee2d1b2ec37 (bug 1809094) for causing android bustages. CLOSED TREE 2023-06-21 02:20:26 +03:00
Gregory Pappas 86acbd80ac Bug 1809094 - Implement tab.autoDiscardable property r=robwu,geckoview-reviewers,extension-reviewers,Gijs,owlish,tabbrowser-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D166440
2023-06-20 23:06:37 +00:00
Sandor Molnar 85f33db1f7 Backed out changeset caa96b0874f4 (bug 1837126) for causing android bustages / lint failure. CLOSED TREE 2023-06-20 22:15:42 +03:00
Rob Wu 79c40be390 Bug 1839449 - Enforce alphabetic order of mochitest manifests in mobile/ r=geckoview-reviewers,mconley,calu
Differential Revision: https://phabricator.services.mozilla.com/D181540
2023-06-20 18:29:28 +00:00
Eitan Isaacson 85a5ad4790 Bug 1834874 - P1: Make text navigation work in UI thread with cached TextLeafPoint API. r=Jamie,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D181320
2023-06-20 18:15:42 +00:00
Natalia Csoregi 037007e09d Bug 1837126 - Disable org.mozilla.geckoview.test.AccessibilityTest#testClipboard for having an extremely high failure rate. r=geckoview-reviewers,m_kato DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D181040
2023-06-20 18:01:09 +00:00
Marco Castelluccio eae70a2a01 Bug 1837742 - Use Services.prefs instead of Preferences.sys.mjs in GeckoView. r=geckoview-reviewers,owlish
This should also improve performance by removing the import from the startup path.

Differential Revision: https://phabricator.services.mozilla.com/D180539
2023-06-19 22:02:46 +00:00
Gregory Pappas c7f8be9d20 Bug 1839076 - Remove duplicate prefs from mobile.js r=geckoview-reviewers,amejiamarmol
Differential Revision: https://phabricator.services.mozilla.com/D181342
2023-06-19 16:20:40 +00:00
Titouan Thibaud 1f28ac19b4 Bug 1836363 - Add support for nsIIdentityCredentialPromptService.showAccountListPrompt in GeckoView r=geckoview-reviewers,amejiamarmol
Differential Revision: https://phabricator.services.mozilla.com/D180964
2023-06-19 16:18:49 +00:00
Gregory Pappas fe0348c6e6 Bug 1837813 - Remove unused signon.* prefs r=geckoview-reviewers,m_kato
Depends on D180601

Differential Revision: https://phabricator.services.mozilla.com/D180602
2023-06-17 23:34:37 +00:00
Gregory Pappas ac0f1481f2 Bug 1837813 - Remove unused extensions.* prefs r=geckoview-reviewers,calu
Depends on D180600

Differential Revision: https://phabricator.services.mozilla.com/D180601
2023-06-17 23:34:36 +00:00
Gregory Pappas fb918fe6db Bug 1837813 - Remove unused media.* prefs r=geckoview-reviewers,m_kato
Depends on D180599

Differential Revision: https://phabricator.services.mozilla.com/D180600
2023-06-17 23:34:36 +00:00
Gregory Pappas bd743e541d Bug 1837813 - Remove unused device.* prefs r=geckoview-reviewers,m_kato
Depends on D180598

Differential Revision: https://phabricator.services.mozilla.com/D180599
2023-06-17 23:34:36 +00:00
Gregory Pappas 23f2e35d93 Bug 1837813 - Remove unused accessibility.* prefs r=geckoview-reviewers,eeejay,m_kato
Depends on D180597

Differential Revision: https://phabricator.services.mozilla.com/D180598
2023-06-17 23:34:36 +00:00
Gregory Pappas f0c3ad095a Bug 1837813 - Remove unused app.* prefs r=geckoview-reviewers,m_kato
Depends on D180596

Differential Revision: https://phabricator.services.mozilla.com/D180597
2023-06-17 23:34:36 +00:00
Gregory Pappas 4926ec63d8 Bug 1837813 - Remove unused privacy.* prefs r=geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D180596
2023-06-17 23:34:36 +00:00
Gregory Pappas 86b293b025 Bug 1837813 - Remove unused network.* prefs r=geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D180595
2023-06-17 23:34:36 +00:00
Gregory Pappas a82ea059d1 Bug 1837813 - Remove unused browser.* prefs r=geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D180594
2023-06-17 23:34:36 +00:00
Iulian Moraru ede7da36a1 Backed out 9 changesets (bug 1837813) for causing xpcshell failures on test_UpdateUtils_updatechannel.js. CLOSED TREE
Backed out changeset ad499e552dc4 (bug 1837813)
Backed out changeset 3d003c94d27c (bug 1837813)
Backed out changeset c0e6563d21b3 (bug 1837813)
Backed out changeset 51da430b2a24 (bug 1837813)
Backed out changeset e5f493435a3a (bug 1837813)
Backed out changeset 5c7a9f173117 (bug 1837813)
Backed out changeset 6b289a4b002b (bug 1837813)
Backed out changeset 2af6113433c9 (bug 1837813)
Backed out changeset e6bb4d815f7c (bug 1837813)
2023-06-17 23:15:55 +03:00
Gregory Pappas 066d00d1c4 Bug 1837813 - Remove unused signon.* prefs r=geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D180602
2023-06-17 19:02:57 +00:00
Gregory Pappas 4e1484a0e2 Bug 1837813 - Remove unused extensions.* prefs r=geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D180601
2023-06-17 19:02:57 +00:00
Gregory Pappas bb30b3fdea Bug 1837813 - Remove unused media.* prefs r=geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D180600
2023-06-17 19:02:57 +00:00
Gregory Pappas 37406d40fb Bug 1837813 - Remove unused device.* prefs r=geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D180599
2023-06-17 19:02:56 +00:00
Gregory Pappas 08cf7ad128 Bug 1837813 - Remove unused accessibility.* prefs r=geckoview-reviewers,eeejay,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D180598
2023-06-17 19:02:56 +00:00
Gregory Pappas 7f681359f2 Bug 1837813 - Remove unused app.* prefs r=geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D180597
2023-06-17 19:02:56 +00:00
Gregory Pappas 7bafd61684 Bug 1837813 - Remove unused privacy.* prefs r=geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D180596
2023-06-17 19:02:56 +00:00
Gregory Pappas 409390ef03 Bug 1837813 - Remove unused network.* prefs r=geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D180595
2023-06-17 19:02:56 +00:00
Gregory Pappas e7fa619d24 Bug 1837813 - Remove unused browser.* prefs r=geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D180594
2023-06-17 19:02:56 +00:00
Gregory Pappas 03112fe0e9 Bug 1837770 - Remove unused browser.tabs.* prefs r=webdriver-reviewers,geckoview-reviewers,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D180559
2023-06-15 15:45:25 +00:00
Mark Banner ae619c5049 Bug 1838155 - Clean up some console.error calls that had been migrated from Cu.reportError. r=jdescottes,perftest-reviewers,geckoview-reviewers,credential-management-reviewers,search-reviewers,sgalich,owlish,jteow,sparky
This goes through the previous changes in the dependencies of bug 877389, and does two things:
1) Remove instances of \n
2) Change reporting of exceptions so that they are passed as separate arguments. This should result
   in an improved display of the exception in the browser console, should it occur.

Differential Revision: https://phabricator.services.mozilla.com/D180843
2023-06-15 08:33:57 +00:00
Makoto Kato 2b44e638d8 Bug 1838137 - Convert GeckoViewAutocomplete to ESM. r=geckoview-reviewers,credential-management-reviewers,sgalich,ohall
Differential Revision: https://phabricator.services.mozilla.com/D180772
2023-06-14 12:58:08 +00:00
Ryan VanderMeulen 82450eae8a Bug 1838274 - Update Kotlin Coroutines to version 1.7.1. r=geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D180858
2023-06-13 17:31:49 +00:00
Arturo Mejia a4a3d123c8 Bug 1836356 - Add GeckoViewIdentityCredential module to moz.build. r=tthibaud,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D180837
2023-06-13 14:59:02 +00:00
Ryan VanderMeulen 963cdf3aaa Bug 1837640 - Target JVM 17 bytecode in GeckoView. r=geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D180443
2023-06-12 22:27:13 +00:00
Makoto Kato 15a3bcdf32 Bug 1741790 - Add a wait to avoid TextInputDelegateTest#inputConnection_selectionByArrowKey failures. r=geckoview-reviewers,ohall
Since this test is often failure, I would like to add a wait for avoid
test failures. When I run this with `--repeat 200` on local, no failure.

Differential Revision: https://phabricator.services.mozilla.com/D179916
2023-06-12 02:16:06 +00:00
Dan Robertson 1e2edc0ebb Bug 1815713 - Allow pull to refresh from subframes. r=botond,geckoview-reviewers,owlish
When a subframe and all of its scroll handoff parents have no room to
scroll up, provide a mechanism for the frontend to implement
pull-to-refresh. When input targets a subframe that meets the above
conditions:

For eager results and content that has a related event handler that does
not preventDefault, return input "unhandled". This allows pull to refresh
to work on mobile when the upwards scroll occurs over a subframe.

Differential Revision: https://phabricator.services.mozilla.com/D176559
2023-06-10 13:29:38 +00:00
Arturo Mejia aa7b0c53b3 Bug 1836356 - Add support for nsIIdentityCredentialPromptService.showProviderPrompt in GeckoView. r=geckoview-reviewers,tthibaud,ohall
Co-authored-by: Titouan Thibaud <tthibaud@mozilla.com>
Co-authored-by: arturo mejia <arturomejiamarmol@gmail.com>

Differential Revision: https://phabricator.services.mozilla.com/D179834
2023-06-10 01:49:27 +00:00
Gregory Pappas d5393fa90c Bug 1837668 - Remove unused toolkit.browser.* prefs r=geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D180459
2023-06-09 21:43:02 +00:00
Gregory Pappas df6b6b8178 Bug 1769601 - Remove dom.ipc.plugins.* prefs r=tjr,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D180389
2023-06-09 20:16:15 +00:00
Hiroyuki Ikezoe 3aa885c0f7 Bug 1736391 - Honor preventDefault information from the contents whether not to open context menu. r=geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D180165
2023-06-09 01:18:04 +00:00
Olivia Hall 5475b48418 Bug 1837426 - GeckoView Print With Status r=geckoview-reviewers,amejiamarmol,owlish
Added `didPrintPageContent` to return a GeckoResult if printing completed on
Android when printing the current page. Also added `ERROR_NO_PRINT_DELEGATE`.

Differential Revision: https://phabricator.services.mozilla.com/D180355
2023-06-08 22:42:31 +00:00
Makoto Kato 1057f41c45 Bug 1836715 - Convert GeckoView's components to ESM. r=geckoview-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D180167
2023-06-08 08:51:48 +00:00
Cathy Lu d715b3d12a Bug 1823432 - Verify mobile messaging for native app and extension communication r=geckoview-reviewers,extension-reviewers,robwu,amejiamarmol
Differential Revision: https://phabricator.services.mozilla.com/D179607
2023-06-07 16:20:50 +00:00
Gabriele Svelto c71c89df36 Bug 1776197 - Tweak GeckoView tests to check for child process annotations r=owlish
Differential Revision: https://phabricator.services.mozilla.com/D179079
2023-06-07 12:34:32 +00:00
Gabriele Svelto 4b039f20f2 Bug 1776197 - Remove the old IPC channel used for retrieving annotations and all related machinery r=geckoview-reviewers,afranchuk,owlish
Depends on D173699

Differential Revision: https://phabricator.services.mozilla.com/D173700
2023-06-07 12:34:31 +00:00
Arturo Mejia ec31c14fd3 Bug 1824863 - Enable blocklist v3 on Android on release. r=geckoview-reviewers,robwu,calu
Differential Revision: https://phabricator.services.mozilla.com/D178188
2023-06-06 20:41:19 +00:00
Rob Wu 30a181b7dd Bug 1836673 - Document AppTestDelegate and AppUiTestDelegate r=geckoview-reviewers,extension-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D179891
2023-06-06 11:23:41 +00:00
Rob Wu fef9c3bf5e Bug 1830814 - Migrate remaining extension jsm files to ESM r=geckoview-reviewers,Standard8,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D179890
2023-06-05 10:23:40 +00:00
Rob Wu 3c0c3a2676 Bug 1836482 - Replace AddonManager.jsm imports with AddonManager.sys.mjs r=Standard8,webcompat-reviewers,twisniewski
This patch was generated as follows:

Run:
`./mach esmify --imports . --prefix=toolkit/mozapps/extensions/AddonManager`
In the output there are linter/prettifier errors due to unused
XPCOMUtils or separate importESModule calls. These have been fixed
manually and verified with `./mach lint --outgoing`.

The `esmify` script also inserts many unwanted newlines around imports
that are broken on two lines due to length. Due to the number of these,
I fixed them programatically.

1. Create patch from the changes so far.
2. From the patch, delete all lines that consist of "+" (i.e. added blank line).
3. Reset the working dir and apply the revised patch.
4. Verify that the diff between step 1 and 3 looks reasonable.
5. Verify that this patch as a whole looks reasonable.

Commands:

```
git diff > rename.diff
:%g/^+$/d
git commit -va -m WIP-rename
git revert HEAD
git apply --recount rename.diff
git diff HEAD^  # and verify that the removed lines are ok.
git commit -va  # one last review to verify correctness of whole patch.
git rebase -i HEAD~3  # drop the WIP + reverted commit, pick only the last.
```

`git apply` has the `--recount` option to force it to ignore mismatches
in line counts, which happens because we deleted added lines (^+$)
without fixing up the line counts in the file headers.

Differential Revision: https://phabricator.services.mozilla.com/D179874
2023-06-04 13:44:45 +00:00
Makoto Kato 19f275b625 Bug 1836432 - Use nsresult exception mode for GeckoAppShell.getDNSDomains. r=geckoview-reviewers,necko-reviewers,valentin,ohall
There is some OOM errors by `GeckoAppShell.getDNSDomains`. Since
`nsAndroidNetworkLinkService::GetDnsSuffixList` can returns `nsresult`, we
should return error instead of crash.

Differential Revision: https://phabricator.services.mozilla.com/D179791
2023-06-04 10:53:32 +00:00
Mark Banner 5d59c7aecd Bug 1824613 - Convert consumers of toolkit/mozapps/extensions/ to import ES modules directly. r=extension-reviewers,settings-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,sync-reviewers,sgalich,bytesized,robwu,skhamis
Depends on D179819

Differential Revision: https://phabricator.services.mozilla.com/D179820
2023-06-02 20:00:35 +00:00
CanadaHonk cfda91bc2b Bug 1836170 - Rename ChromeOnly URL.isValidURL r=geckoview-reviewers,emilio,m_kato
Renamed chrome only URL.isValidURL to URL.isValidObjectURL for the name
to better match existing object/blob URL functions and to be less
confusing with new URL.canParse.

No tests for this function exist since it's chrome only (todo?) :'(

Differential Revision: https://phabricator.services.mozilla.com/D179641
2023-06-02 18:27:12 +00:00
kycn 15ab4b4600 Bug 1836285 - Revert "Bug 1815015 - Set the activeness of the browser to false by default at the time of its creation. r=geckoview-reviewers,calu"
This reverts commit 9f2f3c60d6e832ba3461eda7cdde310bfce9440c.

Differential Revision: https://phabricator.services.mozilla.com/D179717
2023-06-01 18:45:31 +00:00
Saira Abdulla 9691ab4a5f Bug 1824612 - Convert consumers of toolkit/components/extensions to ES modules. r=robwu,webcompat-reviewers,geckoview-reviewers,settings-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,cookie-reviewers,twisniewski,sgalich,valentin,nalexander,mconley,m_kato
Depends on D175553

Differential Revision: https://phabricator.services.mozilla.com/D176005
2023-05-31 15:27:03 +00:00
Iulian Moraru 90b739a400 Backed out 2 changesets (bug 1824612) for causing dt failures on browser_dbg-features-source-tree.js. CLOSED TREE
Backed out changeset c3f38adc818e (bug 1824612)
Backed out changeset 58ba8bb3398a (bug 1824612)
2023-05-31 17:28:16 +03:00
Saira Abdulla 2e8db5969a Bug 1824612 - Convert consumers of toolkit/components/extensions to ES modules. r=robwu,webcompat-reviewers,geckoview-reviewers,settings-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,cookie-reviewers,twisniewski,sgalich,valentin,nalexander,mconley,m_kato
Depends on D175553

Differential Revision: https://phabricator.services.mozilla.com/D176005
2023-05-31 10:21:37 +00:00
Makoto Kato 7af39f7f34 Bug 1827583 - Set event listener to current media control after switching process. r=geckoview-reviewers,amejiamarmol,jonalmeida
This issue is a timing issue of loading content via about:config etc.

Although `GeckoViewMediaControl` registers event listeners for
`MediaController` when enabling `MediaSessionDelegate`, if process
switching occurs, `browsingContenxt` and `MediaController` are re-created.

It means that we has to register newer `MediaController`.

To detect destroying current browser, I will add `onDestroyBrowser` to
`GeckoViewModule` again (This was removed by bug 1672262).

Differential Revision: https://phabricator.services.mozilla.com/D179177
2023-05-30 23:57:40 +00:00
Eemeli Aro 0997552230 Bug 1831872 - Migrate client.name2 string from sync.properties to Fluent. r=markh,fluent-reviewers,geckoview-reviewers,sync-reviewers,flod,m_kato
As this is the only string in `services/`, let's simplify by moving it under `toolkit/` and removing `services/sync/locales/` as empty.

On advice from markh, the ON_NEW_DEVICE_ID notification is delayed during device registration & updates until the update has been written to storage.

Differential Revision: https://phabricator.services.mozilla.com/D178805
2023-05-29 15:24:38 +00:00
James Teh f79fdd39f3 Bug 1833313: Remove all remaining a11y cache checks and non-caching code except for Mac specific bits. r=morgan,geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D178146
2023-05-28 23:42:12 +00:00
Mark Banner 8b4f426ecf Bug 1834204 - Update more consumers to import ES modules directly. r=kpatenio,geckoview-reviewers,whimboo,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D178590
2023-05-26 11:36:33 +00:00
Karandeep ebdf250671 Bug 1829616 - Convert consumers of dom/notification to import ES modules directly. r=Standard8,geckoview-reviewers,m_kato
Depends on D178836

Differential Revision: https://phabricator.services.mozilla.com/D178837
2023-05-26 08:28:47 +00:00
az f3a52aeaa3 Bug 1724027 - Forward CBCS crypto pattern to remote decoding process on Android r=jolin,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D178572
2023-05-25 22:31:55 +00:00
Calixte 9f9c3c9b31 Bug 1834830 - Avoid an OOM crash in fetching the pdf stream in GeckoSession r=geckoview-reviewers,pdfjs-reviewers,amejiamarmol,ohall,marco
When saving, the pdf data were fetched in JS and then passed to Java in using a message.
But with large pdf, it was possible to not have enough memory to allocate for the message.
Hence the idea is to just pass the blob url to Java and then stream the data.

Differential Revision: https://phabricator.services.mozilla.com/D179076
2023-05-25 19:20:01 +00:00
Emilio Cobos Álvarez a3dc24d5ea Bug 1834813 - Document.allowDeprecatedTls is dead code. r=smaug,geckoview-reviewers,m_kato
This was added in bug 1641597, but nowadays neither us nor Fenix show
any UI to enable deprecated TLS anymore. That string isn't in the
firefox-android repo afaict:

  https://github.com/search?type=code&q=repo%3Amozilla-mobile%2Ffirefox-android+allowDeprecatedTls

So this is just dead code.

Differential Revision: https://phabricator.services.mozilla.com/D178958
2023-05-25 10:00:46 +00:00
Paul Adenot cf839554dd Bug 1703812 - Part 28 - Tighten mp3 demuxing tests, removing tolerances and checking encoder delay and padding. r=alwu,geckoview-reviewers,tthibaud
This removes most fuzzing and adds checks for trim information.

Differential Revision: https://phabricator.services.mozilla.com/D170647
2023-05-24 13:18:36 +00:00
Sandor Molnar 329d21371b Backed out changeset dbb7e27f8464 (bug 1833313) for causing android gv-junit crashes. CLOSED TREE 2023-05-24 14:08:03 +03:00
James Teh fbf1ab52f8 Bug 1833313: Remove all remaining a11y cache checks and non-caching code except for Mac specific bits. r=morgan,geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D178146
2023-05-24 10:10:46 +00:00
Makoto Kato 26b37b6dcc Bug 1833990 - Use ChromeUtils.idleDispatch instead of nsIMessageLoop.postIdleTask. r=geckoview-reviewers,calu
GeckoView's `DelayedInit.jsm` is only one consumer for `nsIMessageLoop`. This
XPCOM has no unit test now, so we don't know whether this XPCOM works
correctly.

Actually, `ChromeUtils` has `idleDispatch`, so we can replace `nsIMessageLoop`
with `ChromeUtils.idleDispatch`. It is used on a lot of code.

Differential Revision: https://phabricator.services.mozilla.com/D178624
2023-05-24 07:20:06 +00:00
Ryan VanderMeulen d8982aa5e6 Bug 1834576 - Update snakeyaml to version 2.0. r=geckoview-reviewers,calu
Added LoaderOptions because the deprecated Constructor we were
using was removed upstream.

Depends on D178822

Differential Revision: https://phabricator.services.mozilla.com/D178823
2023-05-24 01:46:15 +00:00
Ryan VanderMeulen d4bc37f3d1 Bug 1834576 - Update ktlint to version 0.48.2. r=geckoview-reviewers,calu
Depends on D178821

Differential Revision: https://phabricator.services.mozilla.com/D178822
2023-05-24 01:46:14 +00:00
Ryan VanderMeulen 7d276a8c4b Bug 1834576 - Update googleJavaFormat to version 1.17.0. r=geckoview-reviewers,calu
Depends on D178820

Differential Revision: https://phabricator.services.mozilla.com/D178821
2023-05-24 01:46:13 +00:00
Ryan VanderMeulen 3692e86902 Bug 1834576 - Synchronize GeckoView Gradle dependencies with firefox-android. r=geckoview-reviewers,calu
Fix-ups in this patch:
* Enable multidex on messaging example apps to fix Lite build bustage where we API 16 is still supported
* Switch from deprecated assertThat to Hamcrest version
* Remove usage of deprecated ExpectedException.none()

Differential Revision: https://phabricator.services.mozilla.com/D178819
2023-05-24 01:46:13 +00:00
Kris Maglione f9100d622c Bug 1769763: Part 2 - Add debug names to StructuredCloneHolder objects for about:memory. r=mccr8,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D162251
2023-05-23 23:13:36 +00:00
Eemeli Aro 411a529019 Bug 1793557 - Convert Extension.jsm strings to Fluent. r=mkmelin,geckoview-reviewers,robwu,flod,owlish
This changes the arguments of `ExtensionData.formatPermissionStrings()`.
The second `bundle` arg is dropped, and a `localization` option is added.
Call sites in m-c are updated, but this will also need a matching update for Thunderbird.
A few Thunderbird test cases will also need to be updated,
as they currently point to a non-existing localization file paths
"messenger/addons.ftl" and "messenger/addonPermissions.ftl".

As discussed at the addon workweek,
the Fluent l10n keys for extension permissions match the pattern:

    webext-perms-description-{name}

where `{name}` is the permission's sanitized name.
A fluent-lint exception is added for the capitalization of these generated names.
To allow for message updates and subsequent l10n identifier updates,
a `PERMISSION_L10N_ID_OVERRIDES` map is provided.

Because Fluent localization keys are not enumerable
and attempting to format a missing key is an error,
the `PERMISSIONS_WITH_MESSAGE` set must be kept in sync with message updates.

Differential Revision: https://phabricator.services.mozilla.com/D158663
2023-05-23 12:00:01 +00:00
Gregory Pappas f8080c91e5 Bug 1773097 - Remove unused browser.chromeURL pref r=tjr,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D178479
2023-05-22 14:31:55 +00:00
Mark Banner 2a53076d43 Bug 1826063 - Automatic fixes for enabling Prettier on production xhtml and html files. r=mossop,webdriver-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,settings-reviewers,application-update-reviewers,credential-management-reviewers,fxview-reviewers,sgalich,nalexander,devtools-reviewers,sclements,denschub,robwu,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177938
2023-05-20 12:26:56 +00:00
Mark Banner 130a655906 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Mark Banner 8219a5c503 Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Cosmin Sabou 3979c05ca1 Merge mozilla-central to autoland. 2023-05-19 14:56:17 +03:00
Cosmin Sabou 5fd965f028 Backed out 80 changesets (bug 1821362, bug 1703812, bug 1817997) for causing media crashes as in Bug 1833890. a=backout
Backed out changeset f2113c9b661f (bug 1817997)
Backed out changeset f1ecfbba7ed2 (bug 1703812)
Backed out changeset 011cece33b0d (bug 1817997)
Backed out changeset 4b42659090f3 (bug 1817997)
Backed out changeset 2d92f903dd66 (bug 1817997)
Backed out changeset 0ef13d357ee3 (bug 1817997)
Backed out changeset 7353f869efd2 (bug 1703812)
Backed out changeset 14b061d0f595 (bug 1817997)
Backed out changeset d29bc29397c8 (bug 1703812)
Backed out changeset 54c3294f0839 (bug 1817997)
Backed out changeset b9f2e1155bd7 (bug 1817997)
Backed out changeset d5d5d390dcbf (bug 1817997)
Backed out changeset 8fca27bd0f6b (bug 1817997)
Backed out changeset 670c599a3b99 (bug 1817997)
Backed out changeset deea3077f762 (bug 1817997)
Backed out changeset 25ecea0f3d49 (bug 1817997)
Backed out changeset 35ab3ed5e3fc (bug 1817997)
Backed out changeset f516a428ba32 (bug 1817997)
Backed out changeset e589b4d30995 (bug 1817997)
Backed out changeset d096b9cc905d (bug 1817997)
Backed out changeset 2952a6fa06e5 (bug 1817997)
Backed out changeset c1ac4c31ad9a (bug 1817997)
Backed out changeset 04c60cd83c5f (bug 1821362)
Backed out changeset 6dd80575e551 (bug 1821362)
Backed out changeset b86b569ecd46 (bug 1817997)
Backed out changeset 412e0a9ec4e8 (bug 1817997)
Backed out changeset 8e0dcf163138 (bug 1817997)
Backed out changeset 7af506896930 (bug 1817997)
Backed out changeset 29f7cd2b341c (bug 1817997)
Backed out changeset 7f64e65d9497 (bug 1817997)
Backed out changeset 89c241451a32 (bug 1817997)
Backed out changeset 66e4a26e1ebe (bug 1817997)
Backed out changeset ea1aebd4e245 (bug 1817997)
Backed out changeset 2d88a5915db9 (bug 1817997)
Backed out changeset 697ec1928f9c (bug 1817997)
Backed out changeset 41c0bd1133c5 (bug 1817997)
Backed out changeset b20cc750c020 (bug 1817997)
Backed out changeset dc5fd84a3a4c (bug 1703812)
Backed out changeset efa6d130d4eb (bug 1703812)
Backed out changeset 20d9b7cf0ddc (bug 1703812)
Backed out changeset e77c61e8fad2 (bug 1703812)
Backed out changeset 582d5c680e5a (bug 1703812)
Backed out changeset 96c9aacc6811 (bug 1703812)
Backed out changeset 56ec4a57a6a6 (bug 1703812)
Backed out changeset 8f96c8811675 (bug 1703812)
Backed out changeset a79a2f1b2b51 (bug 1703812)
Backed out changeset 07eb8b2c5b9f (bug 1703812)
Backed out changeset bae2b2fb9759 (bug 1703812)
Backed out changeset 38b0416538f3 (bug 1703812)
Backed out changeset b27b54c95cf2 (bug 1703812)
Backed out changeset cab00065d83d (bug 1703812)
Backed out changeset ab44727b2e1a (bug 1703812)
Backed out changeset b7fdcb494670 (bug 1703812)
Backed out changeset 73db43d49c6d (bug 1703812)
Backed out changeset ce754dbfb862 (bug 1703812)
Backed out changeset d694726a3ee6 (bug 1703812)
Backed out changeset 6acede55acbb (bug 1703812)
Backed out changeset 86e7d4784a20 (bug 1703812)
Backed out changeset 6b2e055d9314 (bug 1703812)
Backed out changeset b08695e5728a (bug 1703812)
Backed out changeset 3b8a0081fd10 (bug 1703812)
Backed out changeset 3a163596f982 (bug 1703812)
Backed out changeset 5be1d4b282ab (bug 1703812)
Backed out changeset 1ce012d7509e (bug 1703812)
Backed out changeset ee2fab5881c7 (bug 1703812)
Backed out changeset 62941a522893 (bug 1703812)
Backed out changeset d4f11dc33eed (bug 1703812)
Backed out changeset 781bb4c3cc02 (bug 1703812)
Backed out changeset f070e0de0566 (bug 1703812)
Backed out changeset 9f65c67ba2a6 (bug 1703812)
Backed out changeset 1e76eecb85e2 (bug 1703812)
Backed out changeset 953432408a83 (bug 1703812)
Backed out changeset fd1dc92d3911 (bug 1703812)
Backed out changeset 34d56948c6b6 (bug 1703812)
Backed out changeset 2ba7ca61ecc3 (bug 1703812)
Backed out changeset 545253c469e6 (bug 1703812)
Backed out changeset fb4a61ab1300 (bug 1703812)
Backed out changeset bf07b3cfd3d5 (bug 1703812)
Backed out changeset eaff51e7754b (bug 1703812)
Backed out changeset f5c485c41d13 (bug 1703812)
2023-05-19 14:49:57 +03:00
jackyzy823 bb7e1c8e15 Bug 1812724 - Part 1: set textContent in ContextMenu message. r=geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D176233
2023-05-19 01:40:55 +00:00
Pushpanjali 235f25ea9c Bug 1822010 - Convert toolkit/components/url-classifier to ES modules. r=perftest-reviewers,webcompat-reviewers,geckoview-reviewers,devtools-reviewers,twisniewski,valentin,m_kato,anti-tracking-reviewers,timhuang,sparky
Differential Revision: https://phabricator.services.mozilla.com/D173390
2023-05-18 12:21:12 +00:00
Calixte 106004964e Bug 1833093 - Add suport for Nimbus in pdf.js with GeckoView r=geckoview-reviewers,pdfjs-reviewers,marco,amejiamarmol,ohall
Differential Revision: https://phabricator.services.mozilla.com/D178045
2023-05-17 20:13:45 +00:00
Paul Adenot 7bbbd47c35 Bug 1703812 - Part 28 - Tighten mp3 demuxing tests, removing tolerances and checking encoder delay and padding. r=alwu,geckoview-reviewers,tthibaud
This removes most fuzzing and adds checks for trim information.

Differential Revision: https://phabricator.services.mozilla.com/D170647
2023-05-17 15:47:00 +00:00
Makoto Kato e175847317 Bug 1832046 - Convert GeckoView's actors to ESM. r=geckoview-reviewers,calu,amejiamarmol
Differential Revision: https://phabricator.services.mozilla.com/D177580
2023-05-17 01:27:54 +00:00
Eitan Isaacson c3a3a950f0 Bug 1829056 - P2: Include fromIndex in TYPE_VIEW_TEXT_CHANGED events. r=Jamie,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D177809
2023-05-17 00:19:17 +00:00
Eitan Isaacson 67474ddb00 Bug 1829056 - P1: Include text in TYPE_VIEW_TEXT_SELECTION_CHANGED events. r=Jamie,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D177808
2023-05-17 00:19:17 +00:00
Gregory Pappas 0b919a3eb2 Bug 1773098 - Remove unused browser.offline-apps.notify pref r=geckoview-reviewers,tjr,amejiamarmol
Differential Revision: https://phabricator.services.mozilla.com/D177971
2023-05-16 18:14:12 +00:00
Hiroyuki Ikezoe 11a4d97a7b Bug 1829327 - Use scrollbar-width style instead of ui.scrollbarFadeBeginDelay to hide overlay scrollbars. r=botond,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D176745
2023-05-16 01:09:00 +00:00
Hiroyuki Ikezoe 04ba6da88c Bug 1817330 - Inform a reasonable APZHandledResult to GeckoView even if the APZ's result is nsEventStatus_eConsumeNoDefault. r=botond,geckoview-reviewers,owlish
Note that for touch events there are two possibilities where
InputQueue::ReceiveInputEvent() returns nsEventStatus_eConsumeNoDefault, a) the
touch input block is in a state of fast fling or b) the touch input block is in
a state of internal slop.

In the case of b) the nsEventStatus_eConsumeNoDefault status will never be used
since
 1) In cases of delayed results we just use the APZHandledResult we don't refer
    the nsEventStatus at all [1]
 2) In cases of non-delayed results even if the initial touch-start event gets
    into slop, TouchBlockState::UpdateSlopState returns false [2], thus APZ
    immediately reports one of the other nsEventStatuses and any subsequent
    statuses will never be used [3]

In the case of a) nsEventStatus_eConsumeNoDefault means the event doesn't need
to be sent to content, it doesn't mean any APZC didn't scroll by the event.

Also note that there's an automated test exercising the scenario a). It was
flaky before (bug 1687842), but now it appears to be stable.

[1] https://searchfox.org/mozilla-central/rev/32c74afbb24dce4b5dd6b33be71197e615631d71/gfx/layers/apz/src/InputQueue.cpp#986
[2] https://searchfox.org/mozilla-central/rev/32c74afbb24dce4b5dd6b33be71197e615631d71/gfx/layers/apz/src/InputBlockState.cpp#774-784
[3] https://searchfox.org/mozilla-mobile/rev/9fd115db1da9958a32c2cb2943fef79c1a0cac4a/firefox-android/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/NestedGeckoView.kt#85,122-132

Differential Revision: https://phabricator.services.mozilla.com/D177456
2023-05-15 23:21:54 +00:00
Olivia Hall 794635fb0d Bug 1826188 - Additional GeckoView Print Telemetry r=geckoview-reviewers,amejiamarmol,owlish
This bug adds in some additional telemetry for window.print on GeckoView
to report error conditions and if the Android print dialog successfully
opens.

Differential Revision: https://phabricator.services.mozilla.com/D177106
2023-05-15 13:10:08 +00:00
Hiroyuki Ikezoe 2b70168145 Bug 1764606 - Expand nsDisplaySolidColor's bounds including the dynamic toolbar area. r=botond,tnikkel,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D168913
2023-05-11 21:17:30 +00:00
Emilio Cobos Álvarez 3a99b7feb9 Bug 1831136 - Plumb android text scale via nsLookAndFeel. r=geckoview-reviewers,dholbert,owlish
That's how we do it for all other platforms. Do this rather than via a
custom mostly-untested pref, which allows us to simplify text zoom
handling.

Differential Revision: https://phabricator.services.mozilla.com/D177062
2023-05-11 19:01:19 +00:00
Olivia Hall c7a1175687 Bug 1831223 - Added GeckoView Print Status r=geckoview-reviewers,jonalmeida
Added an additional print option to the PrintDelegate to have more
information on print status.

Differential Revision: https://phabricator.services.mozilla.com/D177661
2023-05-11 18:38:15 +00:00
Cosmin Sabou 6f0e95aaa5 Backed out changeset 06b409d9ea95 (bug 1831223) for causing linting failures on GeckoSession.java. CLOSED TREE 2023-05-11 20:56:47 +03:00
Olivia Hall c25657c2dd Bug 1831223 - Added GeckoView Print Status r=geckoview-reviewers,jonalmeida
Added an additional print option to the PrintDelegate to have more
information on print status.

Differential Revision: https://phabricator.services.mozilla.com/D177661
2023-05-11 14:24:55 +00:00
Mike Hommey b5cca4ec86 Bug 1829017 - Add a synthetic document about how to build Firefox for Android. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D175962
2023-05-10 21:25:50 +00:00
Jamie Nicol ba52b0e1e3 Bug 1824083 - Request new Surface from application when resuming compositor fails on Android. r=gfx-reviewers,geckoview-reviewers,nical,m_kato
We see a fair number of crashes caused by failing to create an EGL
surface when resuming the compositor on Android. We believe that in
the vast majority of these cases the Surface we have been provided by
the OS is in an invalid state, and therefore we will never succeed in
creating an EGL surface from it.

Currently when creating the EGL surface fails we raise a NEW_SURFACE
webrender error. This causes us to fall back through webrender
configurations, reinitialize the compositors, and eventually crash
when we are still unable to resume. None of this will help when the
Android Surface we have been provided is in this invalid state.

This patch therefore avoids raising the webrender error initially, and
instead gives the widget an opportunity to handle the failure. The
widget uses the new GeckoView API added in the previous patch in this
series to request a new Surface from the application. This will cause
another resume event immediately afterwards with a new - and hopefully
valid - surface, allowing the EGL surface to be created and the
compositor to be successfully resumed. If we are still unable to
create an EGL surface after this, then we will raise the webrender
error as before, likely eventually resulting in a crash.

Differential Revision: https://phabricator.services.mozilla.com/D176721
2023-05-10 15:50:22 +00:00
Jamie Nicol 398898852a Bug 1824083 - Add API to allow Gecko to request a new Surface from the application. r=geckoview-reviewers,m_kato
Adds a new interface, GeckoDisplay.NewSurfaceProvider, of which an
implementation can be provided in the GeckoDisplay.SurfaceInfo passed
to GeckoDisplay.surfaceChanged(). We include an implementation in
the GeckoView class, which works by toggling the SurfaceView's
visibility, causing a new surfaceChanged callback to be fired.

Differential Revision: https://phabricator.services.mozilla.com/D176720
2023-05-10 15:50:21 +00:00
Jamie Nicol 26e6758aea Bug 1824083 - Remove previous attempts to detect and work around invalid Surface bug. r=gfx-reviewers,geckoview-reviewers,nical,m_kato
The detection is inadequate and the workaround does not work on all
versions of Android. Later patches in this series will replace this
with something better.

Differential Revision: https://phabricator.services.mozilla.com/D176719
2023-05-10 15:50:21 +00:00
Sandor Molnar 84e52573e7 Backed out 4 changesets (bug 1824083) for causing build bustages in include/mozilla/webrender/RenderCompositorOGLSWGL.h CLOSED TREE
Backed out changeset 7c1be037e345 (bug 1824083)
Backed out changeset bf5c5929ef7b (bug 1824083)
Backed out changeset 6fad491b84be (bug 1824083)
Backed out changeset 57ae9c87c467 (bug 1824083)
2023-05-10 18:01:13 +03:00
Jamie Nicol d3fb4b5d33 Bug 1824083 - Request new Surface from application when resuming compositor fails on Android. r=gfx-reviewers,geckoview-reviewers,nical,m_kato
We see a fair number of crashes caused by failing to create an EGL
surface when resuming the compositor on Android. We believe that in
the vast majority of these cases the Surface we have been provided by
the OS is in an invalid state, and therefore we will never succeed in
creating an EGL surface from it.

Currently when creating the EGL surface fails we raise a NEW_SURFACE
webrender error. This causes us to fall back through webrender
configurations, reinitialize the compositors, and eventually crash
when we are still unable to resume. None of this will help when the
Android Surface we have been provided is in this invalid state.

This patch therefore avoids raising the webrender error initially, and
instead gives the widget an opportunity to handle the failure. The
widget uses the new GeckoView API added in the previous patch in this
series to request a new Surface from the application. This will cause
another resume event immediately afterwards with a new - and hopefully
valid - surface, allowing the EGL surface to be created and the
compositor to be successfully resumed. If we are still unable to
create an EGL surface after this, then we will raise the webrender
error as before, likely eventually resulting in a crash.

Differential Revision: https://phabricator.services.mozilla.com/D176721
2023-05-10 14:44:50 +00:00
Jamie Nicol bb10526e75 Bug 1824083 - Add API to allow Gecko to request a new Surface from the application. r=geckoview-reviewers,m_kato
Adds a new interface, GeckoDisplay.NewSurfaceProvider, of which an
implementation can be provided in the GeckoDisplay.SurfaceInfo passed
to GeckoDisplay.surfaceChanged(). We include an implementation in
the GeckoView class, which works by toggling the SurfaceView's
visibility, causing a new surfaceChanged callback to be fired.

Differential Revision: https://phabricator.services.mozilla.com/D176720
2023-05-10 14:44:50 +00:00
Jamie Nicol c958bba972 Bug 1824083 - Remove previous attempts to detect and work around invalid Surface bug. r=gfx-reviewers,geckoview-reviewers,nical,m_kato
The detection is inadequate and the workaround does not work on all
versions of Android. Later patches in this series will replace this
with something better.

Differential Revision: https://phabricator.services.mozilla.com/D176719
2023-05-10 14:44:50 +00:00
Mark Banner 090786354b Bug 1829608 - Convert dom/manifest to ES modules. r=geckoview-reviewers,devtools-reviewers,m_kato,emilio
Differential Revision: https://phabricator.services.mozilla.com/D176278
2023-05-10 10:50:32 +00:00
Mark Banner c2dd8e3266 Bug 1829618 - Enable Prettier on json files (automatic fixes). r=perftest-reviewers,webcompat-reviewers,extension-reviewers,andi,desktop-theme-reviewers,pip-reviewers,devtools-reviewers,sync-reviewers,mossop,denschub,dao,sparky,robwu,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D176336
2023-05-09 16:14:51 +00:00
Calixte 5653482130 Bug 1829367 - Add an options param when saving a pdf in order to be able to open it in an app on GeckoView r=geckoview-reviewers,pdfjs-reviewers,amejiamarmol,ohall,Snuffleupagus
Differential Revision: https://phabricator.services.mozilla.com/D177263
2023-05-09 15:32:49 +00:00
Ryan VanderMeulen 23efd9dfab Bug 1831238 - Update GeckoView to Kotlin 1.8.21 and Gradle Plugin 7.4.2. r=geckoview-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D177126
2023-05-04 21:39:37 +00:00
owlishDeveloper 7a5f0408e1 Bug 1831172 - Enable currently passing junit tests on Fission r=geckoview-reviewers,amejiamarmol
Differential Revision: https://phabricator.services.mozilla.com/D177076
2023-05-03 18:22:21 +00:00
Makoto Kato 9ef89cb04c Bug 1829654 - screen.orientation.type may be incorrect by auto-rotation on Pixel 6a. r=geckoview-reviewers,calu
Although `screen.orientation.lock()` works correctly and `orientation.type`
returns correct value, when using auto-rotation, `orientation.type` sometimes
return previous value on Android 12+'s device.

By bug 1806072, orientation.angle returns correct value. But
`Configuration.orientation` may be still previous value on
`onConfigurationChanged`. So we don't trust this value.

I cannot reproduce this on emulator image of Android 13. This seems to be
real device only

Also, I add orientation unlock to GVE for manual test.

Differential Revision: https://phabricator.services.mozilla.com/D176762
2023-05-03 15:53:33 +00:00
Makoto Kato 28c21ac0ff Bug 1829649 - Convert JSM that actors are referenced to ESM. r=geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D176314
2023-05-03 14:56:41 +00:00
Makoto Kato 393b07fc97 Bug 1554397 - Implement residentKey support on GeckoView. r=jschanck,geckoview-reviewers,owlish
GMS's FIDO2 19.0.x supports residentKey values. So let's implement it
for Android's native token manager.

But when implementing it, GMS's FIDO2 will synchronize key via Google's
account Passkey. So this is experimental by preferences.

Differential Revision: https://phabricator.services.mozilla.com/D176391
2023-05-03 14:54:52 +00:00
Arturo Mejia 026038c2db Bug 1810875 - Remove CookieBannerMode.COOKIE_BANNER_MODE_DETECT_ONLY in GeckoView. r=geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D176834
2023-05-02 02:29:33 +00:00
owlishDeveloper 0560aeeeac Bug 1822711 - Enable mochitest-plain on Android Fission builds. Disable some of the tests that are currently failing r=jmaher,taskgraph-reviewers,geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D175077
2023-05-01 21:26:40 +00:00
Makoto Kato 7e7be72fa1 Bug 1812356 - Part 2. Add geckoview-junit test for resource://android/. r=geckoview-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D175766
2023-04-28 05:40:41 +00:00
Cathy Lu 26bdd74175 Bug 1822865 - Support persistent events for android downloads API r=geckoview-reviewers,extension-reviewers,robwu,zmckenney
Differential Revision: https://phabricator.services.mozilla.com/D174960
2023-04-27 20:14:48 +00:00
kycn c8c91cf489 Bug 1815015 - Set the activeness of the browser to false by default at the time of its creation. r=geckoview-reviewers,jonalmeida
The browser's activeness is set to false by default at the time of its creation. The reason is to let the background tabs have inactive browsers until they acquire a display to be visible to the user. This optimizes the cpu usage of unviewed tabs that are in the background.

Differential Revision: https://phabricator.services.mozilla.com/D176421
2023-04-26 15:40:23 +00:00
Makoto Kato a676002a98 Bug 1821579 - Add geckoview-junit test. r=geckoview-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D175636
2023-04-26 01:49:33 +00:00
jackyzy823 d9320e2045 Bug 1821579 - Send GeckoView:PageTitleChanged event when STATE_RESTORING. r=csadilek,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D175199
2023-04-26 01:49:33 +00:00
Ryan VanderMeulen 17bba0220d Bug 1829938 - Update GeckoView to Kotlin 1.8.20 and Gradle Plugin 7.4.1. r=geckoview-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D176461
2023-04-25 19:59:41 +00:00
Arturo Mejia bbf1e58474 Bug 1639050 - Enable blocklist v3 on Android nightly r=geckoview-reviewers,robwu,calu
Differential Revision: https://phabricator.services.mozilla.com/D173208
2023-04-25 16:43:39 +00:00
Olivia Hall 0353a143ba Bug 1829159 - GeckoView Request External App r=geckoview-reviewers,amejiamarmol,calu
Adjusted the options on a WebResponse to include a way to request that
GeckoView embedders ask if users would like to view the file in another
app or to show the confirm download flow. (Default is false.)

Set requestExternalApp to true if the GeckoView embeder should prompt
the user to see the file in another app.

Set skipConfirmation to true if the GeckoView embeder does not need to
confirm the download. (Default is false.)

Differential Revision: https://phabricator.services.mozilla.com/D176179
2023-04-25 14:42:06 +00:00
Titouan Thibaud 77c1ec2931 Bug 1796570 - Stop overwritting the value of gfx.color_management.mode on Android r=geckoview-reviewers,calu,jnicol
Differential Revision: https://phabricator.services.mozilla.com/D169300
2023-04-25 08:53:59 +00:00
Nick Alexander 372a5b71ea Bug 1799002 - Part 2: Remove Android workarounds for Bug 1627796. r=geckoview-reviewers,firefox-build-system-reviewers,glandium,m_kato
The underlying Android-Gradle plugin bug has been addressed, so we no
longer see the issue, and therefore we don't need this complicated
"library set generation ID" workaround at all!

Differential Revision: https://phabricator.services.mozilla.com/D175167
2023-04-24 20:11:57 +00:00
Nick Alexander 4558bdbb48 Bug 1799002 - Part 1: Fix Android builds after Android-Gradle plugin version 7.3.0. r=geckoview-reviewers,m_kato
This commit removes a good deal of complexity around how
`assets/omni.ja` and `libs/*` are packaged into the Android GeckoView
project and ultimately AAR and APK files.

Historically there was a delicate arrangement that had both the
omnijar and the native libraries in Android assets, the latter so
they could be compressed and read by Gecko's own loader
implementation.  As GeckoView (and Android itself!) matured, the
arrangement was normalized: now Gecko libraries are regular Android
libraries with no compression and special loading.  This is why we had
levels of indirection around `syncOmnijarFromDistDir` and
`syncLibsFromDistDir`: we needed fine-grained mappings from locations
to locations.  These delicate mappings are no longer needed and the
whole process can be simplified in the manner of this patch.

By declaring the Android sourcesets (close to) statically, the updated
Android-Gradle plugin version 7.3.0 no longer "misses" content changes
in the relevant directories.

We continue to need the `withGeckoBinaries` product flavours to
support non-builds like linting and generating documentation.

Differential Revision: https://phabricator.services.mozilla.com/D161510
2023-04-24 20:11:57 +00:00
Ryan VanderMeulen b7381128ec Bug 1791878 - Update to kotlin 1.7.20 and gradle plugin 7.3.0. r=geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D175166
2023-04-24 20:11:57 +00:00
Calixte 562799d5e5 Bug 1829366 - Enable the new PDF.js toolbar on GeckoView r=geckoview-reviewers,amejiamarmol
Differential Revision: https://phabricator.services.mozilla.com/D176309
2023-04-24 17:51:22 +00:00
Olivia Hall 23e5c337c2 Bug 1823082 - GeckoView PDF Stream Adjustment r=geckoview-reviewers,jonalmeida,amejiamarmol
If an issue occurs when generating the PDF stream, we should be able to
send an error. The prior function (SendError()) was for stream readers
to use. The error state here can occur during writing.

Created a WriteError() option to set an error state that will cause
an IOException when reading to indicate the stream is in an inconclusive
state and to stop reading from it.

Differential Revision: https://phabricator.services.mozilla.com/D175918
2023-04-24 13:15:30 +00:00
Emilio Cobos Álvarez 615e96ac30 Bug 1829444 - Stop generating save analysis on searchfox jobs. r=glandium
Searchfox should be able to use scip for this.

Differential Revision: https://phabricator.services.mozilla.com/D176218
2023-04-22 22:37:54 +00:00
Makoto Kato 6200ec5835 Bug 1828461 - Load LoadURIDelegate as lazy module. r=geckoview-reviewers,calu
After landing bug 1673068, `LoadURIDelegate.jsm` isn't used until error page
is shown. This should move to lazy and convert to ES system module.

Differential Revision: https://phabricator.services.mozilla.com/D175661
2023-04-21 01:45:22 +00:00
Emilio Cobos Álvarez 1d61a94f1b Bug 1828477 - Support input type=date in non-tabbrowser windows. r=Gijs,geckoview-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D175771
2023-04-20 21:14:07 +00:00
jackyzy823 9ea31449b3 Bug 1822731 - Fix NullPointerException when scheme is null in normalizeUriScheme. r=geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D175728
2023-04-20 12:34:51 +00:00
Hiroyuki Ikezoe 80d9a64924 Bug 1704631 - Expand the size for `background-attachmend: fixed` image. r=botond,tnikkel,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D169001
2023-04-19 21:08:53 +00:00
Cathy Lu 761608991d Bug 1825156 - Resolve tabs event page intermittent test r=geckoview-reviewers,extension-reviewers,zmckenney,rpl
Differential Revision: https://phabricator.services.mozilla.com/D174536
2023-04-19 15:19:03 +00:00
Gabriel Luong 45e8c44ba3 Bug 1828719 - Remove omnijar Gradle project from srcdir r=geckoview-reviewers,nalexander,amejiamarmol
Differential Revision: https://phabricator.services.mozilla.com/D175790
2023-04-18 23:20:43 +00:00
Butkovits Atila 31a4ea6812 Backed out changeset 20b2f1dab9b3 (bug 1796570) for causing failures at canvas-display-p3-drawImage-ImageBitmap-Blob.html. CLOSED TREE 2023-04-18 00:18:38 +03:00
Titouan Thibaud 7033ba1f2d Bug 1796570 - Stop overwritting the value of gfx.color_management.mode on Android r=geckoview-reviewers,calu,jnicol
Differential Revision: https://phabricator.services.mozilla.com/D169300
2023-04-17 16:59:16 +00:00
Calixte 0b03a89b68 Bug 1827963 - Enable the download button in pdf.js only on nightly in GeckoView r=geckoview-reviewers,amejiamarmol
Differential Revision: https://phabricator.services.mozilla.com/D175389
2023-04-14 14:46:01 +00:00
Natalia Csoregi fdbf2a7c34 Backed out 2 changesets (bug 1827986, bug 1827963) for causing failures on test_pdf_file_in_iframe.html. CLOSED TREE
Backed out changeset d7824ac93744 (bug 1827963)
Backed out changeset a3b00fcd5fe0 (bug 1827986)
2023-04-14 07:39:47 +03:00
Calixte 6abbe23090 Bug 1827963 - Enable the download button in pdf.js only on nightly in GeckoView r=geckoview-reviewers,amejiamarmol
Differential Revision: https://phabricator.services.mozilla.com/D175389
2023-04-13 22:11:32 +00:00
Eitan Isaacson c275c3a7d9 Bug 1825891 - P2: Remove Android's non-CTW implementation. r=Jamie,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D174516
2023-04-13 17:58:57 +00:00
Eitan Isaacson ea0675fb68 Bug 1825891 - P1: Remove viewport cache from java layer. r=Jamie,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D174515
2023-04-13 17:58:57 +00:00
Stephanie Cunnane 811d067d75 Bug 1824473 - Update consumers of toolkit/components/formautofill to import ES modules directly. r=Standard8,geckoview-reviewers,credential-management-reviewers,sgalich,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D173587
2023-04-12 20:30:43 +00:00
Calixte f9f7694a7b Bug 1823164 - Add an event GeckoView:SavePdf in order to be able save a pdf from the pdf.js UI r=geckoview-reviewers,pdfjs-reviewers,marco,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D174969
2023-04-11 21:50:49 +00:00
Ebilite Uchenna 8c931cb313 Bug 1824611 - Convert consumers of toolkit/components/passwordmgr to import ES modules directly. r=Standard8,credential-management-reviewers,settings-reviewers,fxview-reviewers,sclements,sgalich,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D174446
2023-04-11 19:06:24 +00:00
CanadaHonk 2d520652e0 Bug 1794628 - Implement inverted-colors media feature r=geckoview-reviewers,morgan,emilio,m_kato,cmartin
Implemented the inverted-colors media feature from Media Queries Level 5
for all platforms.
Spec: https://drafts.csswg.org/mediaqueries-5/#inverted

Platform specific implementations:
- Windows: Checks system color filter setting, and if it is inverted
  (note: Windows does not live update due to having to read a reg key)
- Mac: Checks dedicated inverted accessibility system setting
- Android: Checks dedicated inverted system setting
- Linux: No GTK API exposes anything like it so always none

Locked behind new pref `layout.css.inverted-colors.enabled`,
always off by default for now.

Also added new WPT tests (none previously).

Other browsers:
- WebKit: shipped since Safari 9.1 (Jan 2017)
- Blink: no signal

Test page: https://goose.icu/inverted-colors

Differential Revision: https://phabricator.services.mozilla.com/D173201
2023-04-11 13:34:00 +00:00
William Durand cfb6408c17 Bug 1826739 - Implement more AddonManager events. r=rpl,geckoview-reviewers,zmckenney
Differential Revision: https://phabricator.services.mozilla.com/D174874
2023-04-11 12:27:40 +00:00
Makoto Kato dbdf270e6a Bug 1826265 - Convert lazy load JSM by GeckoViewStartup module to ESM. r=geckoview-reviewers,extension-reviewers,amejiamarmol
Also, GeckoViewStorageController might not use correct principal since
bug 1801338 doesn't consider GeckoView.

So this fix loads correct ESM and use lazy loading.

Differential Revision: https://phabricator.services.mozilla.com/D174557
2023-04-11 08:55:43 +00:00
Tooru Fujisawa 611bc49dcf Bug 1821308 - Part 2: Convert ctypes.jsm consumers to use ESM. r=Standard8,geckoview-reviewers,application-update-reviewers,credential-management-reviewers,sgalich,bytesized,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D173811
2023-04-11 01:25:15 +00:00
Mark Banner 5fb4f28a11 Bug 1425048 - Enable ESLint rules no-unused-vars/no-undef for mobile/android/components/extensions/. r=geckoview-reviewers,extension-reviewers,robwu,owlish
Differential Revision: https://phabricator.services.mozilla.com/D174749
2023-04-10 18:11:03 +00:00
Olivia Hall 5028881191 Bug 1809922 - Enable window.print for Release in GeckoView r=geckoview-reviewers,webidl,smaug,saschanaz,m_kato
This bug changes the preference for window.print (dom.enable_window_print)
in GeckoView and Android to on by default. It also adjusts WPT expectations.

Differential Revision: https://phabricator.services.mozilla.com/D174535
2023-04-05 21:30:19 +00:00
William Durand 2185297fa9 Bug 1822763 - Listen to AddonManager "onUninstalled" event. r=zmckenney,rpl,geckoview-reviewers,calu,amejiamarmol
For completeness, I added this event too.

Depends on D174466

Differential Revision: https://phabricator.services.mozilla.com/D174469
2023-04-05 14:55:03 +00:00
William Durand 00f8eb6c65 Bug 1822763 - Listen to AddonManager "onEnabled" event. r=zmckenney,rpl,geckoview-reviewers,amejiamarmol
Depends on D173835

Differential Revision: https://phabricator.services.mozilla.com/D174466
2023-04-05 14:55:03 +00:00
William Durand f862225c59 Bug 1822763 - Listen to AddonManager "onDisabled" event. r=geckoview-reviewers,zmckenney,rpl,amejiamarmol
This is the first step to listen to other AddonManager events. We likely
need a new delegate because there is no other existing delegate we can
leverage I think.

In Fenix, we could use this new delegate like this:

```diff
diff --git a/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt b/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
index 5d34a952e8..8031bd1f67 100644
--- a/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
+++ b/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
@@ -357,8 +357,15 @@ class GeckoEngine(
             }
         }

-        runtime.webExtensionController.promptDelegate = promptDelegate
+        val addonManagerDelegate = object : WebExtensionController.AddonManagerDelegate {
+            override fun onDisabled(extension: org.mozilla.geckoview.WebExtension) {
+                webExtensionDelegate.onDisabled(GeckoWebExtension(extension, runtime))
+            }
+        }
+
+        runtime.webExtensionController.setPromptDelegate(promptDelegate)
         runtime.webExtensionController.setDebuggerDelegate(debuggerDelegate)
+        runtime.webExtensionController.setAddonManagerDelegate(addonManagerDelegate)
     }

     /**
@@ -422,7 +429,6 @@ class GeckoEngine(
         runtime.webExtensionController.disable((extension as GeckoWebExtension).nativeExtension, source.id).then(
             {
                 val disabledExtension = GeckoWebExtension(it!!, runtime)
-                webExtensionDelegate?.onDisabled(disabledExtension)
                 onSuccess(disabledExtension)
                 GeckoResult<Void>()
             },
```

Differential Revision: https://phabricator.services.mozilla.com/D173835
2023-04-05 14:55:02 +00:00
Ankit Anand 10efe6698a Bug 1510662 - Suppress Lint Warning: Using Private APIs. r=m_kato,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D174551
2023-04-05 09:55:34 +00:00
Robert Longson f29442930b Bug 1773092 - Remove browser.ssl_override_behavior r=geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D174470
2023-04-05 07:40:36 +00:00
Cristina Horotan bc4704efa9 Backed out 3 changesets (bug 1822763) for causing xpcshell failures at test_ext_manifest.js
Backed out changeset 9c4e16dbfdff (bug 1822763)
Backed out changeset 0c59791435ce (bug 1822763)
Backed out changeset 87701a14d81d (bug 1822763)
2023-04-04 18:00:58 +03:00
William Durand ed21f91fe2 Bug 1822763 - Listen to AddonManager "onUninstalled" event. r=zmckenney,rpl,geckoview-reviewers,calu,amejiamarmol
For completeness, I added this event too.

Depends on D174466

Differential Revision: https://phabricator.services.mozilla.com/D174469
2023-04-04 13:42:37 +00:00
William Durand bb93f2ed24 Bug 1822763 - Listen to AddonManager "onEnabled" event. r=zmckenney,rpl,geckoview-reviewers,amejiamarmol
Depends on D173835

Differential Revision: https://phabricator.services.mozilla.com/D174466
2023-04-04 13:42:36 +00:00
William Durand 8b1846587e Bug 1822763 - Listen to AddonManager "onDisabled" event. r=geckoview-reviewers,zmckenney,rpl,amejiamarmol
This is the first step to listen to other AddonManager events. We likely
need a new delegate because there is no other existing delegate we can
leverage I think.

In Fenix, we could use this new delegate like this:

```diff
diff --git a/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt b/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
index 5d34a952e8..8031bd1f67 100644
--- a/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
+++ b/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
@@ -357,8 +357,15 @@ class GeckoEngine(
             }
         }

-        runtime.webExtensionController.promptDelegate = promptDelegate
+        val addonManagerDelegate = object : WebExtensionController.AddonManagerDelegate {
+            override fun onDisabled(extension: org.mozilla.geckoview.WebExtension) {
+                webExtensionDelegate.onDisabled(GeckoWebExtension(extension, runtime))
+            }
+        }
+
+        runtime.webExtensionController.setPromptDelegate(promptDelegate)
         runtime.webExtensionController.setDebuggerDelegate(debuggerDelegate)
+        runtime.webExtensionController.setAddonManagerDelegate(addonManagerDelegate)
     }

     /**
@@ -422,7 +429,6 @@ class GeckoEngine(
         runtime.webExtensionController.disable((extension as GeckoWebExtension).nativeExtension, source.id).then(
             {
                 val disabledExtension = GeckoWebExtension(it!!, runtime)
-                webExtensionDelegate?.onDisabled(disabledExtension)
                 onSuccess(disabledExtension)
                 GeckoResult<Void>()
             },
```

Differential Revision: https://phabricator.services.mozilla.com/D173835
2023-04-04 13:42:36 +00:00
Cosmin Sabou df35858e9c Backed out 3 changesets (bug 1822763) for xpcshell failures on test_ext_indexedDB_principal.js. CLOSED TREE
Backed out changeset 2fa13aa9553d (bug 1822763)
Backed out changeset 152d4079f316 (bug 1822763)
Backed out changeset e69ce1b32ff2 (bug 1822763)
2023-04-04 13:14:47 +03:00
William Durand fe01ea6a84 Bug 1822763 - Listen to AddonManager "onUninstalled" event. r=zmckenney,rpl,geckoview-reviewers,calu,amejiamarmol
For completeness, I added this event too.

Depends on D174466

Differential Revision: https://phabricator.services.mozilla.com/D174469
2023-04-04 09:24:24 +00:00
William Durand d7c5d6acb8 Bug 1822763 - Listen to AddonManager "onEnabled" event. r=zmckenney,rpl,geckoview-reviewers
Depends on D173835

Differential Revision: https://phabricator.services.mozilla.com/D174466
2023-04-04 09:24:24 +00:00
William Durand 4efa862fc4 Bug 1822763 - Listen to AddonManager "onDisabled" event. r=geckoview-reviewers,zmckenney,rpl,amejiamarmol
This is the first step to listen to other AddonManager events. We likely
need a new delegate because there is no other existing delegate we can
leverage I think.

In Fenix, we could use this new delegate like this:

```diff
diff --git a/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt b/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
index 5d34a952e8..8031bd1f67 100644
--- a/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
+++ b/android-components/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/GeckoEngine.kt
@@ -357,8 +357,15 @@ class GeckoEngine(
             }
         }

-        runtime.webExtensionController.promptDelegate = promptDelegate
+        val addonManagerDelegate = object : WebExtensionController.AddonManagerDelegate {
+            override fun onDisabled(extension: org.mozilla.geckoview.WebExtension) {
+                webExtensionDelegate.onDisabled(GeckoWebExtension(extension, runtime))
+            }
+        }
+
+        runtime.webExtensionController.setPromptDelegate(promptDelegate)
         runtime.webExtensionController.setDebuggerDelegate(debuggerDelegate)
+        runtime.webExtensionController.setAddonManagerDelegate(addonManagerDelegate)
     }

     /**
@@ -422,7 +429,6 @@ class GeckoEngine(
         runtime.webExtensionController.disable((extension as GeckoWebExtension).nativeExtension, source.id).then(
             {
                 val disabledExtension = GeckoWebExtension(it!!, runtime)
-                webExtensionDelegate?.onDisabled(disabledExtension)
                 onSuccess(disabledExtension)
                 GeckoResult<Void>()
             },
```

Differential Revision: https://phabricator.services.mozilla.com/D173835
2023-04-04 09:24:23 +00:00
Makoto Kato 01a6aeea6a Bug 1825695 - Remove JPZ preferences. r=geckoview-reviewers,calu,amejiamarmol
JPZ (JavaPanZoomController) was gone, but mobile.js still has a lot
of preferences for it. Let's remove it.

Differential Revision: https://phabricator.services.mozilla.com/D174205
2023-04-04 00:31:47 +00:00
Noemi Erli 118513ad00 Backed out 2 changesets (bug 1824473) for causing failures in test_clear_form.html CLOSED TREE
Backed out changeset b38aeb74da71 (bug 1824473)
Backed out changeset b73ead08bb19 (bug 1824473)
2023-03-31 21:51:12 +03:00
Stephanie Cunnane 3bb55d1cbe Bug 1824473 - Update consumers of toolkit/components/formautofill to import ES modules directly. r=Standard8,geckoview-reviewers,credential-management-reviewers,sgalich,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D173587
2023-03-31 16:45:03 +00:00
Olivia Hall ff14122df4 Bug 1816151 - GeckoView Window.Print() Telemetry r=geckoview-reviewers,owlish
This bug adds basic telemetry if window.print() is used or not in
Android through GeckoView.

Differential Revision: https://phabricator.services.mozilla.com/D173875
2023-03-31 14:38:53 +00:00
Csoregi Natalia 64c0437f97 Backed out 2 changesets (bug 1824473) for causing mochitest failures on test_address_level_1_submission.html. CLOSED TREE
Backed out changeset 8dd52b2dae6b (bug 1824473)
Backed out changeset 5fbc5b6422c7 (bug 1824473)
2023-03-30 21:14:51 +03:00
Stephanie Cunnane 660bd43791 Bug 1824473 - Update consumers of toolkit/components/formautofill to import ES modules directly. r=Standard8,geckoview-reviewers,credential-management-reviewers,sgalich,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D173587
2023-03-30 17:29:18 +00:00
Makoto Kato f5090d66a1 Bug 1819814 - Call MediaSession.Delegate.onFullscreen correctly when entering full screen. r=geckoview-reviewers,calu
This is a race condition of full screen event and activated event of media
controller.

Media controller will dispatch activated event when full screen button is
clicked on controller. But since this depends on full screen event, if
GeckoView's media session receives this event before controller fires activated
event, `MediaSession.Delegate.onFullscreen` won't be called because
MediaSession.isActive() is false at this time.

So I would like to retry `GeckoView:MediaSession:Fullscreen` call when
entering full screen and controller isn't active yet.

Differential Revision: https://phabricator.services.mozilla.com/D173831
2023-03-30 14:26:13 +00:00
Makoto Kato 6543182f23 Bug 1819088 - Update Fenix links after moving to monorepo. r=geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D173380
2023-03-30 01:14:56 +00:00
Cathy Lu 6715c36d52 Bug 1815310 - Support persistent events for mobile tabs API r=extension-reviewers,robwu,amejiamarmol,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D172746
2023-03-28 21:25:05 +00:00
Calixte fefd92b8e9 Bug 1824610 - EMSification of pdf.js r=Standard8,pdfjs-reviewers,geckoview-reviewers,marco,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D173674
2023-03-28 09:18:58 +00:00
Sandor Molnar fa2ae22888 Backed out 2 changesets (bug 1824473) for causing failures in browser/extensions/formautofill/test/<...>.js
Backed out changeset 01046e78078c (bug 1824473)
Backed out changeset 4203fbb8f229 (bug 1824473)
2023-03-27 22:44:33 +03:00
Stephanie Cunnane d31dfc03b2 Bug 1824473 - Update consumers of toolkit/components/formautofill to import ES modules directly. r=Standard8,geckoview-reviewers,credential-management-reviewers,sgalich,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D173587
2023-03-27 18:12:17 +00:00