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
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
- 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
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
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
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
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
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
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
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
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
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
Added prompts to geckoview.js window to collect active prompts using the added
GeckoViewPrompterChild and GeckoViewPrompterParent.
Added a way to get and set the prompt message text, callback, and
accept prompt(), confirm(), and alert().
Changed confirm-different-origin-frame.sub.html.ini and
prompt-different-origin-frame.sub.html.ini to expect ERROR on
Android because the prior GeckoView test runner was dismissing or
canceling prompts automatically due to not having a prompt delegate.
Differential Revision: https://phabricator.services.mozilla.com/D133927
When using Android with physical keyboard, IME's candidate window is sometimes
misplaced. Some IME/keyboards require insertion marker location to set IME's
candidate window position.
So we should set it from caret rectangle.
Differential Revision: https://phabricator.services.mozilla.com/D141931
The GeckoView ext-browserAction.js and ext-pageAction.js seems to not be fully providing
the browserActionFor/pageActionFor internal global helpers that their Desktop counterparts
are defining.
Technically this shouldn't be triggering any issue at the moment, because at the moment
it seems only used for the commands API (and also internally by the menu API apparently),
which are both not currently provided in GeckoView builds.
Anyway, it seems that they were still intented to be provided, because browserAction
does have it but incomplete version (whereas pageAction none at all).
It may be reasonable to move this in its own separate bugzilla issue, but in the meantime
I wanted to be sure to don't forget about it and so I'm attaching as a separate patch
in this set of changes for the two browserAction/pageAction APIs.
Depends on D141664
Differential Revision: https://phabricator.services.mozilla.com/D141666
At this point, no code in mozilla-central references these.
In comms-central, the string is still used, but provided there
by local brand.properties and brand.dtd files.
Depends on D141860
Differential Revision: https://phabricator.services.mozilla.com/D141861
This is helpful when looking at logs from fenix in automation to answer
questions like, did the profiler start? Did it finish or did it crash before
then? Did it record any samples?
We had to add this logging temporarily to debug a test failure and it seemed
non-intrusive enough that we could keep it around long term.
Differential Revision: https://phabricator.services.mozilla.com/D141704
Added "prompts" to geckoview.js window to collect active prompts using the added
GeckoViewPrompterChild and GeckoViewPrompterParent.
Added a way to get and set the prompt message text, callback, and
accept prompt(), confirm(), and alert().
Differential Revision: https://phabricator.services.mozilla.com/D133927