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

27100 Коммитов

Автор SHA1 Сообщение Дата
James Teh 7d2201e688 Bug 1192108: Fire focus events after mutation events but before any other events. r=eeejay
It's critical that we fire mutation events first because our RemoteAccessible tree is created thus and we can't fire events on RemoteAccessibles we haven't created yet.
Beyond that, though, focus events are of primary importance.
See the comments in EventQueue::ProcessEventQueue for the reasons.

Differential Revision: https://phabricator.services.mozilla.com/D145319
2022-05-06 23:59:43 +00:00
Agi Sferro 193f955e0b Bug 1766456 - Remove unneeded reference to ContentPrefServiceParent. r=owlish
This code loads automatically as an actor now, so we don't need to register the
module anymore.

Work for this was done in Bug 1645538.

Differential Revision: https://phabricator.services.mozilla.com/D145639
2022-05-06 18:31:12 +00:00
Agi Sferro 2e645c946e Bug 1768101 - Add process priority test for Android. r=calu
Adding some smoke tests so that we don't regress this feature, additional tests
for fission and for a currently broken case will be addressed later.

Differential Revision: https://phabricator.services.mozilla.com/D145476
2022-05-06 00:34:38 +00:00
Agi Sferro aa0268cf47 Bug 1755094 - Add ShouldContinue to wait for an arbitrary condition. r=owlish
This allows waiting for an arbitrary condition in `waitUntilCalled`. To make
this happen, we need to execute delegate calls as they happen, rather than
replaying them all at the end, this is why we need to change a little bit more
code than expected in GeckoSessionTestRule.

This also fixes some weird behavior when calling `waitUntilCalled` while
waiting on a condition that depends on the behavior of the delegate in
`waitUntilCalled`.

Differential Revision: https://phabricator.services.mozilla.com/D143958
2022-05-05 21:33:15 +00:00
Agi Sferro fb4d7ff61c Bug 1767058 - Actually deprecate onLocationChange(2) r=ohall,calu
Differential Revision: https://phabricator.services.mozilla.com/D145120
2022-05-05 21:33:15 +00:00
Eitan Isaacson 239896a063 Bug 1765433 - P2: Add AccessibilityNodeInfo population methods. r=Jamie
We cannot use GeckoBundle anymore because it cannot be constructed in
the UI thread. Instead, have a set of populate methods that take
arguments and set the correct fields in the AccessibilityNodeInfo, or
its optional info objects.

These fields can be called both in the Gecko and UI thread.

Differential Revision: https://phabricator.services.mozilla.com/D144895
2022-05-04 18:00:47 +00:00
Eitan Isaacson 920578753f Bug 1765433 - P1: Add android tests for about pages. r=Jamie,geckoview-reviewers,jonalmeida
About pages run in the parent process. In the following patches we will
be performing some operations like pivot and getting node info in the
Android UI thread. We need to assure that "local" content still works
by calling into the gecko thread since we can't use the remote,
thread-safe cache.

Differential Revision: https://phabricator.services.mozilla.com/D144894
2022-05-04 18:00:46 +00:00
Mathew Hodson 718f846723 Bug 1692217 - Remove `ChromeUtils.import` with `this` in SessionStateAggregator.js. r=agi
Differential Revision: https://phabricator.services.mozilla.com/D142757
2022-05-04 09:13:23 +00:00
Makoto Kato 4751fd1ea9 Bug 1499635 - Add step attribute value to DateTimePrompt. r=geckoview-reviewers,agi,calu
We should add stepValue to DateTimePrompt to support step attribute such as
`<input type="date" step="10">` etc in GeckoView.

Also, we don't have any tests for max/min attribute, so we should add it too.

Differential Revision: https://phabricator.services.mozilla.com/D145221
2022-05-04 07:26:20 +00:00
Jan Varga 5d8d47cb71 Bug 1764696 - Adjust some tests for new pref; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D143689
2022-05-04 04:35:15 +00:00
Doug Thayer 04d1c8fd1e Bug 1756823 - Replace ConsoleAPIStorage observer calls with js array r=nchevobbe,webdriver-reviewers,geckoview-reviewers,agi,jdescottes
See the comment in the file explaining it. For a case of logging 100k numbers,
this dropped the time per number from 15 microseconds to 9 with the console
closed, and 55 microseconds to 38 with the console open. I think we could shave
off more with a native approach, but I don't know that it's worth it and it's
much more likely for that to introduce bugs.

