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

31738 Коммитов

Автор SHA1 Сообщение Дата
Oliver Dunk 5bf4e95eac Bug 1755763 - Update browserAction.openPopup API r=geckoview-reviewers,robwu,owlish
To align with other browsers, the user gesture requirement has
been removed and there is now an optional first argument which
can be used to provide a windowId.

Differential Revision: https://phabricator.services.mozilla.com/D139796
2022-10-25 11:49:42 +00:00
Arturo Mejia c57bd72f23 Bug 1790724 - Add API to expose Cookie Banner Handling Mode setting r=geckoview-reviewers,jonalmeida,ohall
Differential Revision: https://phabricator.services.mozilla.com/D159774
2022-10-24 18:12:06 +00:00
Csoregi Natalia b9f1f061b4 Bug 1754570 - Remove test capturePixelsAfterGpuProcessCrash. r=intermittent-reviewers,geckoview-reviewers,MasterWayZ,owlish,jnicol
Differential Revision: https://phabricator.services.mozilla.com/D159274
2022-10-20 18:26:48 +00:00
Makoto Kato 9a1a597177 Bug 1795639 - Convert GeckoViewUtils to ESM. r=geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D159490
2022-10-20 11:37:01 +00:00
Morgan Rae Reschenberg 98bda97716 Bug 1787274: Use mCachedFields viewport cache for determining offscreen state r=Jamie,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D155903
2022-10-18 22:30:10 +00:00
Cosmin Sabou 02bc919daa Backed out 3 changesets (bug 1787274, bug 1792964, bug 1774708) for causing mochitest failures on browser_test_visibility.js. CLOSED TREE
Backed out changeset f9ec55a441c4 (bug 1774708)
Backed out changeset f942a92c1666 (bug 1792964)
Backed out changeset d60a24f2c8b8 (bug 1787274)
2022-10-18 22:54:12 +03:00
Morgan Rae Reschenberg 32271e47f7 Bug 1787274: Use mCachedFields viewport cache for determining offscreen state r=Jamie,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D155903
2022-10-18 19:07:44 +00:00
Mark Banner 2ffde1e92f Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D158452
2022-10-18 11:21:26 +00:00
Makoto Kato 1dce2205ee Bug 1795183 - Replace OS.path.join with PathUtils.join in ChildCrashHandler.jsm. r=geckoview-reviewers,owlish
`osfile` is deprecated and `./mach lint -l eslint` shows warning message for
it.  So I would like to replace it with `PathUtils`.

Differential Revision: https://phabricator.services.mozilla.com/D159343
2022-10-18 00:18:56 +00:00
Eitan Isaacson 3243bf997e Bug 1789474 - Allow detached documents to be overwritten in accessible mapping. r=Jamie,geckoview-reviewers,owlish
Also assure that unregistering an accessible removes the right one and
doesn't confuse the attached document with the detached one.

Add stderr output to Accessible::DebugPrint in Android as well.

Differential Revision: https://phabricator.services.mozilla.com/D157528
2022-10-17 23:10:19 +00:00
Paul Adenot 9a01f6f628 Bug 1770940 - Ignore an exception when calling AudioManager.startBluetoothSco. r=geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D158661
2022-10-17 12:00:27 +00:00
Alexandre Poirot a6539ba47e Bug 1793604 - [devtools] Convert Loader.jsm to ESM. r=perftest-reviewers,geckoview-reviewers,preferences-reviewers,owlish,kshampur,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D158582
2022-10-14 12:19:42 +00:00
Eemeli Aro 1564027eba Bug 1786186 - Migrate mobile about:config to Fluent. r=geckoview-reviewers,fluent-reviewers,flod,owlish. CLOSED TREE
This migration creates the first FTL file under mobile/android/.
As GeckoView isn't actually localised (see bug 1605358), this file
is not exposed to localisers.

A migration script is still included, as previous localisations of
the about:config view's strings are available from its Fennec days.
Running the script will fail in an m-c checkout bootstrapped for
desktop development; it's possible to hack around this by manually
setting the `l10n_toml` value in `python/l10n/test_fluent_migrations/fmt.py`.

Differential Revision: https://phabricator.services.mozilla.com/D155450
2022-09-20 11:53:37 +00:00
Narcis Beleuzu e16ed10e23 Backed out changeset a7e5bcf262cd (bug 1786186) - wrong backout 2022-10-14 09:49:25 +03:00
Eemeli Aro 1d7d01e03d Bug 1786186 - Backed out changeset 24e777435dea for geckoview-junit failures. CLOSED TREE
This migration creates the first FTL file under mobile/android/.
As GeckoView isn't actually localised (see bug 1605358), this file
is not exposed to localisers.

A migration script is still included, as previous localisations of
the about:config view's strings are available from its Fennec days.
Running the script will fail in an m-c checkout bootstrapped for
desktop development; it's possible to hack around this by manually
setting the `l10n_toml` value in `python/l10n/test_fluent_migrations/fmt.py`.

Differential Revision: https://phabricator.services.mozilla.com/D155450
2022-10-14 09:41:21 +03:00
Sandor Molnar 6a467e1baf Backed out changeset 431649004dd4 (bug 1789474) for causing android gv-junit-fis-o crashes CLOSED TREE 2022-10-14 07:59:55 +03:00
Cosmin Sabou 87e1282cfb Backed out changeset cb56ec6454d6 (bug 1786186) for causing Bug 1792258. 2022-10-14 05:53:47 +03:00
Eitan Isaacson 1778c775fe Bug 1789474 - Allow detached documents to be overwritten in accessible mapping. r=Jamie,geckoview-reviewers,owlish
Also assure that unregistering an accessible removes the right one and
doesn't confuse the attached document with the detached one.

Add stderr output to Accessible::DebugPrint in Android as well.

Differential Revision: https://phabricator.services.mozilla.com/D157528
2022-10-13 22:03:03 +00:00
Joel Maher 39c161dd67 Bug 1794927 - Use clear text traffic flag for android test_runner app. r=nalexander,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D159235
2022-10-13 20:21:09 +00:00
Daniel Baker 78fe69ccca Bug 1789846 - Using Stride and Height values from MediaCodec instead of assuming stride and height values. r=jolin,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D159130
2022-10-13 20:15:04 +00:00
Eemeli Aro 50d8456970 Bug 1760033 - Remove aboutReader.properties and its remaining strings as unused. r=Gijs,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D158577
2022-10-13 16:28:32 +00:00
Norisz Fay 474baf5b68 Backed out 3 changesets (bug 1760033) for causing multiple failures ErrorResult.h
Backed out changeset e54df449fbad (bug 1760033)
Backed out changeset f26056c61dc2 (bug 1760033)
Backed out changeset 7f69b83013e1 (bug 1760033)
2022-10-12 17:28:18 +03:00
Eemeli Aro df3e20d851 Bug 1760033 - Remove aboutReader.properties and its remaining strings as unused. r=Gijs,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D158577
2022-10-12 13:55:28 +00:00
Eemeli Aro a346dc468c Bug 1792461 - Drop previously removed localization files from mobile/android/locales/l10n.toml. r=geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D158144
2022-10-12 10:23:04 +00:00
Eemeli Aro f0a0871780 Bug 1675814 - Remove global.dtd as unused. r=flod,geckoview-reviewers,owlish
Now that it's no longer used, the global.dtd file and its single remaining string `locale.dir` may be removed.

A test specifically targeting this is also removed as obsolete.

Differential Revision: https://phabricator.services.mozilla.com/D157797
2022-10-07 18:40:28 +00:00
Eemeli Aro 1662ea09fa Bug 1789406 - Remove brand.dtd files as unused. r=flod,geckoview-reviewers,owlish
After the preceding changes, brand.dtd has no more actual users and may be removed.

One mochitest is switched to use a different DTD file which will still remain in the tree.

The dependency in aboutSupport.xhtml appears to have been accidentally left in when its localization was migrated to Fluent.

Differential Revision: https://phabricator.services.mozilla.com/D156668
2022-10-07 18:40:28 +00:00
Makoto Kato a66ffe1baa Bug 1714496 - Part 2. geckoview-junit test for image keyboard support. r=geckoview-reviewers,owlish
Although this test doesn't run on our CI since CI uses Android 7.0, I would
like to add this for the future.

Image keyboard support requires content:// uri for image, so we need content
provider for testing this feature.

Differential Revision: https://phabricator.services.mozilla.com/D157714
2022-10-07 09:03:31 +00:00
Makoto Kato 8821cd8445 Bug 1714496 - Part 1. Implement Image keyboard support. r=geckoview-reviewers,calu
GBoard has image keyboard support, and spec issue is resolved [*1]. So this
adds image keyboard support via GBoard and Android 7.1+.

*1 https://github.com/w3c/input-events/issues/117

Differential Revision: https://phabricator.services.mozilla.com/D157713
2022-10-07 09:03:31 +00:00
Andreea Pavel 86cc5257f0 Bug 1754570 - temporarily disable capturePixelsAfterGpuProcessCrash on opt r=intermittent-reviewers,geckoview-reviewers,m_kato,MasterWayZ
Differential Revision: https://phabricator.services.mozilla.com/D158340
2022-10-03 12:11:51 +00:00
Ryan VanderMeulen a5656862a6 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/D157864
2022-09-29 21:05:51 +00:00
Mark Banner 8d1ebcb9d6 Bug 1792365 - Convert toolkit/modules consumers to use ES module imports directly. r=webdriver-reviewers,perftest-reviewers,geckoview-reviewers,extension-reviewers,preferences-reviewers,desktop-theme-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,robwu,Gijs,sgalich,bytesized,AlexandruIonescu,dao,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D158094
2022-09-29 06:52:34 +00:00
Jamie Nicol 49c0f0ed43 Bug 1780093 - Use custom SurfaceView which allows magnifier widget to work. r=geckoview-reviewers,owlish
The android magnifier widget does not work when using our
SurfaceControl rendering path, as we no longer render in to the
Surface provided by the SurfaceView, but instead into a child Surface
we have created and attached the SurfaceControl.

To fix this, we create a SurfaceView subclass, MagnifiableSurfaceView,
which allows us to set an override Surface to be used by the
magnifier. This class works by overriding getHolder() to return a
custom SurfaceHolder, which returns our override Surface rather than
the default one when called by the Magnifier class.

Depends on D157308

Differential Revision: https://phabricator.services.mozilla.com/D157309
2022-09-21 17:30:26 +00:00
Jamie Nicol 5e60f35505 Bug 1780093 - Remove code for enabling/disabling SurfaceControl rendering path. r=geckoview-reviewers,owlish
In order to fix the magnifier widget being broken, the previous patch
in this bug added a mechanism to disable and enable the SurfaceControl
rendering path. This caused some glitches to occur, so we removed the
calls to that code in bug 1783542, but the code remained.

As we now have an alternative solution to fix the magnifier widget, we
no longer require this code. This patch therefore reverts the original
patch, to lead the way for the new solution in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D157308
2022-09-21 17:30:25 +00:00
owlishDeveloper 5f3ce8227f Bug 1791046 - Remove deprecated cookie lifetime policy API and deprecated set permission API r=geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D157523
2022-09-20 19:32:51 +00:00
Andreea Pavel daea5b0dd9 Backed out changeset 2c2bc5fd317f (bug 1791046) for lint failure on a CLOSED TREE 2022-09-20 19:39:47 +03:00
owlishDeveloper 7264f7ca97 Bug 1791046 - Remove deprecated cookie lifetime policy API r=geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D157523
2022-09-20 16:15:14 +00:00
Eemeli Aro 90bc1261e7 Bug 1786186 - Migrate mobile about:config to Fluent. r=geckoview-reviewers,fluent-reviewers,flod,owlish
This migration creates the first FTL file under mobile/android/.
As GeckoView isn't actually localised (see bug 1605358), this file
is not exposed to localisers.

A migration script is still included, as previous localisations of
the about:config view's strings are available from its Fennec days.
Running the script will fail in an m-c checkout bootstrapped for
desktop development; it's possible to hack around this by manually
setting the `l10n_toml` value in `python/l10n/test_fluent_migrations/fmt.py`.