Differential Revision: https://phabricator.services.mozilla.com/D143782
2022-05-03 17:21:59 +00:00
Tooru Fujisawa f99d290cca Bug 1765167 - Part 7: Stop using Cu.import in mobile/. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D144100
2022-05-03 06:32:31 +00:00
Tooru Fujisawa 4815c7ac6b Bug 1765156 - Part 8: Use SpecialPowers.ChromeUtils.import in mobile/. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D144089
2022-05-03 06:32:27 +00:00
Makoto Kato 4fbd9a8572 Bug 1767232 - Add more prompt tests for input type=date/month. r=geckoview-reviewers,agi
Originally, `dateTest` was added by bug 1499396. But it was still disabled.

We should add prompt tests when tapping `<input>` element. Also, since
`type=month` is GeckoView only support, we need it too.

Differential Revision: https://phabricator.services.mozilla.com/D145218
2022-05-03 01:29:22 +00:00
Cathy Lu 3b90b13153 Bug 1601420 - Implement permissions.request/optional web extension permissions for geckoview r=geckoview-reviewers,agi,robwu
The general idea is that when extensions are installed at startup, they request permissions needed. Some examples of permissions might be access to downloads or bookmarks. This patch implements the ability to request permissions after install during runtime. A common optional permission is geolocation. The app won't request the user's location until needed.

GeckoView will provide a delegate to apps called onOptionalPrompt that provides the extension and the permissions the extension is requesting. They can then query the user to accept or reject the permission. The delegate works by listening to the browser API browser.permissions.request. Any browser API will be linked to a corresponding file and function such as ext-permissions.js::request() in this example. request() notifies observers of the topic webextension-optional-permission-prompt. ExtensionPromptObserver listens to that topic and dispatches an event GeckoView:WebExtension:OptionalPrompt. The geckoview web extension controller listens on that event and pass the extension and permissions to the skeleton delegate functions, that will get implemented by the app.

To verify this works, the test case WebExtensionTest.kt installs an extension through the package xpi. The package is created on build from moz.build to contain the extension's manifest.json and necessary scripts. Once the extension package is installed, we load the html script in the package that states when the page is clicked, trigger the browser API browser.permissions.request. The click is simulated with synthesizeTap. This request is then observed by listeners like mentioned in the previous paragraph. We verify in our skeleton delegate that the permissions provided match the ones requested.

Differential Revision: https://phabricator.services.mozilla.com/D143925
2022-05-02 19:45:39 +00:00
Tim Giles 0f7e6a5e25 Bug 1764709 - Always normalize credit card expiration month and year when creating a new record. r=geckoview-reviewers,dimi,sgalich,agi
Differential Revision: https://phabricator.services.mozilla.com/D144055
2022-05-02 18:18:39 +00:00
Makoto Kato 34944ac4bd Bug 1757031 - Don't restore previous viewport when window size isn't same. r=emilio
Fenix's Picture-In-Picture uses full screen mode. So it isn't same as Firefox
Desktop. When exiting full screen, Fenix's window may not same as before
entering full screen.

When this occurs,

1. When device is portrait orientation, user changes to full screen by content
   script.
2. Fenix enters to full screen then orientation is changed to landscape.
3. User changes that device is changed to landscape by hand.
4. Fenix enters PiP mode. Android (Home screen) change to portrait orientation.
   Then PiP window keeps landscape orientation.
5. When exiting PiP, full screen will be exited.
6. Device is landscape (by Step 3.), so Fenix window is landscape. But Gecko
   restores 1.'s viewport by `nsIDOMWindowUtils.exitFullScreen`. So viewport
   becomes portrait orientation size even if window is landscape orientation.

For PiP mode, although nsIDOMWindowUtils.exitFullScreen is used, it doesn't
consider this situation. So I would like to add non-restore option for it.

Differential Revision: https://phabricator.services.mozilla.com/D143992
2022-05-02 13:00:39 +00:00
Emilio Cobos Álvarez c808d42538 Bug 1766110 - Try to avoid intermittent race in PromptDelegateTest. r=agi
Differential Revision: https://phabricator.services.mozilla.com/D144707
2022-04-27 18:42:42 +00:00
Butkovits Atila 95691e9784 Bug 1766322 - Lint fix. r=fix. CLOSED TREE 2022-04-27 20:45:18 +03:00
Cathy Lu 1d8822e53e Bug 1766322 - Check browser.frameLoader for tab prioritization r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D144844
2022-04-27 17:17:53 +00:00
Emilio Cobos Álvarez f65f5da5fc Bug 1766395 - Don't use click event to show date/time/datetime-local input. r=agi
MozShowDateTimePicker should be enough for this. We keep using click for
week / month because those don't implement a widget cross-platform.

Differential Revision: https://phabricator.services.mozilla.com/D144801
2022-04-27 16:27:56 +00:00
Molnar Sandor fe42240a8a Backed out changeset 360f31b00167 (bug 1764709) for causing bc failures in browser_creditCard_submission_normalized. CLOSED TREE 2022-04-27 07:46:31 +03:00
Tim Giles 85c6184467 Bug 1764709 - Always normalize credit card expiration month and year when creating a new record. r=geckoview-reviewers,dimi,sgalich,agi
Differential Revision: https://phabricator.services.mozilla.com/D144055
2022-04-26 21:53:17 +00:00
Henrik Skupin 72eb782161 Bug 1759169 - [remote] Initialize the Remote Agent before the first top-level window has been opened. r=webdriver-reviewers,geckoview-reviewers,jdescottes,agi,mossop
Differential Revision: https://phabricator.services.mozilla.com/D143380
2022-04-25 17:20:43 +00:00
Emilio Cobos Álvarez e26a90f061 Bug 1764157 - Make showPicker() for date/time/etc work on Android. r=agi
Differential Revision: https://phabricator.services.mozilla.com/D143584
2022-04-23 10:23:16 +00:00
Eitan Isaacson 0303e6facd Bug 1765653 - Test tree structure in a11y iframe tree tests. r=Jamie,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D144236
2022-04-22 18:32:24 +00:00
Makoto Kato d65219d10b Bug 1765072 - Use original reason member to handle Magnifying glass. r=geckoview-reviewers,agi
This is simple mistake. I should use original aEvent.reason to handle
magnifying glass instead.

Differential Revision: https://phabricator.services.mozilla.com/D143897
2022-04-19 02:57:06 +00:00
Makoto Kato e464c056d3 Bug 1765121 - Add GeckoBundle.getRectF. r=geckoview-reviewers,agi
Since I would like to pass CSS client rect in bug 1510450 etc, I would like to
add `GeckoBundle.getRectF` and use it.

Differential Revision: https://phabricator.services.mozilla.com/D143898
2022-04-19 02:41:02 +00:00
Jamie Nicol 9849a83f64 Bug 1762424 - Provide SurfaceControl to compositor and render in to child Surface. r=agi,gfx-reviewers,geckoview-reviewers,jrmuizel,owlish
This adds new version of the GeckoView API
GeckoDisplay.surfaceChanged(), which takes a single argument of a new
type GeckoDisplay.SurfaceInfo. As well as containing fields for each
the the existing surfaceChanged() arguments, this has an additional
SurfaceControl field. This must be provided when rendering in to a
SurfaceView on SDK level 29 or greater. On earlier SDK levels, or when
rendering in to a TextureView or SurfaceTexture, this can be
null. SurfaceViewWrapper and GeckoView classes are updated to handle
this correctly. The old surfaceChanged() methods have been deprecated,
and tests have been updated to use the new version.

When provided, the SurfaceControl is passed along with the Surface
through to the widget and, when enabled, over to the GPU process. The
compositor widget then creates a child Surface from that
SurfaceControl, and renders in to that child Surface rather than the
parent one.