Differential Revision: https://phabricator.services.mozilla.com/D155450
2022-09-20 11:53:37 +00:00
Dana Keeler 923d7b2029 Bug 1790451 - make nsIChannel.securityInfo concrete as nsITransportSecurityInfo r=kershaw,necko-reviewers,valentin,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D157136
2022-09-20 03:58:49 +00:00
samihda 462e29480e Bug 1510975 - Match package name with file path. r=m_kato,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D157335
2022-09-19 10:53:37 +00:00
Ryan VanderMeulen defeab2235 Backed out changeset 6376af715fb9 (bug 1787274) for Fenix UI test failures. 2022-09-15 13:10:33 -04:00
Morgan Rae Reschenberg 5afbf8d60d Bug 1787274: Use mCachedFields viewport cache for determining offscreen state r=Jamie,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D155903
2022-09-14 22:02:06 +00:00
Butkovits Atila 4fc48f6705 Backed out changeset 7d2bb2e5fb73 (bug 1787274) for causing geckoview failures. 2022-09-14 22:09:11 +03:00
Morgan Rae Reschenberg f7de79f06d Bug 1787274: Use mCachedFields viewport cache for determining offscreen state r=Jamie,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D155903
2022-09-14 17:47:43 +00:00
Makoto Kato e73b7956db Bug 1776829 - Implement "Paste" permission action for clipboard.readText. r=geckoview-reviewers,owlish
When calling `clipboard.readText` on content script, Gecko dispatches
`MozClipboardReadPaste` event.  On Desktop Firefox uses XUL pop up window
to handle it, then it shows "Paste" button whether user can allow to read
clipboard data.