This works around a bug on Android 12 where following the GPU process
dying the Surface was left in an unusable state, meaning subsequent
attempts to initialize a compositor would fail. Because the Surface is
now created by the GPU process it gets destroyed when the process
dies, therefore a new Surface can successfully be created when we
reinitialize the compositor.

Differential Revision: https://phabricator.services.mozilla.com/D143485
2022-04-18 18:11:07 +00:00
Jamie Nicol 366dbce5af Bug 1762424 - Generate SDK bindings for android.view.SurfaceControl. r=agi
And android.view.SurfaceControl$Transaction.

In order to generate these bindings we must increase the maximum SDK
version argument we pass to SDKProcessor to 29. However, doing so
means that we now attempt to generate bindings for both Surface's
Surface(SurfaceTexture) and Surface(SurfaceControl)
constructors. These both translate in to C++ functions with identical
signatures - Surface::New(jni::Object::Param) - causing a compilation
failure.

This patch therefore also allows the stubName property to override
constructor names, and overrides the latter to
Surface::FromSurfaceControl(), thereby avoiding the conflict.

Differential Revision: https://phabricator.services.mozilla.com/D143484
2022-04-18 18:11:07 +00:00
Rob Wu cda568340e Bug 1764566 - Update API availability in MV3 r=mixedpuppy
- Remove unsupported tabs API definitions that are gone in MV3.
- Mark content script APIs (superseded by scripting APIs) as MV2-only.
- Re-enable extension.getBackgroundPage in MV2 since it makes sense with
  event pages, and we enabled runtime.getBackgroundPage in bug 1759308.
- Add tests that verify API availability in MV3.

Differential Revision: https://phabricator.services.mozilla.com/D143721
2022-04-17 16:43:50 +00:00
Dimi 9887ecb7a4 Bug 1763805 - Convert cc-exp-month and cc-exp-year to string before passing to GeckoView r=sgalich,tgiles,geckoview-reviewers,agi
GeckoView expects string for "cc-exp-month" and "cc-exp-year", however, the `createNormalizedRecord`
method added in bug 1760834 while submitting a cc form, might change the value from string to number.

Differential Revision: https://phabricator.services.mozilla.com/D143535
2022-04-14 19:02:06 +00:00
mleclair 707fb0dd64 Bug 1666226 - Add GeckoView APIs for starting and stopping the Gecko profiler r=geckoview-reviewers,mstange,agi
***

Differential Revision: https://phabricator.services.mozilla.com/D133404
2022-04-13 23:26:45 +00:00
Hiroyuki Ikezoe 64b87a50a6 Bug 1610815 - Implement new {small,large,dynamic} viewport units. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D143252
2022-04-12 04:06:38 +00:00
Hiroyuki Ikezoe 48dcc8e143 Bug 1734261 - Use NSCoordSaturatingAdd only for nsSize. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D143020
2022-04-11 23:11:36 +00:00
Makoto Kato 8abdcc7d3e Bug 1639087 - Add Magnifying glass support in GeckoView. r=geckoview-reviewers,agi,owlish
Android P+ supports magnify glass and Chrome already supports it.

When accessible caret events are fired for pressing or dragging it, we show
Android's magnifying glass.

Differential Revision: https://phabricator.services.mozilla.com/D137966
2022-04-08 05:11:49 +00:00
Jamie Nicol cee8f98714 Bug 1763392 - Generate SDK bindings for nested Java classes as nested C++ classes. r=agi,media-playback-reviewers,bryce
For example, the SDK class android.media.MediaDrm$KeyStatus will now
be defined as MediaDrm::KeyStatus rather than just KeyStatus.

Not only does this avoid polluting the top-level namespace, but it
also avoids a bug where invalid type names were generated if the
nested class contains a method with a parameter or return of the outer
class' type.

Differential Revision: https://phabricator.services.mozilla.com/D143043
2022-04-07 11:12:20 +00:00
Olivia Hall 5337352bf0 Bug 1762543 - Race Condition When Dismissing a GeckoView Prompt in Marionette r=geckoview-reviewers,agi,webdriver-reviewers,whimboo
Added _dismissUi() to GeckoViewPrompter.jsm to send the request to
dismiss the prompt UI. Updated dismiss() to answer the callback to
close the prompt directly and seperatly dismiss the prompt UI.

Removed element_send_keys/user_prompts.py.ini and
tests/perform_actions/user_prompts.py.ini due to resolving the issue that
was causing failures.

Differential Revision: https://phabricator.services.mozilla.com/D142729
2022-04-06 13:08:03 +00:00
Kagami Sascha Rosylight 1409f37ca3 Bug 1703953 - Part 2: Apply mozilla/use-isInstance rules for .jsm files r=webdriver-reviewers,pip-reviewers,mhowell,Gijs,whimboo
This replaces all `instanceof` uses for DOM interfaces, since the operator in priviliged context works same as .isInstance().

Differential Revision: https://phabricator.services.mozilla.com/D141785
2022-04-06 11:57:57 +00:00
Agi Sferro 96e2850c86 Bug 1763022 - Remove deprecated APIs. r=calu
Differential Revision: https://phabricator.services.mozilla.com/D142902
2022-04-05 18:51:05 +00:00
Butkovits Atila 5efc37c22e Backed out changeset 25a2b9b2e120 (bug 1763022) for causing build bustages. CLOSED TREE 2022-04-05 19:15:59 +03:00
Agi Sferro 008fd9bc6b Bug 1763022 - Remove deprecated APIs. r=calu
Differential Revision: https://phabricator.services.mozilla.com/D142902
2022-04-05 15:52:03 +00:00
Tim Giles d90a4a9341 Bug 1758369 - Ensure credit card number has no whitespaces or dashes before trying to match type. r=dimi,sgalich,geckoview-reviewers,agi
This fixes the cases where a website modifies the credit card number after it has been filled.

Differential Revision: https://phabricator.services.mozilla.com/D140858
2022-04-05 15:46:02 +00:00
Emilio Cobos Álvarez a18fdda05d Bug 1762298 - GCC build bustage and reftest fixes.
MANUAL PUSH: Orange fix CLOSED TREE
2022-04-04 22:14:24 +02:00
Cathy Lu b5b91ffc69 Bug 1753700 - Add priorityHint to allow apps to increase process priority for background tabs r=geckoview-reviewers,mccr8,agi
Prior behavior for active tabs in an inactive app would have the process priority oom score of 15. Now it's set to a higher priority oom score of 11. This will increase priority for recently used tabs on apps and prevent Android from unloading them.

Differential Revision: https://phabricator.services.mozilla.com/D142386
2022-04-04 17:41:37 +00:00
Jesse Schwartzentruber f9c193f69c Bug 1762278 - Fix Geckoview wrap.sh for debugging with API 29+ r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D142497
2022-03-30 22:24:18 +00:00
Ryan VanderMeulen 9e6651225a Backed out changeset d7b31fe38fc7 (bug 1758540) for causing Fenix UI test issues. 2022-03-30 13:40:04 -04:00
Eitan Isaacson 9ad7f135df Bug 1758540 - Pref on accessibility cache in Android. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D141638
2022-03-29 20:12:25 +00:00
Agi Sferro 5130041f1c Bug 1759893 - Implement Parcelable for WebNotification. r=jonalmeida
Apps want to persist a WebNotification so that they can respond to taps on it
when the app is not alive anymore.

To achive this, we make WebNotification serializable through Parcel so that the
app can store it somewhere.

Differential Revision: https://phabricator.services.mozilla.com/D141406
2022-03-29 16:37:41 +00:00
Agi Sferro 1115e11b14 Bug 1759588 - Allow passing a closed session in ServiceWorkerDelegate::onNewWindow. r=calu
This is an API weirdness. ServiceWorkerDelegate::onNewWindow requires a closed
session and NavigationDelegate::onNewSession requires an open session, even
though they pretty much do the same thing (and we do expect embedders to
implement them the same way).

This patch allows embedders to pass a closed session to onNewWindow so that
they can re-use the implementation of onNewSession.

Differential Revision: https://phabricator.services.mozilla.com/D141405
2022-03-29 16:36:50 +00:00