But GeckoView doesn't have XUL pop up. To implement this feature, we show
"Paste" pop up using action mode as default. Also, browser side can override
delegated methods if it wants another permission pop up or to support Android L
(Android L doesn't have action mode).

Differential Revision: https://phabricator.services.mozilla.com/D151102
2022-09-12 07:36:52 +00:00
Makoto Kato 6f6a4de1ef Bug 1786452 - Finish overscroll animation when finishing pan. r=geckoview-reviewers,owlish,m_kato
(Co-authored with m_kato)

GeckoView's overscroll is implemented by OS side using
`WidgetOverscrollEffect`.

When not releasing finger during overscroll, stretched animation is kept on
Android 12+ since `EdgeEffect.onRelease` isn't called. Then, when releasing
finger, this animation isn't finished on GeckoView with Android 12+.

When this situation, APZ doesn't call
`WidgetOverscrollEffect::HandleFlingOverscroll` by releasing finger due to too
small velocity value in `AsyncPanZoomController::HandleEndOfPan`. So there is
no way to detect whether releasing finger on GeckoView side.

I think We should notify GeckoView of releasing finger to finish animation.

This won't occurs on `GenericOverscollEffect` on macOS since overscoll
animation is managed by APZ and this animation will be finished by
`UpdateAnimation`.

Differential Revision: https://phabricator.services.mozilla.com/D156611
2022-09-12 07:25:05 +00:00
Makoto Kato 708604622a Bug 1786862 - Add try-catch block for SecurityException by autofill manager. r=geckoview-reviewers,calu
Original issue was bug 1701283, but that fix was removed by bug 1755094
unfortunately.

Some devices (autofill service?) seem to throw a `SecurityException` when
calling autofill manager. So we need try-catch block for it.

Differential Revision: https://phabricator.services.mozilla.com/D156501
2022-09-12 03:20:51 +00:00
Eemeli Aro a293e05849 Bug 1734217 - Drop netError.dtd and appstrings.properties from mobile as unused. r=geckoview-reviewers,nalexander,calu
These files were made available as:
- `chrome://browser/locale/netError.dtd`
- `chrome://browser/locale/appstrings.properties`

For desktop, overrides are defined in `browser/base/jar.mn` that map the corresponding `global/` paths to the above:
```
 % override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties
 % override chrome://global/locale/netError.dtd chrome://browser/locale/netError.dtd
```

For mobile, similar overrides were earlier defined in `mobile/android/chrome/jar.mn`, but that file was removed in bug 1589182 three years ago.

Consequently, the `global/` paths for these files that are used under `docshell/` and `dom/` have resolved to the non-overridden `dom/` files since Firefox 72.

It should therefore be safe to remove them.

Differential Revision: https://phabricator.services.mozilla.com/D156403
2022-09-09 06:47:45 +00:00
Ryan VanderMeulen 998208305e Bug 1786164 - Add more Gradle JVM memory flags. r=geckoview-reviewers,jonalmeida
See https://github.com/mozilla-mobile/fenix/pull/26542 for more discussion.
Also specify a lower maximum heap size more in line with other projects and
remove some redundant settings in other gradle.properties files.

Differential Revision: https://phabricator.services.mozilla.com/D155179
2022-08-31 22:10:39 +00:00
Ryan VanderMeulen 450ee76669 Bug 1786174 - Fix some other WebExtension warnings from the linting logs. r=geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D155153
2022-08-31 22:10:39 +00:00
Ryan VanderMeulen 3744dc5f92 Bug 1786174 - Update Android linter to v30.2.2 and fix newly-flagged errors. r=geckoview-reviewers,jonalmeida
Differential Revision: https://phabricator.services.mozilla.com/D155152
2022-08-31 22:10:39 +00:00
Ryan VanderMeulen 893cf3efd4 Bug 1786164 - Update gradle and plugin to the latest versions. r=geckoview-reviewers,jonalmeida
Differential Revision: https://phabricator.services.mozilla.com/D155151
2022-08-31 22:10:38 +00:00
Ryan VanderMeulen b3938e97ab Bug 1785838 - Bump Kotlin to version 1.6.21 and a update a few other gradle dependencies. r=geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D154988
2022-08-31 22:10:37 +00:00
Olivia Hall fd773b706c Bug 1765835 - Adjustments to Location Provider r=geckoview-reviewers,owlish,m_kato,smaug
In Geolocation.cpp, the call to start the geolocation device always
had HighAccuracyRequested() set to false because no callbacks were
listening. Changed to set the callbacks first, before listening.

In Android, this patch stops the use of checking for last known location
on high accuracy location requests, adjusts comparing locations,
and also streamlines the criteria for picking the best location provider.

Differential Revision: https://phabricator.services.mozilla.com/D153226
2022-08-31 18:50:16 +00:00
Makoto Kato 3577ed2643 Bug 1786449 - Revert overscroll support part of bug 1724480. r=geckoview-reviewers,calu
To support overscroll drawing on old Andorid (9 or early), we use the
reflection to access `Paint` object. But this is removed by bug 1724480. So I
would like to revert overscroll part for Android 9 or early.

I tested on old Galaxy S7 (Android 9).

Differential Revision: https://phabricator.services.mozilla.com/D155716
2022-08-31 14:31:14 +00:00
Dana Keeler b4c45d4248 Bug 1781104 - remove unnecessary bits parameter from nsICertOverrideService r=djackson,necko-reviewers,geckoview-reviewers,extension-reviewers,kershaw,calu
Differential Revision: https://phabricator.services.mozilla.com/D152826
2022-08-26 18:48:38 +00:00
Makoto Kato 236776ef99 Bug 1786119 - Set current size to EdgeEffect when reinitializing OverscrollEdgeEffect. r=geckoview-reviewers,owlish
When switching to previous tab, overscroll animation doesn't work since new
`EdgeEffect` doesn't have size. So we should set it from previous information.
If new size is available, `GeckoSession.onWindowBoundsChanged` will set new
size.

Also, this fix includes that `OverscrollEdgeEffect` doesn't use current
`GeckoSession` to draw edge effect. When switching to new `GeckoSession`,
we should set it to `OverscrollEdgeEffect`. `OverscrollEdgeEffect` is public
API, so I don't modify it for this.

Differential Revision: https://phabricator.services.mozilla.com/D155144
2022-08-26 16:11:19 +00:00
Mark Banner baa8dfdef9 Bug 1786197 - Turn on ESLint rule for prefer-boolean-length-check for mobile/android. r=geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D155171
2022-08-26 13:39:36 +00:00
Botond Ballo 8466c5994a Bug 1786974 - Avoid PanZoomControllerTest#scrollToVerticalOnZoomedContent{Smooth,Auto} failure due to rounding. r=hiro,geckoview-reviewers,owlish
window.innerHeight is rounded to integer because of dom.innerSize.rounded=true,
so the quantity being compared to it needs to be rounded as well.

Differential Revision: https://phabricator.services.mozilla.com/D155519
2022-08-25 01:25:25 +00:00
Luca Greco 9efa813720 Bug 1760608 - Restrict MV2 pageAction/browserAction setPopup to same extension urls on GeckoView. r=mixedpuppy,geckoview-reviewers,owlish
This patch extends restricts setPopup to extension url to MV2 extensions running on GeckoView.

Differential Revision: https://phabricator.services.mozilla.com/D154549
2022-08-23 10:35:58 +00:00
Luca Greco 28400cd40e Bug 1760608 - Fix and reenable GeckoView ExtensionActionTest.testOpenPopup. r=geckoview-reviewers,ohall
This patch fixes a pre-existing "setPopup + openPopup" GeckoView test case that was apparently disable
because it was failing intermittently.

While trying to run it locally I noticed that the test was getting stuck because there is no
tab delegate that would be allowing the test extension to update the current tab from
http://example.com to the extension page that was meant to be triggering the openPopup API call.

Loading the extension page using mainSession.loadUrl seems to be making the test able to fully
run and pass.

It is possible that the test case was originally working but got broken while it started to be ignored,
the test was missing to await for the setPopup call to be fully handled and that may have been likele
a source of intermittent failures over a larger number of runs.

Differential Revision: https://phabricator.services.mozilla.com/D154548
2022-08-23 10:35:58 +00:00
Emilio Cobos Álvarez c20ec755c9 Bug 1782751 - Make desktop viewport mode a synced BrowsingContext field. r=twisniewski
So that it's preserved properly across replacements (bug 1781936).

Differential Revision: https://phabricator.services.mozilla.com/D155274
2022-08-22 22:12:07 +00:00
Olivia Hall 4a2c220e7c Bug 1780557 - High Rate Sensor Android Permission r=geckoview-reviewers,calu
Beginning in Android 12, apps needing to use high sensor rates need to
have the HIGH_SAMPLING_RATE_SENSORS permission requested.

Differential Revision: https://phabricator.services.mozilla.com/D155238
2022-08-22 17:57:39 +00:00
Jamie Nicol 88814ceb27 Bug 1783542 - Temporarily stop toggling SurfaceControl usage. r=geckoview-reviewers,calu
In bug 1780093 we discovered that our usage of the SurfaceControl
compositing path was preventing the text selection magnifier from
working. We attempted to toggle the SurfaceControl compositing path
off when the magnifier was active, however this has caused much more
severe issues with rendering content at the wrong size after the
keyboard has been dismissed.

For now, stop toggling SurfaceControl usage until we have found out
how to do so without rendering at the wrong size. This will mean the
magnifier will once again not work.

Differential Revision: https://phabricator.services.mozilla.com/D155202
2022-08-22 17:44:41 +00:00
Olivia Hall 8454981589 Bug 1771012 - GeckoView Open Tabs Test Utility r=geckoview-reviewers,owlish
Adds event "GeckoView:Test:NewTab”, which allow testers to create tabs.

`GeckoViewTestUtils.jsm` sends the event from the JavaScript side for
use in testing.

A `ServiceWorkerDelegate` is required to be set for the
`GeckoRuntime` to use these events, which was setup on the test
runner.

Differential Revision: https://phabricator.services.mozilla.com/D152891
2022-08-22 14:44:38 +00:00
Sylvestre Ledru 128c74caac Bug 1785451 - Ride along: Fix some typos r=linter-reviewers,fluent-reviewers,geckoview-reviewers,extension-reviewers,keeler,rpl,calu,ahal,flod DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D154946
2022-08-18 07:29:08 +00:00
Botond Ballo cd56c8b9ae Bug 1746336 - Add a new geckoview-junit test. r=hiro,geckoview-reviewers,calu
Depends on D152351

Differential Revision: https://phabricator.services.mozilla.com/D152352
2022-08-18 02:15:39 +00:00
Botond Ballo 65a722e6e1 Bug 1746336 - Treat nsEventStatus_eIgnore as INPUT_RESULT_UNHANDLED consistently. r=hiro,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D152351
2022-08-18 02:07:14 +00:00
Ryan VanderMeulen b99ba1c11c Bug 1785302 - Fix GeckoView gradle warnings. r=geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D154927
2022-08-17 22:04:29 +00:00
Agi Sferro cd000ebc03 Bug 1648158 - Store SHIP (Session History in Parent Process) support on Android. r=geckoview-reviewers,owlish
Instead of using SessionStateAggregator.js send() to collect history data and send the event StateUpdated to the app, the new GeckoViewSessionStore is used. It is enabled when fission is true and initialized by GeckoViewStartup when Services.appinfo.sessionHistoryInParent is true. It will observe two existing topics: browsing-context-did-set-embedder, which creates the history listener, and browsing-context-discarded, which unregisters it. When the history listener is created, it will collect history from the parent. It will only collect data when the current uri is not “about:blank” and when the history count is greater than 0. It uses SessionHistory’s collectFromParent.

The new code path was manually confirmed by debugging the app history delegate to see that the state map contains all the history data.

Differential Revision: https://phabricator.services.mozilla.com/D150020
2022-08-17 17:03:27 +00:00
Makoto Kato a2a31e8702 Bug 1783804 - Use std::move for InputData since copy constructor of InputData doesn't copy all member variable. r=geckoview-reviewers,calu
When turning on fission, OOP child frame doesn't receive touch events such as
`touchstart`.

When dispatching touch event from GeckoView side, some informations such as
`mLayersId` are missing since copy constructor of `MultiTouchInput` doesn't
copy all information.

Since the structure of Input data has a lot of members, we should use
`std::move` instead of copy constructor of `InputData`. It can avoid
unnecessary copy.

Differential Revision: https://phabricator.services.mozilla.com/D154242
2022-08-15 08:47:35 +00:00
Sylvestre Ledru 8a829cb5fa Bug 1783917 - geckoview doc: Remove references to arc r=geckoview-reviewers,calu DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D154120
2022-08-10 15:54:42 +00:00
Jamie Nicol 8f3214f02a Bug 1783542 - Disable SurfaceControl only when magnifier is active. r=geckoview-reviewers,owlish
Rather than when a selection is active. Originally we chose to disable
SurfaceControl whenever a selection was active, as it is then likely
the magnifiers may be shown soon, but it reduced the amount of times
we switch between SurfaceControl being enabled and disabled when the
selection is frequently modified.

However, that has 2 issues: First, the magnifier can be shown when
dragging a single caret in a form, rather than just when a selection
is active. With the original fix, the magnifier did not work in this
case. And second, we encountered a bug when the widget is resized at
the same time as SurfaceControl is toggled, where we end up rendering
the page at the wrong size.

This patch therefore makes us only disable SurfaceControl when the
magnifier is actually being shown. This may cause us to enable or
disable it more frequently, but that doesn't appear to be a big deal.

Differential Revision: https://phabricator.services.mozilla.com/D154086
2022-08-09 18:50:41 +00:00
Kagami Sascha Rosylight 16ea24f6cc Bug 1769290 - Part 26: Emit errors from JSHandleRootedTypedefChecker r=andi,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D151842
2022-08-09 14:13:30 +00:00
Rob Wu 7e7534ced4 Bug 1780747 - Register DNR schema and permissions r=rpl,geckoview-reviewers,owlish,flod
This patch adds the minimum necessary to register the
declarativeNetRequest API and its permissions, behind prefs.

Tests have been added/updated to verify that the permissions and API
access are enforced correctly (effectiveness of preferences, API
visibility, permission warnings).

Before landing this, we need to register the permission warning in
Android-Components too, as mentioned in the bug (i.e. bug 1671453).

Differential Revision: https://phabricator.services.mozilla.com/D152503
2022-08-09 12:16:34 +00:00
Cristian Tuns a96814126e Backed out 2 changesets (bug 1780747) for causing xpcshell failures on test_ext_permission_warnings.js CLOSED TREE
Backed out changeset be950e847c33 (bug 1780747)
Backed out changeset b07c7315a02a (bug 1780747)
2022-08-08 19:04:56 -04:00
Rob Wu f8ed240ae5 Bug 1780747 - Register DNR schema and permissions r=rpl,geckoview-reviewers,owlish,flod
This patch adds the minimum necessary to register the
declarativeNetRequest API and its permissions, behind prefs.

Tests have been added/updated to verify that the permissions and API
access are enforced correctly (effectiveness of preferences, API
visibility, permission warnings).

Before landing this, we need to register the permission warning in
Android-Components too, as mentioned in the bug (i.e. bug 1671453).

Differential Revision: https://phabricator.services.mozilla.com/D152503
2022-08-08 22:11:08 +00:00
Jamie Nicol 0725e618c9 Bug 1783244 - Ensure JNI is ready before calling isSurfaceAbandoned. r=geckoview-reviewers,m_kato
In bug 1772839 we added a check for whether a Surface is in an
abandoned state prior to resuming the compositor. This check requires
calling a native function via JNI, however, this may be called before
gecko has reached the JNI_READY state. Calling this function then
results in crashes due to UnsatisfiedLinkError exceptions.

To fix this, check whether the gecko state is at least JNI_READY prior
to calling the native function. If JNI is not yet ready, we just have
to assume that the Surface is in a valid state, which may cause us to
crash if that is not actually the case. But that should be a rare
occurrence, and is certainly preferable to always crashing due to
the UnsatisfiedLinkError.

Differential Revision: https://phabricator.services.mozilla.com/D153935
2022-08-08 15:09:26 +00:00
Olivia Hall fce7810bef Bug 1782729 - GeckoViewNavigation should check for supported principals r=geckoview-reviewers,permissions-reviewers,pbz,calu
GeckoViewNavigation.jsm's `onLocationChange` should check that the principal
to get permissions for is a supported principal.

Differential Revision: https://phabricator.services.mozilla.com/D153527
2022-08-04 19:36:10 +00:00
Jamie Nicol a17ddfc210 Bug 1780093 - Disable SurfaceControl compositing path when selection is active. r=geckoview-reviewers,calu
On Android we previously added a rendering path using the
SurfaceControl API, in order to work around an Android OS bug when
recovering from a GPU process crash. Unfortunately the Magnifier
widget (shown when moving a text selection caret) does not work when
rendering using SurfaceControl.

This patch makes it so that we temporarily disable the SurfaceControl
path when a text selection is active, allowing the Magnifier to work.
Unfortunately this means that if a GPU process crash occurs while
there is an active selection we will be unable to recover. Hopefully
this turns out to be a relatively rare occurence.

Differential Revision: https://phabricator.services.mozilla.com/D153454
2022-08-02 20:55:20 +00:00
Shane Caraveo d08731448a Bug 1711168 allow extension pages to be loaded as top level tabs by other extensions r=rpl,geckoview-reviewers,calu
Ensure extensions can manage tabs and sessions that include tabs from other extensions.  The parent
patch to this introduces cross-extension access validation.  However that breaks this specific use case
that we need to continue supporting.  This patch modifies three extension apis, tab.create/update and
windows.create to allow the creation of extension tabs which cannot be otherwise accessed.

Differential Revision: https://phabricator.services.mozilla.com/D151766
2022-08-02 17:08:58 +00:00
Olivia Hall 3c00feeae1 Bug 1710943 - Enable NavigationDelegate Isolated Process Tests r=geckoview-reviewers,calu
Issue originally causing tests to fail has not repeated.

Differential Revision: https://phabricator.services.mozilla.com/D153278
2022-08-01 13:52:04 +00:00
Makoto Kato e6d0758441 Bug 1769742 - Don't affect TimeoutMillis annotation to test clean up. r=geckoview-reviewers,calu
Actually, default timeout of geckoview junit is 3000ms, but we can change it
by `@TimeoutMillis`.

When changing timeout value, the timeout of clean up function such as
`cleanupExtensions` is also changed. So if `@TimeoutMillis` is small, cleanup
may be failed due to timeout.

So we shouldn't apply `@TimeoutMillis` on clean up. I guess bug 1606702 and bug
1607631 are same root cause too.

Differential Revision: https://phabricator.services.mozilla.com/D153123
2022-08-01 02:46:01 +00:00
Daisuke Akatsuka fe1785170f Bug 1776609: Record source and triggeringPlaceId for sponsored tile on newtab. r=mak,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D150729
2022-08-01 00:27:50 +00:00
Butkovits Atila 665e518c7f Backed out 2 changesets (bug 1776609) for causing failures at browser_topsites_annotation.js. CLOSED TREE
Backed out changeset cac795fd16d2 (bug 1776609)
Backed out changeset 88ec1cca8540 (bug 1776609)
2022-08-01 00:52:35 +03:00
Daisuke Akatsuka 971ff4bfb6 Bug 1776609: Record source and triggeringPlaceId for sponsored tile on newtab. r=mak,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D150729
2022-07-31 20:26:30 +00:00
Butkovits Atila 900cbd85bd Backed out 2 changesets (bug 1776609) for causing gtest failures. CLOSED TREE
Backed out changeset 7630fea97777 (bug 1776609)
Backed out changeset 426cbe0fac73 (bug 1776609)
2022-07-29 13:42:33 +03:00
Daisuke Akatsuka 7c02dae76f Bug 1776609: Record source and triggeringPlaceId for sponsored tile on newtab. r=mak,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D150729
2022-07-29 09:24:28 +00:00
Cathy Lu 08d4e80f75 Bug 1781180 Remove deprecated autofill calls r=geckoview-reviewers,jonalmeida,ohall
Differential Revision: https://phabricator.services.mozilla.com/D152805
2022-07-29 04:57:34 +00:00
ahochheiden 3dd666e072 Bug 1777132 = Update bootstrapping instructions in GeckoView Contributor Quick Start Guide r=geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D152459
2022-07-28 22:31:38 +00:00
Ryan VanderMeulen 7458cb1257 Bug 1773103 - Remove the unused findhelper.autozoom pref. r=geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152925
2022-07-28 00:32:55 +00:00
Ryan VanderMeulen d22a40b4fd Bug 1773062 - Remove the unused direct-texture.force.disabled and direct-texture.force.enabled prefs. r=geckoview-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D152924
2022-07-28 00:32:55 +00:00
Makoto Kato 2ed3d6c0ec Bug 1769742 - evaluateJS_canTimeout shouldn't use alert(). r=geckoview-reviewers,calu
Actually, `evaluateJS_canTimeout` test uses `alert()` to time out.

But when this test is failure, alert prompt is closed by calling reject
callback during timed out. Then, gv-junit cannot detect `TimeoutException`.
Since this reject callback is called by `nsIAndroidEventFinalizer`, I think
that using alert isn't good for `evaluateJS_canTimeout`.

So I would like to use other way instead of something prompt.

Differential Revision: https://phabricator.services.mozilla.com/D152751
2022-07-27 02:06:01 +00:00
Butkovits Atila 3204f22c53 Backed out changeset ee018d31dbfc (bug 1781180) for causing failures geckoview failures. CLOSED TREE 2022-07-27 02:53:25 +03:00
Cathy Lu 0ffa02f2a2 Bug 1781180 Remove deprecated autofill calls r=geckoview-reviewers,jonalmeida,ohall
Differential Revision: https://phabricator.services.mozilla.com/D152805
2022-07-26 22:59:23 +00:00
Tooru Fujisawa 2c15cdbe26 Bug 1780543 - Part 8: Remove unused eslint rule. r=Standard8,geckoview-reviewers,calu
Depends on D152432

Differential Revision: https://phabricator.services.mozilla.com/D152646
2022-07-26 02:46:31 +00:00
Tooru Fujisawa a6aabba5a4 Bug 1780543 - Part 1: Use eslint-env mozilla/frame-script consistently in frame script. r=Standard8,webdriver-reviewers,geckoview-reviewers,jdescottes,calu
Differential Revision: https://phabricator.services.mozilla.com/D152426
2022-07-26 02:46:28 +00:00
Dan Robertson 145bfbb928 Bug 1769292 - Fix broken links in mozilla central quickstart. r=agi
Fix some broken links in the mozilla central quickstart doc.

Differential Revision: https://phabricator.services.mozilla.com/D146331
2022-07-22 12:42:13 +00:00
Jamie Nicol 86e2a29705 Bug 1780377 - Add documentation for using Android Studio's native memory profiler with GeckoView. r=geckoview-reviewers,calu DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D152273
2022-07-21 08:18:31 +00:00
Pranshu Agrawal 940e4d8d1e Bug 1756530 : Removed Workaround of Bug1707959. r=m_kato,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D151991
2022-07-21 07:59:48 +00:00
Ting-Yu Lin b4c04f0197 Bug 1779269 - Fix AccessibleCaret's display on disabled form controls. r=emilio,webdriver-reviewers,whimboo,geckoview-reviewers,m_kato
A disabled form controls cannot be focused, and its frame selection is different
from the one for not-editable content. Use GetLastFocusedFrameSelection() (added
in Bug 253870) to get the correct frame selection that is visible to the user.

Add some basic tests for disabled <textarea> such as long pressing to select,
dragging, etc. They should behave the same as normal <textarea>.

Differential Revision: https://phabricator.services.mozilla.com/D151800
2022-07-21 05:44:30 +00:00
Olivia Hall 532663c44b Bug 1763466 - Change how is24HourFormat is determined for Isolated Process r=geckoview-reviewers,owlish
Android's `is24HourFormat` could not be be called from GeckoAppShell
when using isolated process. Changed GeckoAppShell's `getIs24HourFormat`
to be set as a variable in GeckoRuntime, which has correct access to
`is24HourFormat`.

Differential Revision: https://phabricator.services.mozilla.com/D152132
2022-07-19 21:48:02 +00:00
Makoto Kato 142a78ca7c Bug 1763954 - Add a small wait to finish `nsDocumentViewer::PermitUnload` loop. r=geckoview-reviewers,calu
`onBeforeUnloadTest` may be failure when `beforeunload` is immediately called
again.

Although 1st prompt by `beforeunload` is closed in test, Gecko may be clear
the flag (`nsDocumentViewer::mInPermitUnloadPrompt`) for prompt state at this
time. Then, if 2nd `beforeunload` is fired immediately, since the flag
isn't clear, `nsDocumentViewer` recognizes that `beforeunload` prompt is still
opened. Then newer prompt isn't called.

So we need a wait to clear this flag.

Differential Revision: https://phabricator.services.mozilla.com/D151903
2022-07-19 01:49:51 +00:00
Cathy Lu df9bafbf73 Bug 1734394 - Make Geckoview use the session store collector r=geckoview-reviewers,agi,farre,peterv
When the session storage prefs are enabled, GeckoSession updateSessionState will provide the bundle of information, including zoom, scroll, and form data, to the delegate. Currently works for Fission and on Fenix.

Differential Revision: https://phabricator.services.mozilla.com/D148215
2022-07-15 20:44:55 +00:00
Pranshu Agrawal a16a2f2cd1 Bug 1510647 Lint Warning: Missing @IntDef in Switch. r=m_kato,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D151653
2022-07-15 01:20:26 +00:00
Makoto Kato c69c9f0882 Bug 1763570 - Wait for APZ state to set autofill information. r=geckoview-reviewers,owlish
When setting focus to input element, Gecko sets focused element to central via
`zoomToFocusedInput`. So when we receives `focusin` event, content may be
scrolled and zoomed. To pass correct element rectangle, we have to wait until
it is completed.

Fennec added `PanZoom:StateChange` event to listen APZ state. So GV should use
same way.

Differential Revision: https://phabricator.services.mozilla.com/D150453
2022-07-14 18:32:47 +00:00
Jamie Nicol d40ea70ccc Bug 1772839 - Work around compositor being resumed with abandoned Surfaces. r=geckoview-reviewers,owlish
On some Android devices (predominantly Huawei devices running Android
9 or below) we are seeing large numbers of crashes due to the
compositor being unable to create an EGL surface to render in to. From
local testing, this appears to be due to the Surface we are being
provided from the SurfaceView being in an "abandoned"
state. Presumably this is due to an operating system bug - the Surface
is valid at the time of the surfaceChanged() callback, but becomes
abandoned moments later despite surfaceDestroyed() not being called.

We are able to detect when the Surface is in such a state from C++
code by calling ANativeWindow_getWidth(), as that will return a
negative value to indicate an error.

This patch uses this method to check whether the Surface is in such a
state prior to resuming the compositor. If so, rather than immediately
resuming the compositor it instead toggles the SurfaceView's
visibility. This tricks the SurfaceView in to providing a new (and
hopefully valid) Surface, which will in turn resume the compositor via
the surfaceChanged callback.

Differential Revision: https://phabricator.services.mozilla.com/D151479
2022-07-13 15:38:51 +00:00
Olivia Hall fab615eabb Bug 1777405 - GeckoView Intermittent in GeolocationTest onPause r=geckoview-reviewers,calu
In some test runs, the `onPause` Android Lifecycle event is not occuring
in the GeckoView test `GeolocationTest`.

Increasing the time between calling an `onPause` event (going Home)
and the `onResume` event (returning to app) will give the device more
time to complete the `onPause` event and return the expected results.

Differential Revision: https://phabricator.services.mozilla.com/D151031
2022-07-12 13:01:38 +00:00
criss 95f4f0498b Backed out changeset 67fae8447273 (bug 1734394) for causing Assertion failures on StaticPrefList_browser.h. CLOSED TREE 2022-07-12 09:00:39 +03:00
Tooru Fujisawa 54623364da Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-12 04:21:34 +00:00
Cathy Lu c89057028e Bug 1734394 - Make Geckoview use the session store collector r=geckoview-reviewers,agi,farre,peterv
When the session storage prefs are enabled, GeckoSession updateSessionState will provide the bundle of information, including zoom, scroll, and form data, to the delegate. Currently works for Fission and on Fenix.

Differential Revision: https://phabricator.services.mozilla.com/D148215
2022-07-12 02:50:01 +00:00
Andreea Pavel 7738a75fdd Backed out 11 changesets (Bug 1777486) for failing bc at browser_startup.js on a CLOSED TREE
Backed out changeset b6c4c386f1a6 (Bug 1777486)
Backed out changeset 195cc2de8433 (Bug 1777486)
Backed out changeset 20c746fb1648 (Bug 1777486)
Backed out changeset d5fd8173d62d (Bug 1777486)
Backed out changeset 6d758fab5a3e (Bug 1777486)
Backed out changeset e938b601ba15 (Bug 1777486)
Backed out changeset 0c4ea0b9416b (Bug 1777486)
Backed out changeset 0559c53cc668 (Bug 1777486)
Backed out changeset eea573d3a9f9 (Bug 1777486)
Backed out changeset 9ce3a6496a49 (bug 1777486)
Backed out changeset b0867652fc48 (bug 1777486)
2022-07-11 22:24:40 +03:00
Tooru Fujisawa 8cd6ed7409 Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-11 15:09:13 +00:00
Tooru Fujisawa 52c95734e7 Bug 1667455 - Part 9: Stop importing Services.jsm from chrome-priv HTML code, single-line cases. r=kmag,necko-reviewers,geckoview-reviewers,extension-reviewers,m_kato,dragana
Differential Revision: https://phabricator.services.mozilla.com/D150898
2022-07-11 12:41:52 +00:00
Tooru Fujisawa bf93d07148 Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Tooru Fujisawa f3a8c52c53 Bug 1667455 - Part 4: Stop importing Services.jsm from JSM. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,pip-reviewers,twisniewski,devtools-reviewers,m_kato,jdescottes,ochameau,mconley,sfoster,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D150893
2022-07-11 12:41:50 +00:00
Pranshu Agrawal d233311d04 Bug 1510613 LintWarning: Dangerous Flag Constant Declaration. r=m_kato,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D151438
2022-07-11 10:55:02 +00:00
smolnar b28cf9b990 Backed out changeset 457c6c1a18e3 (bug 1763570) for causing layout/forms/test/test_bug644542.html CLOSED TREE 2022-07-11 07:38:24 +03:00
Makoto Kato 9382dde863 Bug 1763570 - Wait for APZ state to set autofill information. r=geckoview-reviewers,owlish
When setting focus to input element, Gecko sets focused element to central via
`zoomToFocusedInput`. So when we receives `focusin` event, content may be
scrolled and zoomed. To pass correct element rectangle, we have to wait until
it is completed.

Fennec added `PanZoom:StateChange` event to listen APZ state. So GV should use
same way.

Differential Revision: https://phabricator.services.mozilla.com/D150453
2022-07-11 02:06:03 +00:00
Jamie Nicol 0cffcc7253 Bug 1777952 - Namespace SurfaceTexture handles by the process they were allocated in. r=gfx-reviewers,geckoview-reviewers,aosmond,calu
When Surfaces/SurfaceTextures are allocated they are given a handle,
which is a monotonically increasing 32-bit integer. To render
Surfaces, we typically pass the Surface handle to the compositor,
which then looks it up in a map to find the corresponding
SurfaceTexture.

Following a GPU process restart, content may be left with stale
handles referencing SurfaceTextures which no longer exist. Once new
SurfaceTextures are allocated, these stale handles may reference new
SurfaceTextures with no relation to the old handle. This can lead to
rendering the wrong texture. Additionally, we may crash when
allocating "sync" SurfaceTextures, as the previous sync texture for a
certain handle may not have been released yet.

To fix this, this patch combines the existing handle with a new ID
uniquely identifying the process in which the SurfaceTexture was
allocated (or 0 for the parent process). We use a monotonically
increasing value rather than the pid to guard against the new GPU
process possibly having the same pid as the previous instance. We
combine these two 32-bit integers and use the resulting 64-bit integer
as the Surface handle.

Differential Revision: https://phabricator.services.mozilla.com/D150963
2022-07-07 08:12:55 +00:00
Agi Sferro 22154a8e13 Bug 1722341 - Include gfx blocklist in Android dumps. r=Gijs,jnicol,calu
Differential Revision: https://phabricator.services.mozilla.com/D149572
2022-06-30 18:52:01 +00:00
Agi Sferro a30e2f2d3b Bug 1776313 - Lite build clarification. r=calu DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D150617
2022-06-30 14:51:31 +00:00
Kris Maglione 0a4ce6199e Bug 1773770: Part 9 - Migrate widget component content proxies to static registration. r=mccr8
Several widget contracts use different implementations in the parent and
content processes. Since the static registration system builds its hashtable
at compile time rather than runtime, it doesn't support different contract IDs
per process. It could make the decision at lookup time, but given how rarely
it's needed, I don't think it would be worth the complexity.

This patch updates the widget components that need different implementations
in the parent and content process to register separate contracts for each
implementation, and a third stub contract which forwards to the appropriate
implementation depending on which process it's used in. The implementation
entries restrict their usage to the process they are meant to be used in.

Differential Revision: https://phabricator.services.mozilla.com/D149436
2022-06-30 09:12:18 +00:00
Olivia Hall 93187cda98 Bug 1771229 - Pause Location Updates on Android when in Background r=geckoview-reviewers,owlish
This bug unsets the location listeners when the Android lifecycle
`onPause` is called and sets the location listeners when `onResume` is
called (if location was in use).

Differential Revision: https://phabricator.services.mozilla.com/D149442
2022-06-29 21:22:01 +00:00
Hannah Peuckmann 7c1bad4edc Bug 1764761 - Remove/replace the network.cookie.lifetimePolicy. r=pbz,necko-reviewers,mkaply,dom-storage-reviewers,agi,asuth,dragana
Differential Revision: https://phabricator.services.mozilla.com/D144548
2022-06-29 17:33:37 +00:00
Agi Sferro 21be493363 Bug 1776313 - Principals and permissions doc. r=owlish
Differential Revision: https://phabricator.services.mozilla.com/D150432
2022-06-29 04:19:32 +00:00
Makoto Kato defa3dc31e Bug 1771945 - Don't use setTimeout for <select> dismiss test. r=geckoview-reviewers,owlish
We shouldn't use setTimeout like dateTestDismiss() to avoid intermittent failure.

Differential Revision: https://phabricator.services.mozilla.com/D150341
2022-06-29 03:15:09 +00:00
Iulian Moraru 27bc847068 Bug 1776313 - fix lint failure in priority-hint.rst. r=fix 2022-06-28 05:11:12 +03:00
Agi Sferro 6bc6b984fe Bug 1776313 - Address lint failures.
Differential Revision: https://phabricator.services.mozilla.com/D150435
2022-06-28 00:52:01 +00:00
Agi Sferro 65a7e078cf Bug 1776313 - Add design docs part 1.
Differential Revision: https://phabricator.services.mozilla.com/D150297
2022-06-27 23:53:55 +00:00
Agi Sferro 63d7c2706c Bug 1776313 - Add priority hint section. r=calu
Differential Revision: https://phabricator.services.mozilla.com/D150420
2022-06-27 21:33:26 +00:00
Agi Sferro eade1ae33b Bug 1776313 - Lite build and Enterprise roots sections. r=owlish DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D150277
2022-06-27 19:52:22 +00:00
Agi Sferro 5ea55946f9 Bug 1776313 - Apilint release docs. r=jonalmeida DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D150201
2022-06-27 19:52:21 +00:00
Agi Sferro a26a1354fe Bug 1776313 - Streamline GeckoView documentation page. r=owlish DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D150200
2022-06-27 19:52:21 +00:00
Sergey Galich 110f8e9de2 Bug 1773047 - Remove the `security.insecure_field_warning.contextual.enabled` pref r=dimi,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D149550
2022-06-27 17:18:41 +00:00
Noemi Erli d6440ec5b2 Backed out changeset 56a33c1c3210 (bug 1734394) for causing build bustages in GeckoBundleUtils.cpp CLOSED TREE 2022-06-24 22:01:02 +03:00
Cathy Lu 617487c8c7 Bug 1734394 - Make Geckoview use the session store collector r=geckoview-reviewers,agi,farre
When the session storage prefs are enabled, GeckoSession updateSessionState will provide the bundle of information, including zoom, scroll, and form data, to the delegate. Currently works for Fission and on Fenix.

Differential Revision: https://phabricator.services.mozilla.com/D148215
2022-06-24 18:34:28 +00:00
Noemi Erli ff26b8a5d0 Backed out 11 changesets (bug 1773770) because shouldn't have been landed during a soft freeze CLOSED TREE
Backed out changeset ede55d570d1e (bug 1773770)
Backed out changeset d5374ef362c2 (bug 1773770)
Backed out changeset 26e47956508b (bug 1773770)
Backed out changeset c78f0c4c8f3f (bug 1773770)
Backed out changeset 9089a97bcb26 (bug 1773770)
Backed out changeset 17894f5b3b41 (bug 1773770)
Backed out changeset 986a64a9e6b4 (bug 1773770)
Backed out changeset 7a63d8676bf0 (bug 1773770)
Backed out changeset 38e7b99ffbed (bug 1773770)
Backed out changeset e9ad07c96ab2 (bug 1773770)
Backed out changeset 2a8f65417b66 (bug 1773770)
2022-06-24 20:03:43 +03:00
Andreea Pavel c1172abd44 Bug 1662035 - add and correct disabling condition r=geckoview-reviewers,calu DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D150240
2022-06-24 15:59:38 +00:00
Kris Maglione d1688d3ec7 Bug 1773770: Part 9 - Migrate widget component content proxies to static registration. r=mccr8
Several widget contracts use different implementations in the parent and
content processes. Since the static registration system builds its hashtable
at compile time rather than runtime, it doesn't support different contract IDs
per process. It could make the decision at lookup time, but given how rarely
it's needed, I don't think it would be worth the complexity.

This patch updates the widget components that need different implementations
in the parent and content process to register separate contracts for each
implementation, and a third stub contract which forwards to the appropriate
implementation depending on which process it's used in. The implementation
entries restrict their usage to the process they are meant to be used in.

Differential Revision: https://phabricator.services.mozilla.com/D149436
2022-06-24 07:10:18 +00:00
criss 6abc242b8d Backed out 11 changesets (bug 1773770) for causing mochitest failures on test_bug466599.xhtml. CLOSED TREE
Backed out changeset d35762c3242d (bug 1773770)
Backed out changeset 0501c85d3f58 (bug 1773770)
Backed out changeset cdd28e0e3434 (bug 1773770)
Backed out changeset a48829529dd0 (bug 1773770)
Backed out changeset c3fcdd7e88e5 (bug 1773770)
Backed out changeset 8f334c5dc0cd (bug 1773770)
Backed out changeset 337e76b67647 (bug 1773770)
Backed out changeset 71f539b482ba (bug 1773770)
Backed out changeset b996cbbbc2f5 (bug 1773770)
Backed out changeset a6ddc3cdc9ba (bug 1773770)
Backed out changeset c8d7da3cf2ac (bug 1773770)
2022-06-24 08:12:40 +03:00
Kris Maglione b973622a94 Bug 1773770: Part 9 - Migrate widget component content proxies to static registration. r=mccr8
Several widget contracts use different implementations in the parent and
content processes. Since the static registration system builds its hashtable
at compile time rather than runtime, it doesn't support different contract IDs
per process. It could make the decision at lookup time, but given how rarely
it's needed, I don't think it would be worth the complexity.

This patch updates the widget components that need different implementations
in the parent and content process to register separate contracts for each
implementation, and a third stub contract which forwards to the appropriate
implementation depending on which process it's used in. The implementation
entries restrict their usage to the process they are meant to be used in.

Differential Revision: https://phabricator.services.mozilla.com/D149436
2022-06-24 00:47:45 +00:00
Marian-Vasile Laza 7dd26a3f65 Backed out 11 changesets (bug 1773770) for causing bc failures on browser_xpcom_graph_wait.js. CLOSED TREE
Backed out changeset 72ace9ee39ae (bug 1773770)
Backed out changeset e8a3a040b4c4 (bug 1773770)
Backed out changeset 4ff5f4f0f5d1 (bug 1773770)
Backed out changeset f96e9664168d (bug 1773770)
Backed out changeset b6a696897ca8 (bug 1773770)
Backed out changeset 1b8ad6be2dce (bug 1773770)
Backed out changeset 7e3a1a32a88d (bug 1773770)
Backed out changeset 6dbe5fa1ad4f (bug 1773770)
Backed out changeset 86e09dcdadde (bug 1773770)
Backed out changeset 1ee8d852d9d5 (bug 1773770)
Backed out changeset c99e93023059 (bug 1773770)
2022-06-24 03:25:34 +03:00
Kris Maglione fe9734c5db Bug 1773770: Part 9 - Migrate widget component content proxies to static registration. r=mccr8
Several widget contracts use different implementations in the parent and
content processes. Since the static registration system builds its hashtable
at compile time rather than runtime, it doesn't support different contract IDs
per process. It could make the decision at lookup time, but given how rarely
it's needed, I don't think it would be worth the complexity.

This patch updates the widget components that need different implementations
in the parent and content process to register separate contracts for each
implementation, and a third stub contract which forwards to the appropriate
implementation depending on which process it's used in. The implementation
entries restrict their usage to the process they are meant to be used in.

Differential Revision: https://phabricator.services.mozilla.com/D149436
2022-06-23 23:05:36 +00:00
Marian-Vasile Laza 969bcd8dfe Backed out 11 changesets (bug 1773770) for causing bustages on nsComponentManager.obj.
Backed out changeset 3538e99dd668 (bug 1773770)
Backed out changeset 0862b3275742 (bug 1773770)
Backed out changeset 45dbd95d94bb (bug 1773770)
Backed out changeset 1d079a6ae89c (bug 1773770)
Backed out changeset ac4c4a143ff7 (bug 1773770)
Backed out changeset 0e3233868101 (bug 1773770)
Backed out changeset ac727812fd06 (bug 1773770)
Backed out changeset fe46df06e31a (bug 1773770)
Backed out changeset 51b89b344d7f (bug 1773770)
Backed out changeset 62e49ca3f288 (bug 1773770)
Backed out changeset 6df39588ec9a (bug 1773770)
2022-06-24 01:16:58 +03:00
Kris Maglione 38b1250f24 Bug 1773770: Part 9 - Migrate widget component content proxies to static registration. r=mccr8
Several widget contracts use different implementations in the parent and
content processes. Since the static registration system builds its hashtable
at compile time rather than runtime, it doesn't support different contract IDs
per process. It could make the decision at lookup time, but given how rarely
it's needed, I don't think it would be worth the complexity.

This patch updates the widget components that need different implementations
in the parent and content process to register separate contracts for each
implementation, and a third stub contract which forwards to the appropriate
implementation depending on which process it's used in. The implementation
entries restrict their usage to the process they are meant to be used in.

Differential Revision: https://phabricator.services.mozilla.com/D149436
2022-06-23 20:13:10 +00:00
Marian-Vasile Laza 63b59e32d4 Backed out changeset 39559c43173a (bug 1734394) for causing bustages on GeckoBundleUtils.cpp. CLOSED TREE 2022-06-23 20:05:54 +03:00
Cathy Lu 4d149860a7 Bug 1734394 - Make Geckoview use the session store collector r=geckoview-reviewers,agi,farre
When the session storage prefs are enabled, GeckoSession updateSessionState will provide the bundle of information, including zoom, scroll, and form data, to the delegate. Currently works for Fission and on Fenix.

Differential Revision: https://phabricator.services.mozilla.com/D148215
2022-06-23 16:44:32 +00:00
Eemeli Aro b83a85e23e Bug 1771734 - Drop unused DTD strings. r=flod,geckoview-reviewers,m_kato
This follows in the same vein as bug 1771133,
and cleans up some strings that were orphaned by bug 1589182.

Differential Revision: https://phabricator.services.mozilla.com/D147652
2022-06-23 14:25:27 +00:00
Emilio Cobos Álvarez bd09497378 Bug 1372276 - Remove HTML menuitem. r=smaug,mconley,agi
This removes HTMLMenuItemElement and all the code and tests preffed off
by dom.menuitem.enabled.

The HTML parser changes are the result of applying the previous patch.

Differential Revision: https://phabricator.services.mozilla.com/D149979
2022-06-22 22:31:42 +00:00
Kris Maglione 23d4c575c6 Bug 1770237: Part 14 - Update URILoader parent handler service to use static component registration. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D148194
2022-06-22 20:31:36 +00:00
Kris Maglione 360a2f6d5c Bug 1770237: Part 8 - Remove legacy component registration for TestInterfaceJS. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D148188
2022-06-22 20:31:34 +00:00
Iulian Moraru e8c5035749 Backed out changeset 9c9b960cb8bf (bug 1773047) for causing multiple failures related to Autocomplete. CLOSED TREE 2022-06-22 22:02:41 +03:00
Sergey Galich 20bcd14769 Bug 1773047 - Remove the `security.insecure_field_warning.contextual.enabled` pref r=dimi,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D149550
2022-06-22 17:48:18 +00:00
Gabriel Luong a7e3764f39 Bug 1774481 - Set empty string as the default value for non-null string autocomplete properties in GeckoViewAutcomplete. r=owlish
Differential Revision: https://phabricator.services.mozilla.com/D149622
2022-06-22 17:35:25 +00:00
Emilio Cobos Álvarez 4c5f20179e Bug 1775247 - Implement AccentColor/AccentColorText and remove -moz-prefixed version of the color. r=mstange
As per https://github.com/w3c/csswg-drafts/issues/7347.

Mostly renaming, doesn't change behavior other than exposing the new
color keywords (tested in wpt).

Differential Revision: https://phabricator.services.mozilla.com/D149876
2022-06-22 09:45:06 +00:00
Makoto Kato 22bcab84b6 Bug 1769907 - Don't register desktop's SelectChild and SelectParent in GeckoView. r=geckoview-reviewers,agi
Actually, GeckoView registers both desktop and mobile actor for `<select>`
element. It is unnecessary to use desktop's `<select>` actor.

But, if GeckoView doesn't register desktop's `<select>` actor,
`layout/forms/test/test_select_reframe.html` will be failure since GV doesn't
handle `mozhidedropdown` that is a event when the control is unbinded from
layout tree.

So we need to handle this for this situation that is one of dismissed cases.

Differential Revision: https://phabricator.services.mozilla.com/D149526
2022-06-22 05:27:28 +00:00
Mark Banner c6c1957341 Bug 1771173 - Remove unused imports. r=geckoview-reviewers,arai,owlish
Differential Revision: https://phabricator.services.mozilla.com/D149786
2022-06-21 20:42:16 +00:00
Iulian Moraru 68268d376b Backed out changeset 24fbaf568416 (bug 1722341) for causing xpcshell failures on test_blocklist_clients.js. 2022-06-17 22:55:30 +03:00
Agi Sferro 6f1c936fdd Bug 1774565 - Pass FLAG_IMMUTABLE in pendingIntents. r=calu
This is a requirement when targeting Android 31 and above:
https://developer.android.com/about/versions/12/behavior-changes-12.

Differential Revision: https://phabricator.services.mozilla.com/D149541
2022-06-17 15:33:14 +00:00
Agi Sferro 3351a19704 Bug 1722341 - Include gfx blocklist in Android dumps. r=Gijs,jnicol,calu
Differential Revision: https://phabricator.services.mozilla.com/D149572
2022-06-17 15:32:45 +00:00
Tooru Fujisawa 5e0731b2a4 Bug 1608282 - Part 4: Remove Cu.defineLazyGlobalGetters from JSM. r=webdriver-reviewers,extension-reviewers,jdescottes,kmag
Depends on D149196

Differential Revision: https://phabricator.services.mozilla.com/D149197
2022-06-16 00:19:54 +00:00
Butkovits Atila 8218713aac Backed out 4 changesets (bug 1608282) for causing hazard failures. CLOSED TREE
Backed out changeset 32aebc8be201 (bug 1608282)
Backed out changeset 37c970364269 (bug 1608282)
Backed out changeset ced8d82cc2d2 (bug 1608282)
Backed out changeset e26e480c7dd6 (bug 1608282)
2022-06-16 03:10:02 +03:00
Tooru Fujisawa f791fe2d2d Bug 1773829 - Part 5: Stop using lazy getter unnecessarily in mobile/. r=agi,calu
Depends on D149013

Differential Revision: https://phabricator.services.mozilla.com/D149014
2022-06-15 20:56:23 +00:00
Tooru Fujisawa a3795d2713 Bug 1773390 - Remove CommonJS "require" support from AndroidLog.jsm. r=agi
Differential Revision: https://phabricator.services.mozilla.com/D149343
2022-06-15 20:54:49 +00:00
Tooru Fujisawa 8b8d6b141a Bug 1608282 - Part 4: Remove Cu.defineLazyGlobalGetters from JSM. r=webdriver-reviewers,extension-reviewers,jdescottes,kmag
Depends on D149196

Differential Revision: https://phabricator.services.mozilla.com/D149197
2022-06-15 20:34:35 +00:00
Emilio Cobos Álvarez bf4306b284 Bug 1774224 - Fix dynamic viewport size. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D149275
2022-06-15 09:55:57 +00:00
Tooru Fujisawa 371b3c1d97 Bug 1607331 - Part 3: Reject global this usage in JSM. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D148551
2022-06-14 21:56:55 +00:00
Sergey Galich bb845d1286 Bug 1773832 - Refactor LoginManagerChild: getUserNameAndPasswordFields r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D149006
2022-06-14 16:15:09 +00:00
Makoto Kato f3dad3e3fe Bug 1596164 - Use PR_Now instead of location service's acquired time. r=geckoview-reviewers,agi
`android.location.Location.getTime()` will return the acquired location time
that depends on location service. But `maximumAge` will be calculated by
current time (`PR_Now()`). So if the acquired time is old time,
`nsGeolocationRequest::SendLocation` won't send the location due to too old
(`isTooOld=true` in `nsGeolocationRequest::SendLocation`).

Like other platforms, we should pass PR_Now as the location time instead.

Also, GVE sometimes hits debug assertion since heading and/or speed aren't
expected value, so this patch fixes this situation.

Differential Revision: https://phabricator.services.mozilla.com/D148452
2022-06-14 04:20:42 +00:00
Butkovits Atila 49df745e2e Bug 1763954 - disable the test on opt and debug isolated process builds to reduce failure rate. r=intermittent-reviewers,MasterWayZ
Differential Revision: https://phabricator.services.mozilla.com/D148343
2022-06-13 08:19:38 +00:00
Christoph Kerschbaumer b5c2597732 Bug 1773061: Remove unused pref security.warn_viewing_mixed r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D148889
2022-06-13 07:48:54 +00:00
Molnar Sandor 8fc1808762 Bug 1773287 - Fix mozlint failure in mobile/android/docs/geckoview/contributor/geckoview-architecture.rst. CLOSED TREE 2022-06-08 17:12:01 +03:00
Agi Sferro e4872bd92e Bug 1773287 - Add Permission and Autofill GeckoView docs. DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D148653
2022-06-08 13:31:00 +00:00
Eitan Isaacson 657feb8e6d Bug 1772577 - Disable fission tests when cache is disabled. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D148291
2022-06-07 22:10:22 +00:00
Tooru Fujisawa 204beb8ef5 Bug 1772351 - Part 4: Stop calling XPCOMUtils.defineLazyModuleGetters for AppConstants for already converted cases. r=florian
Differential Revision: https://phabricator.services.mozilla.com/D148167
2022-06-06 04:42:09 +00:00
Tooru Fujisawa 912b8d4e35 Bug 1772313 - Part 8: Stop calling XPCOMUtils.defineLazyModuleGetters for Services in mobile/. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D148161
2022-06-06 04:42:07 +00:00
Molnar Sandor 77402a5caa Backed out 15 changesets (bug 1772313, bug 1772351, bug 1772360) for causing xpc failures in telemetry/tests/unit/test_SocketScalars.js CLOSED TREE
Backed out changeset c8b0a2ed239e (bug 1772360)
Backed out changeset 1922adad6abe (bug 1772351)
Backed out changeset 6d3634cce489 (bug 1772351)
Backed out changeset f03968a9d053 (bug 1772351)
Backed out changeset e7a38ef90fe4 (bug 1772351)
Backed out changeset b389e7654771 (bug 1772313)
Backed out changeset 59a33598ff51 (bug 1772313)
Backed out changeset ab60885a8a93 (bug 1772313)
Backed out changeset aad8efac9d05 (bug 1772313)
Backed out changeset 4378e519a8e7 (bug 1772313)
Backed out changeset 302ac54741f8 (bug 1772313)
Backed out changeset 74c59f9fd51c (bug 1772313)
Backed out changeset 575fb877c56c (bug 1772313)
Backed out changeset 2eaa68f10b19 (bug 1772313)
Backed out changeset 4a8b3ba193dc (bug 1772313)
2022-06-06 07:04:25 +03:00
Tooru Fujisawa 4dc660a4b7 Bug 1772351 - Part 4: Stop calling XPCOMUtils.defineLazyModuleGetters for AppConstants for already converted cases. r=florian
Differential Revision: https://phabricator.services.mozilla.com/D148167
2022-06-06 02:49:13 +00:00
Tooru Fujisawa eaf1dda701 Bug 1772313 - Part 8: Stop calling XPCOMUtils.defineLazyModuleGetters for Services in mobile/. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D148161
2022-06-06 02:49:11 +00:00
Agi Sferro 6b7bbabc69 Bug 1772602 - Add missing @Deprecated tag in StorageController. r=calu
Differential Revision: https://phabricator.services.mozilla.com/D148309
2022-06-04 22:12:54 +00:00
Andreea Pavel 88f88876d9 Bug 1662035 - disable ProgressDelegateTest#saveAndRestoreState on debug r=calu DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D147679
2022-06-04 10:19:49 +00:00
Andreea Pavel d21d2bedc1 Bug 1764219 - disable noGapAppearsBetweenBodyAndElementFullyCoveringBody on debug r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D148091
2022-06-04 10:16:57 +00:00
Agi Sferro 53dcdf0fe7 Bug 1772427 - Remove unneded sub-heading. r=calu
I think this sub-heading is a weird artifact of the migration from md to rst.
It creates a double menu that is not needed.

Before:

```
- Contributing to GeckoView
  - Contributor Site
    - GeckoView Contributor guide
    - GeckoView for Gecko engineers
    - ...
- Using GeckoView
  - Usage Documentation
    - Getting Started with GeckoView
    - Interacting with Web Content
    - ...

```

After

```
- Contributing to GeckoView
  - GeckoView Contributor guide
  - GeckoView for Gecko engineers
  - ...
- Using GeckoView
  - Getting Started with GeckoView
  - Interacting with Web Content
  - ...
```

Differential Revision: https://phabricator.services.mozilla.com/D148214
2022-06-03 16:25:02 +00:00
Agi Sferro cdfd02d7b2 Bug 1772427 - Add doc about Android Junit framework. r=calu
Differential Revision: https://phabricator.services.mozilla.com/D148210
2022-06-03 16:25:02 +00:00
Botond Ballo 18351c43de Bug 1771822 - Remove the browser.chrome.dynamictoolbar pref. r=tnikkel,perftest-reviewers,AlexandruIonescu
This pref is left over from a previous dynamic toolbar implementation,
and no one was reading its value.

Differential Revision: https://phabricator.services.mozilla.com/D147810
2022-06-02 22:57:56 +00:00
Tooru Fujisawa 8488417717 Bug 1772095 - Part 5: Use plain object for lazy getter in mobile/android/modules/test/. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D147997
2022-06-02 10:43:44 +00:00
Tooru Fujisawa 50161bda46 Bug 1772095 - Part 4: Use plain object for lazy getter in mobile/android/modules/geckoview/. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D147996
2022-06-02 10:43:44 +00:00
Tooru Fujisawa d37d7fac1b Bug 1772095 - Part 3: Use plain object for lazy getter in mobile/android/components/geckoview/. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D147995
2022-06-02 10:43:43 +00:00
Tooru Fujisawa 3ffef0fc5d Bug 1772095 - Part 2: Use plain object for lazy getter in mobile/android/components/extensions/. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D147994
2022-06-02 10:43:43 +00:00
Tooru Fujisawa 827ee22a88 Bug 1772095 - Part 1: Use plain object for lazy getter in mobile/android/actors/. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D147993
2022-06-02 10:43:42 +00:00
Makoto Kato 72b27d450d Bug 1715572 - DateTime prompt should be dismissed when focus is lost by content script. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D147054
2022-06-02 01:45:00 +00:00
owlishDeveloper 316e89b03f Bug 1759560 - Use BuildConfig.DEBUG_BUILD instead of BuildConfig.DEBUG due to an Android bug which causes BuildConfig.DEBUG to be true in release builds r=geckoview-reviewers,agi
This is part 1 of the bug, it addresses the crush itself, and the weird case of BuildConfig.DEBUG being true in release builds (due to an external to gv bug). There will be a follow up, in a separate bug, to address the actual flow (Web Extensions opening web pages in popups and how we want to handle that).

Differential Revision: https://phabricator.services.mozilla.com/D147456
2022-05-31 23:26:19 +00:00
Jamie Nicol 2cf59fe695 Bug 1767128 - Rework and re-enable SurfaceControl rendering path on Android. r=agi,gfx-reviewers,aosmond
In bug 1762424 we introduced a rendering path on Android using the
SurfaceControl API, in order to work around a bug preventing recovery
from a GPU process crash. However, the initial implementation caused
this bug: repeatedly sending the same SurfaceControl objects over AIDL
to the GPU process resulted in them being leaked, eventually causing
severe display issues. Not only were we duplicating the SurfaceControl
for each widget, but each time a widget was resized too.

This patch reworks our usage of the SurfaceControl API to avoid ever
having to send them cross-process. Instead, we create a single child
SurfaceControl object for each SurfaceControl that is attached to a
widget. (Typically there will be a single one shared between all
widgets, changing only when the app is paused and resumed, which is
much fewer than one per widget per resize.)

In the parent process we obtain the Surfaces that will be rendered in
to from the child SurfaceControls, and only send those Surfaces to the
GPU process. Thankfully unlike SurfaceControls, sending Surfaces
cross-process does not cause leaks. When the GPU process dies we
simply destroy all of the child SurfaceControls, and recreate them
again on-demand.

Differential Revision: https://phabricator.services.mozilla.com/D147437
2022-05-31 18:41:07 +00:00
Olivia Hall f950793fec Bug 1659819 - GeckoView Save to PDF API r=nika,agi,geckoview-reviewers,jonalmeida,emilio
Adds a GeckoView save to PDF API that can be used to save the current session’s page content to a PDF. The API returns a Java InputStream that can be used by the consumer to process the PDF.

Differential Revision: https://phabricator.services.mozilla.com/D146245
2022-05-31 17:34:56 +00:00
Jonathan Almeida 5f5204b519 Bug 1771793 - Add imageUrl tests to WebNotificationTest r=geckoview-reviewers,calu
Follow-up unit tests for bug 1768574.

Differential Revision: https://phabricator.services.mozilla.com/D147685
2022-05-31 15:14:27 +00:00
Cathy Lu b22258d4fa Bug 1771261 - Add test API to clear HSTS bug r=geckoview-reviewers,agi
Used the browser code as an example (https://searchfox.org/mozilla-central/rev/9902932742fcdce2c956eeb81fd38350f5394ab2/security/manager/ssl/tests/mochitest/browser/browser_HSTS.js#161-164). It gets the site security service and calls clearAll(). I followed this example (https://hg.mozilla.org/mozilla-central/rev/44b1a295c186d1dbba00c047cbd3c706eca559b2) to add a test API.

Differential Revision: https://phabricator.services.mozilla.com/D147424
2022-05-31 15:09:16 +00:00
Makoto Kato c3e60ccc42 Bug 1715572 - Choice prompt should be dismissed when focus is lost by content script. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D146913
2022-05-31 13:45:55 +00:00
Cosmin Sabou 9c4151b966 Backed out changeset 2ef92e77b85b (bug 1759560) for causing Android xpcshell timeouts. 2022-05-28 01:17:28 +03:00
owlishDeveloper b613996db5 Bug 1759560 - Use BuildConfig.DEBUG_BUILD instead of BuildConfig.DEBUG due to an Android bug which causes BuildConfig.DEBUG to be true in release builds r=geckoview-reviewers,agi
This is part 1 of the bug, it addresses the crush itself, and the weird case of BuildConfig.DEBUG being `true` in release builds (due to an external to gv bug).

There will be a follow up, in a separate bug, to address the actual flow (Web Extensions opening web pages in popups and how we want to handle that).

Differential Revision: https://phabricator.services.mozilla.com/D147456
2022-05-27 16:14:49 +00:00
Andreea Pavel 65a2647e01 Bug 1605001 - disable evaluateJS_canTimeout on debug r?#intermittent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D147459
2022-05-27 04:32:40 +00:00
Bogdan Szekely a13336eaa5 Backed out changeset 5e2d37a71968 (bug 1605001) for causing build bustages on GeckoSessionTestRuleTest.kt CLOSED TREE 2022-05-27 09:37:32 +03:00
Andreea Pavel 4042f9a438 Bug 1605001 - disable evaluateJS_canTimeout on debug r=geckoview-reviewers,agi DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D147459
2022-05-27 04:32:40 +00:00
Jonathan Almeida 60306b4693 Bug 1768574 - Ensure imageUrl is set as a non-null value when serializing WebNotification r=agi
This is a non-null field in the WebNotification standard as well as what we get from JS,
so we should be consistent with this behaviour in the Java land as well.

Differential Revision: https://phabricator.services.mozilla.com/D147238
2022-05-26 17:15:36 +00:00
Cathy Lu 803a4e8449 Bug 1721220 - Add BAD_STS_CERT error r=geckoview-reviewers,nika,agi,owlish
Differential Revision: https://phabricator.services.mozilla.com/D146234
2022-05-25 17:51:11 +00:00
Olivia Hall 75a3ab8d68 Bug 1770220 - Add tests for GeckoInputStream.java r=agi
Added thread safety tests for GeckoInputStream.java and removed Gecko
thread assertion on `appendBuffer` in GeckoInputStream.

Differential Revision: https://phabricator.services.mozilla.com/D147114
2022-05-24 18:09:34 +00:00
Eitan Isaacson 77e94a114a Bug 1758540 - Pref on accessibility cache in Android. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D141638
2022-05-23 15:51:09 +00:00
Eitan Isaacson 4cc4578c5b Bug 1769640 - P2: Translate parent bounds to sceen bounds. r=geckoview-reviewers,agi
We used to get screen bounds from the gecko layer and needed to strip
the screen offsets for parent-relative offsets. It is now the opposite,
the bounds we get from gecko do not have the screen offsets of the top
View.

Differential Revision: https://phabricator.services.mozilla.com/D146508
2022-05-20 16:39:50 +00:00
Emilio Cobos Álvarez b6782fe2d5 Bug 1767346 - Use browsing context activeness rather than renderLayers to determine process priority. r=mccr8,mconley,geckoview-reviewers,agi
For desktop this should basically have no impact (maybe impacts tab
warming, but if we wanted we could set the priority hint from the tab
switcher the same way we set renderLayers), but Fenix always has
renderLayers as true, effectively, so we were never de-prioritizing the
background tab processes.

Differential Revision: https://phabricator.services.mozilla.com/D145351
2022-05-20 09:14:42 +00:00
Luca Greco 61c161b441 Bug 1739114 - Moved privileged WebExtensions permissions in their own JSONSchema type and added a new custom privileged keyword on each privileged manifest fields. r=robwu,mixedpuppy
This patch includes only the subset of D145687 changes related to the reworked JSONSchema data, plus some minor changes to Schemas.jsm to take the new
JSONSchema type ("PrivilegedPermissions") and the new custom JSONSchema keyword (the boolean "privileged" property used to identify manifest fields
only allowed in privileged extensions).

Besides the changes to the schema data, this patch is not expected to introduce any difference in behavior and so it could also land on its own
if needed (and the rest of the changes landed separately).

Differential Revision: https://phabricator.services.mozilla.com/D146800
2022-05-20 08:55:03 +00:00
Mike Hommey b798bb1980 Bug 1770251 - Centralize PGO mozconfig bits. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D146852
2022-05-20 08:31:46 +00:00
Marian-Vasile Laza fadf2bc15a Backed out changeset 7b3a02a659ef (bug 1767346) for causing geckoview failures. CLOSED TREE 2022-05-20 05:23:28 +03:00
Emilio Cobos Álvarez d6edcc48bb Bug 1767346 - Use browsing context activeness rather than renderLayers to determine process priority. r=mccr8,mconley,geckoview-reviewers,agi
For desktop this should basically have no impact (maybe impacts tab
warming, but if we wanted we could set the priority hint from the tab
switcher the same way we set renderLayers), but Fenix always has
renderLayers as true, effectively, so we were never de-prioritizing the
background tab processes.

Differential Revision: https://phabricator.services.mozilla.com/D145351
2022-05-20 00:48:32 +00:00
Agi Sferro 31f8c98911 Bug 1770010 - Keep reference to autofill session instead of using mSession. r=jonalmeida,calu
The android autofill framework requests a virtual structure for the webpage in
onProvideAutofillVirtualStructure and then at a later time will call autofill
when the user selects a value in the autofill app.

These method calls happen on the GeckoView, but our data is stored in the
GeckoSession (or rather, in the window that the GeckoSession represents).

Because of the asynchronicity of this process, we're not guaranteed that the
app hasn't switched the sesssion behind us in between the
onProvideAutofillVirtualStructure and autofill call, so we need to keep a
reference to the current autofill session when onProvide is called so that
we're sure that we are autofilling the right session.

We use a WeakReference to avoid keeping a window alive more than necessary, as
if the window is unloaded, there is no point in autofilling anyway.

Differential Revision: https://phabricator.services.mozilla.com/D146724
2022-05-19 22:07:38 +00:00
Marian-Vasile Laza 6924977975 Backed out changeset d3577f741ef5 (bug 1739114) for causing xpcshell failures on test_ext_permissions.js. CLOSED TREE 2022-05-19 23:35:07 +03:00
Luca Greco b928b2d0a8 Bug 1739114 - Moved privileged WebExtensions permissions in their own JSONSchema type and added a new custom privileged keyword on each privileged manifest fields. r=robwu,mixedpuppy
This patch includes only the subset of D145687 changes related to the reworked JSONSchema data, plus some minor changes to Schemas.jsm to take the new
JSONSchema type ("PrivilegedPermissions") and the new custom JSONSchema keyword (the boolean "privileged" property used to identify manifest fields
only allowed in privileged extensions).

Besides the changes to the schema data, this patch is not expected to introduce any difference in behavior and so it could also land on its own
if needed (and the rest of the changes landed separately).

Differential Revision: https://phabricator.services.mozilla.com/D146800
2022-05-19 18:20:59 +00:00
Rob Wu 67f9acbe63 Bug 1766047 - Reject updates that have a mismatching version r=rpl,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D144498
2022-05-18 15:13:48 +00:00
Butkovits Atila 1013e73681 Backed out changeset b831ee293939 (bug 1766047) for causing linting failures. CLOSED TREE 2022-05-18 02:04:13 +03:00
Mike Hommey efb6750853 Bug 1769666 - Re-enable PGO jarlog on Android. r=agi
It was disabled in bug 1539933 but since then, the signing scripts have
been fixed so the work around shouldn't be necessary anymore.

Differential Revision: https://phabricator.services.mozilla.com/D146518
2022-05-17 21:38:19 +00:00
Rob Wu 088fac1bec Bug 1766047 - Reject updates that have a mismatching version r=rpl,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D144498
2022-05-17 21:08:21 +00:00
Sergio Villar Senin a253868f5e Bug 1769283 - Unable to set MSAA samples in GeckoView. r=agi
GeckoView is still using the deleted gl.msaa-level setting. As the rest of the engine does not use it,
modifying it basically became a noop. Replacing it by webgl.msaa-samples does the trick and allows
GeckoView clients to modify the antialiasing settings in WebGL.

Differential Revision: https://phabricator.services.mozilla.com/D146322
2022-05-17 14:24:39 +00:00
Makoto Kato cad300b928 Bug 1758800 - Watch the modification of child nodes in <select> element. r=agi,ohall
This is a kind of bug 1263887 for GeckoView.

We should update the prompt when child nodes in `<select>` element is modified.

I add `PromptInstanceDelegate.onPromptUpdate` to update the prompt's content.
Browser application should implement it if <select> element is updated during
showing the prompt.

Differential Revision: https://phabricator.services.mozilla.com/D144538
2022-05-17 10:55:45 +00:00
Agi Sferro e652bcab53 Bug 1754607 - Make sure autofill session is reset after navigation. r=owlish
With Fission, `pageshow` and `pagehide` are not guaranteed to happen in order,
e.g. we might get the following order of events:

pageshow -- navigate to example.org
pageshow -- navigate to google.com
pagehide -- example.org is now hidden

which would break the previous assumption that we could rely on the order of
show and hide events.

To handle that, we keep track of the most-recent-added session and we assume
that that is the session bening displayed.

In the future, we might consider keeping state of all sessions until a
`pagehide` event for the specific session arrives.

Differential Revision: https://phabricator.services.mozilla.com/D143961
2022-05-17 01:34:44 +00:00
Agi Sferro 6f503072d7 Bug 1755094 - Make autofill tree immutable. r=owlish
Before this patch, the autofill tree was mutable, which makes it hard to follow
updates and reason about state.

This change makes the autofill tree immutable and adds a separate `HashMap` to
track mutable values like `value`, `callback`.

This change also modifies the way we track nodes internally, using exclusevely
the UUID of the node rather then the int autofill ID which is now only used at
the boundary of the Autofill API.

We also simplify the API by only providing the necessary information about the
node rather than the entire tree structure.

Differential Revision: https://phabricator.services.mozilla.com/D143960
2022-05-17 01:34:44 +00:00
Agi Sferro 7ca6de9006 Bug 1755094 - Use separate methods instead of onAutofill. r=owlish
This is a minor API fix wherby we call `onSessionStart`, `onNodeAdd` instead of
having a single `onAutofill` call that passes in the type of call. This aligns
the API with all our other delegates.

Note that because this API is normally implemented inside GeckoView itself,
we dont expect any action on embedders for this change.

Differential Revision: https://phabricator.services.mozilla.com/D143959
2022-05-17 01:34:43 +00:00
Agi Sferro 73a9c55b36 Bug 1756049 - Don't load GeckoViewWebExtension in child process. r=jonalmeida
I believe this was a mistake and never needed in the first place.

Differential Revision: https://phabricator.services.mozilla.com/D141976
2022-05-17 01:34:43 +00:00
Agi Sferro 8a9ef6fe70 Bug 1756049 - Migrate GeckoViewPrompter.jsm to actor. r=ohall,owlish
Differential Revision: https://phabricator.services.mozilla.com/D141973
2022-05-17 01:34:42 +00:00
Agi Sferro a2706c8d0a Bug 1756245 - Migrate GeckoViewMedia to actor. r=owlish
Differential Revision: https://phabricator.services.mozilla.com/D141688
2022-05-17 01:34:42 +00:00
Agi Sferro b1001aa17f Bug 1754607 - Adjust GeckoViewAutoFillChild for ActorDispatcher r=owlish
The test failure in the bug is failing because the eventDispatcher in the actor
was previously only available in the top-level-frame.

In addition to adjusting for ActorDispatcher, this patch also makes every actor
handle its own frame (rather than handling all the in-process children) which
simplifies the code a bit.

We also modify the test to use a third-party iframe so that the OOP iframe case
is covered.

Differential Revision: https://phabricator.services.mozilla.com/D141647
2022-05-17 01:34:42 +00:00
Agi Sferro 1eb595d476 Bug 1755541 - Migrate GeckoViewPermission to Actor. r=owlish
Differential Revision: https://phabricator.services.mozilla.com/D141646
2022-05-17 01:34:41 +00:00
Agi Sferro 9075fce1a8 Bug 1755094 - Adjust SelectionActionDelegate for ActorDispatcher. r=owlish
ActorDispatcher does not support receiving multiple callbacks for one message
so we need to change the strategy a little bit.

We need to centralize handling actions are each sequential ID is incremented
independently for each child, so it won't work for iframes.

To avoid this problem in the future, the sequential ID is no just a
randomly-generated UUID.

We also do all the checking on the parent process, so we don't need to check in
the child again whether we got a message that was out-of-date.

Differential Revision: https://phabricator.services.mozilla.com/D141645
2022-05-17 01:34:41 +00:00
Agi Sferro 6eae8d32fa Bug 1755094 - Implement ChildActorDispatcher. r=calu
The existing EventDispatcher messaging infrastracture uses cpmm (content
process message manager) which is deprecated and will be removed for Fission.

The current behavior with fission is that cpmm is available only on in-frame
frames, so on any oop frame we're not able to send or receive eventDispatcher
messages.

To allow OOP frames actors to send messages, this patch implements a new type
of dispatcher, called ChildActorDispatcher which routes messages through the
actor messaging system.

We then catch these messages on the parent actor side and send them to Java.

To be able to reroute messages from the Parent actor we need to make sure that
each actor that we define extends GeckoViewActorParent, so we define an actor
parent for each missing child actor.

In the future we could consider moving GeckoViewActorParent to a native
implementation for performance reasons.

Differential Revision: https://phabricator.services.mozilla.com/D139073
2022-05-17 01:34:40 +00:00
Molnar Sandor 18fcb78a92 Backed out 10 changesets (bug 1756245, bug 1756049, bug 1754607, bug 1755094, bug 1755541) for causing lint failure in eckoview/Autofill.java. CLOSED TREE
Backed out changeset a5a317b9336a (bug 1754607)
Backed out changeset 1023e45ecd5c (bug 1755094)
Backed out changeset a8dd33d43779 (bug 1755094)
Backed out changeset 18d8a147dcc7 (bug 1756049)
Backed out changeset 9699559151ef (bug 1756049)
Backed out changeset e3386e161d4a (bug 1756245)
Backed out changeset 2ee50ba56798 (bug 1754607)
Backed out changeset 7899080ec86a (bug 1755541)
Backed out changeset 7c9fba1576c5 (bug 1755094)
Backed out changeset fe2864aaa7ac (bug 1755094)
2022-05-17 01:14:15 +03:00
Cosmin Sabou 241f586c68 Merge mozilla-central to autoland. 2022-05-17 01:00:59 +03:00
Agi Sferro e7bcb30d1d Bug 1754607 - Make sure autofill session is reset after navigation. r=owlish
With Fission, `pageshow` and `pagehide` are not guaranteed to happen in order,
e.g. we might get the following order of events:

pageshow -- navigate to example.org
pageshow -- navigate to google.com
pagehide -- example.org is now hidden

which would break the previous assumption that we could rely on the order of
show and hide events.

To handle that, we keep track of the most-recent-added session and we assume
that that is the session bening displayed.

In the future, we might consider keeping state of all sessions until a
`pagehide` event for the specific session arrives.

Differential Revision: https://phabricator.services.mozilla.com/D143961
2022-05-16 21:52:55 +00:00
Agi Sferro 1bf387b593 Bug 1755094 - Make autofill tree immutable. r=owlish
Before this patch, the autofill tree was mutable, which makes it hard to follow
updates and reason about state.

This change makes the autofill tree immutable and adds a separate `HashMap` to
track mutable values like `value`, `callback`.

This change also modifies the way we track nodes internally, using exclusevely
the UUID of the node rather then the int autofill ID which is now only used at
the boundary of the Autofill API.

We also simplify the API by only providing the necessary information about the
node rather than the entire tree structure.

Differential Revision: https://phabricator.services.mozilla.com/D143960
2022-05-16 21:52:54 +00:00
Agi Sferro 45b9c67472 Bug 1755094 - Use separate methods instead of onAutofill. r=owlish
This is a minor API fix wherby we call `onSessionStart`, `onNodeAdd` instead of
having a single `onAutofill` call that passes in the type of call. This aligns
the API with all our other delegates.

Note that because this API is normally implemented inside GeckoView itself,
we dont expect any action on embedders for this change.

Differential Revision: https://phabricator.services.mozilla.com/D143959
2022-05-16 21:52:54 +00:00
Agi Sferro c17a53bf0d Bug 1756049 - Don't load GeckoViewWebExtension in child process. r=jonalmeida
I believe this was a mistake and never needed in the first place.

Differential Revision: https://phabricator.services.mozilla.com/D141976
2022-05-16 21:52:53 +00:00
Agi Sferro 134493c268 Bug 1756049 - Migrate GeckoViewPrompter.jsm to actor. r=ohall,owlish
Differential Revision: https://phabricator.services.mozilla.com/D141973
2022-05-16 21:52:53 +00:00
Agi Sferro fffdc8a3ab Bug 1756245 - Migrate GeckoViewMedia to actor. r=owlish
Differential Revision: https://phabricator.services.mozilla.com/D141688
2022-05-16 21:52:53 +00:00
Agi Sferro d16fbd366d Bug 1754607 - Adjust GeckoViewAutoFillChild for ActorDispatcher r=owlish
The test failure in the bug is failing because the eventDispatcher in the actor
was previously only available in the top-level-frame.

In addition to adjusting for ActorDispatcher, this patch also makes every actor
handle its own frame (rather than handling all the in-process children) which
simplifies the code a bit.

We also modify the test to use a third-party iframe so that the OOP iframe case
is covered.

Differential Revision: https://phabricator.services.mozilla.com/D141647
2022-05-16 21:52:52 +00:00
Agi Sferro a16703ec46 Bug 1755541 - Migrate GeckoViewPermission to Actor. r=owlish
Differential Revision: https://phabricator.services.mozilla.com/D141646
2022-05-16 21:52:52 +00:00
Agi Sferro 07fb9f95ee Bug 1755094 - Adjust SelectionActionDelegate for ActorDispatcher. r=owlish
ActorDispatcher does not support receiving multiple callbacks for one message
so we need to change the strategy a little bit.

We need to centralize handling actions are each sequential ID is incremented
independently for each child, so it won't work for iframes.

To avoid this problem in the future, the sequential ID is no just a
randomly-generated UUID.

We also do all the checking on the parent process, so we don't need to check in
the child again whether we got a message that was out-of-date.

Differential Revision: https://phabricator.services.mozilla.com/D141645
2022-05-16 21:52:51 +00:00
Agi Sferro fe75b477df Bug 1755094 - Implement ChildActorDispatcher. r=calu
The existing EventDispatcher messaging infrastracture uses cpmm (content
process message manager) which is deprecated and will be removed for Fission.

The current behavior with fission is that cpmm is available only on in-frame
frames, so on any oop frame we're not able to send or receive eventDispatcher
messages.

To allow OOP frames actors to send messages, this patch implements a new type
of dispatcher, called ChildActorDispatcher which routes messages through the
actor messaging system.

We then catch these messages on the parent actor side and send them to Java.

To be able to reroute messages from the Parent actor we need to make sure that
each actor that we define extends GeckoViewActorParent, so we define an actor
parent for each missing child actor.

In the future we could consider moving GeckoViewActorParent to a native
implementation for performance reasons.

Differential Revision: https://phabricator.services.mozilla.com/D139073
2022-05-16 21:52:51 +00:00
Nika Layzell 7d84828a9c Bug 1769332 - Generate XPCOM error code lists for Java, r=geckoview-reviewers,agi,calu
This allows us to replace a number of magic numbers in the
WebRequestError code with automatically generated constants which are
guaranteed to be kept up to date.

This build script is able to run early enough during the build step as
generated files which take a `.jinja` file as an argument are hard-coded
to be run during the pre-export phase for Android builds. As it is just
as simple python script with no other dependencies, this shouldn't
impact geckoview build performance even when using build artifacts.

Differential Revision: https://phabricator.services.mozilla.com/D146356
2022-05-16 18:01:19 +00:00
Csoregi Natalia e567185fa4 Backed out changeset a04e5744fe2e (bug 1758540) for causing bug 1769510. a=backout 2022-05-16 16:31:16 +03:00
Makoto Kato aab3cc4f12 Bug 1767556 - Don't remove composing state when composition is started from first character. r=geckoview-reviewers,agi
This occurs since newer GBoard's behaviour seems to be changed.

When `GeckoEditable` receives text change from Gecko, it is possible to remove
composing state if composition is started from first character.

If Gecko's text change by IME, we shouldn't reset text state in `onTextChange`.
`mCausedOnlyByComposition` means that this change is by IME.

Differential Revision: https://phabricator.services.mozilla.com/D146159
2022-05-15 07:27:48 +00:00
Eitan Isaacson 8bdda6281d Bug 1758540 - Pref on accessibility cache in Android. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D141638
2022-05-13 17:47:33 +00:00
Cathy Lu 28cd9302df Bug 1768776 - Fix intermittent priority tests to set the correct session's priority hint r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D146307
2022-05-13 16:13:02 +00:00
Eitan Isaacson 1ade6575f3 Bug 1505353 - Don't continue autofill test until iframe is fully loaded. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D146254
2022-05-13 05:02:06 +00:00
Butkovits Atila 7a67e8dc55 Backed out changeset 6bcd1b4dafaf (bug 1505353) for causing geckoview failures. CLOSED TREE 2022-05-13 04:52:21 +03:00