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

31084 Коммитов

Автор SHA1 Сообщение Дата
Makoto Kato e3ff6e435d Bug 1701234 - Add more null check on the background thread. r=geckoview-reviewers,agi
Even if landing bug 1697683, this NullPointerException occurs on the
background thread. So I would like to add more null check for this crash.

Differential Revision: https://phabricator.services.mozilla.com/D132329
2021-11-30 04:29:09 +00:00
Makoto Kato 3b892800d0 Bug 1743354 - Considering SecurityException by calling coerceToText(). r=geckoview-reviewers,agi
`ClipData.Item.coerceToText` seems to be possible to throws SecurityException,
so we have to consider this situation.

Differential Revision: https://phabricator.services.mozilla.com/D132337
2021-11-30 00:21:52 +00:00
Jamie Nicol a9dd0d2943 Bug 1741156 - Initial GPU process implementation on Android. r=aosmond,agi
Declare a GPU process and corresponding Service in the
AndroidManifest. This is of a new class GeckoServiceGpuProcess which
inherits from GeckoServiceChildProcess, and provides a binder
interface ICompositorSurfaceManager which allows the parent process to
set the compositor Surface for a given widget ID, and the compositor
in the GPU process to look up the Surface for a widget ID. The
ICompositorSurfaceManager interface is exposed to the parent process
through a new method getCompositorSurfaceManager() in the
IChildProcess interface.

Add a new connection type for GPU processes to GeckoProcessManager,
along with a function to look up the GPU process connection and fetch
the ICompositorSurfaceManager binder. When the GPU process is launched
we store the returned binder in the GPUProcessHost, and when each
widget's compositor is created we store a reference to the binder in
the UiCompositorControllerChild.

Each nsWindow is given a unique ID, and whenever the Surface changes
due to an Android resume event, it sends the new surface for that ID
to the GPU process (if enabled) by calling
ICompositorSurfaceManager.onSurfaceChanged().

Stop inheriting AndroidCompositorWidget from InProcessCompositorWidget
and instead inherit from CompositorWidget directly. This class holds a
reference to the Surface that will be rendered in to. The
CompositorBridgeParent notifies the CompositorWidget whenever it has
been resumed, allowing it to fetch the new Surface. For the
cross-process CompositorWidgetParent implementation it fetches that
Surface from the CompositorSurfaceManagerService, whereas the
InProcessAndroidCompositorWidget can read it directly from the real
widget.

AndroidCompositorWidget::GetClientSize() can now calculate its size
from the Surface, rather than racily reading the value from the
nsWindow. This means RenderCompositorEGL and RenderCompositorOGLSWGL
can now use GetClientSize() again rather than querying their own size
from the Surface.

With this patch, setting layers.gpu-process.enabled to true will cause
us to launch a GPU process and render from it. We do not yet
gracefully recover from a GPU process crash, nor can we render
anything using SurfaceTextures (eg video or webgl). Those will come in
future patches.

Differential Revision: https://phabricator.services.mozilla.com/D131231
2021-11-29 20:52:31 +00:00
Christoph Kerschbaumer 0e7cd4d730 Bug 1742941: Update tests wtihin mobile/android/ to work with https-first enabled r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D132154
2021-11-29 18:06:32 +00:00
cschanaj cf4639f5bd Bug 1632568 - Use `Arrays.hashCode` insteads of custom `hashCode` implementation r=agi
There is a few spots where a custom `hashCode` implementation is being used.
This PR replaces them with `Objects.hash`

Differential Revision: https://phabricator.services.mozilla.com/D121481
2021-11-23 21:01:57 +00:00
Jonathan Almeida [:jonalmeida] 9503390f00 Bug 1680332 - Use createContentPrincipalFromOrigin to split scopeAndPrincipal r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D131801
2021-11-23 17:01:56 +00:00
Makoto Kato b0c8748fa0 Bug 1510667 - Performance Warning: Should use valueOf instead of new. r=geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D131753
2021-11-23 06:47:44 +00:00
Shane Caraveo 5f84116fa5 Bug 1740634 fix anchor link in changelog r=agi
Differential Revision: https://phabricator.services.mozilla.com/D131804
2021-11-22 18:11:45 +00:00
Eemeli Aro 368a8a1650 Bug 1733495 - Migrate plugins.properties to aboutPlugins.ftl. r=Gijs,fluent-reviewers,nbaumgardner,kpatenio
This is the first patch made using the properties-to-ftl tooling:
https://github.com/mozilla/properties-to-ftl

Differential Revision: https://phabricator.services.mozilla.com/D130984
2021-11-22 09:16:25 +00:00
Makoto Kato 5fd81c7a81 Bug 1740414 - Support "Paste as plain text" on Android O+. r=geckoview-reviewers,agi,calu
Android O supports "Paste as plain text" in text toolbar. This is already
supported in Blink.

This change contains geckoview-junit test for this feature, but our taskcluster
job runs on Android 7, so this isn't run. (I verified this on my Android 8
emulator image).

Differential Revision: https://phabricator.services.mozilla.com/D131383
2021-11-22 03:35:33 +00:00
Shane Caraveo 4b5bda15cb Bug 1740634: Add install_domain failure panel text r=rpl,agi,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D131028
2021-11-17 23:23:56 +00:00
Julian Descottes 2e9e1cc305 Bug 1741369 - [devtools] Update paths to loader files outside devtools/ r=perftest-reviewers,preferences-reviewers,sparky,Gijs
Depends on D131217

Differential Revision: https://phabricator.services.mozilla.com/D131218
2021-11-17 12:43:27 +00:00
Makoto Kato 7f3e52cd43 Bug 1741312 - Set reversed selection from selection cache. r=geckoview-reviewers,agi
This is a regression of bug 1724811.

I should consider that selection order is reversed when fixing bug 1724811.

Differential Revision: https://phabricator.services.mozilla.com/D131196
2021-11-17 02:32:45 +00:00
Sylvestre Ledru 1df999712f Bug 1714788 - doc: do not provide the language if the code isn't valid r=firefox-source-docs-reviewers,championshuttler DONTBUILD
Otherwise, the warning is displayed:
```
WARNING: Could not lex literal_block as "json". Highlighting skipped.
```

Depends on D131092

Differential Revision: https://phabricator.services.mozilla.com/D131093
2021-11-16 07:59:48 +00:00
Sylvestre Ledru 2c055de75d Bug 1714788 - doc: Add a missing image r=firefox-source-docs-reviewers,championshuttler DONTBUILD
Depends on D131089

Differential Revision: https://phabricator.services.mozilla.com/D131090
2021-11-16 07:59:46 +00:00
Agi Sferro 4fb0467b73 Bug 1735786 - Fix GeckoView tests for https-first. r=calu
Differential Revision: https://phabricator.services.mozilla.com/D131014
2021-11-15 15:49:21 +00:00
Makoto Kato 44f94fa3e3 Bug 1630119 - Set initial text and selection correctly on sendDummyKeyboardEvent. r=geckoview-reviewers,owlish
This test is rarely failure when initial text and selection correctly. Because
we don't wait for setting initial data, or it is text is too short to update
text.

So I re-write this tests. And also, this has typo fix for test name.

Differential Revision: https://phabricator.services.mozilla.com/D131048
2021-11-15 02:14:41 +00:00
Emilio Cobos Álvarez 4456ebd295 Bug 1737131 - Enable more async stacks in webextension tests. r=extension-reviewers,zombie
This made debugging this a bit more tractable.

Differential Revision: https://phabricator.services.mozilla.com/D131076
2021-11-14 12:34:35 +00:00
Makoto Kato 2ccc290bd7 Bug 1637416 - Don't use selectionchange event sinec this isn't fired expectedly. r=geckoview-reviewers,agi
We use seelectionchange event to wait selection is set correctly, it isn't
rarely fired according to test failure of this test.

So I use other way (using key operation) to set selection.

Differential Revision: https://phabricator.services.mozilla.com/D130821
2021-11-11 02:24:36 +00:00
Agi Sferro 9c6be8a1c5 Bug 1739701 - Add support for the arm64 Android emulator. r=gbrown,calu
My understanding is that this is the only version of the emulator that is
supported on Apple silicon.

Differential Revision: https://phabricator.services.mozilla.com/D130510
2021-11-09 21:47:25 +00:00
Rob Wu 10c78cd36d Bug 1739746 - Restrict nativeMessaging to privileged extensions on Android r=agi,zombie,extension-reviewers
Make nativeMessaging a privileged permission on Android, to hide the
connectNative/sendNativeMessage APIs from non-builtin add-ons,
and to avoid the permission warning on regular extensions (where the API
is unavailable).

Add unit tests to get coverage on the availability and behavior of the
native messaging APIs on Android, since we did not have any yet.

And fix a small serialization issue in ExtensionParent.jsm

Differential Revision: https://phabricator.services.mozilla.com/D130529
2021-11-09 16:49:28 +00:00
Olivia Hall 71323994b5 Bug 1682599 - Check if media URL is valid before returning it to onContextMenu. r=geckoview-reviewers,agi
Added a check to see if the media blob URL was valid and could be downloaded.
Added a few general unit tests for ContentDelegateChild.

Differential Revision: https://phabricator.services.mozilla.com/D129859
2021-11-05 17:20:36 +00:00
Dimi 1170d5bd99 Bug 1729640 - P3. Notify event when a form with password is submitted r=sfoster,tgiles,geckoview-reviewers,agi
Notify "passwordmgr-form-submission-detected" when a form with password
is submitted.
The event should be notified regardless of whether the password manager
decides to show the doorhanger or not. To support this, this patch
also refactors _maybeSendFormInteractionMessage function to distinguish
"onFormSubmit" event and "showDoorhanger" event.

Differential Revision: https://phabricator.services.mozilla.com/D127104
2021-11-05 17:11:31 +00:00
Agi Sferro 426b9a2fd8 Bug 1717506 - Re-enable autofillNavigation. r=owlish
There is a potential intermittent where we try to execute javascript in the
page before the page navigates away, causing a hang. To ensure that that is not
possible we also wait for a PageStop event.

Differential Revision: https://phabricator.services.mozilla.com/D130377
2021-11-05 15:58:54 +00:00
Agi Sferro 175a5c05ff Bug 1717506 - Handle out-of-order page{hide,show}. r=owlish
With Fission BFCache, when navigating back the two pages might run in different
processes, even though they belong to the same domain.

This means that `pagehide` and `pageshow` might come out of order. For example,
navigating from `a.html` to `b.html` and back, we might get

```
pageshow b.html
pageshow a.html
pagehide b.html
```

notice we get the `pageshow` event for `a.html` _before_ the `pagehide` event
for `b.html`.

Internally in our test framework, we use `pagehide` and `pageshow` to establish
a connection between a page and the Java layer through a WebExtension port.

Before this patch, we assumed tha all `pageshow` events will match a `pagehide`
event in order, and thus disconnect the port early for `a.html` when getting
the event for `b.html` in the above example.

There is also a separate problem where if a port was established for a given
web page and then a navigation was issued, we would hang waiting for a response
from the page that navigated away (and thus, we would not be able to send
messages anymore).

To fix both of these issues, we keep track of all pending messages and discard
them properly when a Port is disconnected, and make sure that the port that's
disconnecting matches the one that's currently associated with the session (to
ensure that we are not disconnecting because of a out-of-order port event).

Differential Revision: https://phabricator.services.mozilla.com/D130376
2021-11-05 15:58:54 +00:00
Csoregi Natalia d2f8488b6a Backed out 7 changesets (bug 1729640) for causing permafailures on browser_web_process_isolation.js. a=backout
Backed out changeset 5b2a1799ce4e (bug 1729640)
Backed out changeset fcd4b833ad73 (bug 1729640)
Backed out changeset 5ff8d3adc6eb (bug 1729640)
Backed out changeset b8fd0343ca42 (bug 1729640)
Backed out changeset fbd6928e34ef (bug 1729640)
Backed out changeset 4ce2eebab0c4 (bug 1729640)
Backed out changeset c7c50c85f911 (bug 1729640)
2021-11-04 23:44:26 +02:00
Dimi c6f5d58bfb Bug 1729640 - P3. Notify event when a form with password is submitted r=sfoster,tgiles,geckoview-reviewers,agi
Notify "passwordmgr-form-submission-detected" when a form with password
is submitted.
The event should be notified regardless of whether the password manager
decides to show the doorhanger or not. To support this, this patch
also refactors _maybeSendFormInteractionMessage function to distinguish
"onFormSubmit" event and "showDoorhanger" event.

Differential Revision: https://phabricator.services.mozilla.com/D127104
2021-11-04 11:17:03 +00:00
owlishDeveloper dd9d805fa5 Bug 1699845 - Remove cleanup code for app_tmpdir r=geckoview-reviewers,agi,calu
Differential Revision: https://phabricator.services.mozilla.com/D130123
2021-11-02 19:37:33 +00:00
Agi Sferro d4e0174d2c Bug 1529082 - Use bundletool to install apps as aab packages. r=ahal,owlish
This patch adds a new command line argument --aab which allows users to install
GVE as an AAB.

This will also be used in a future patch to install the test runner as AAB.

Differential Revision: https://phabricator.services.mozilla.com/D127323
2021-11-02 18:56:28 +00:00
Agi Sferro dccddb81bc Bug 1529082 - Move TestRunnerActivity to test_runner. r=ahal,owlish
The fact that the test runner app is defined inside the geckoview test package
has always felt like a hack to me. I've mistakenly thought that
TestRunnerActivity was used in GeckoView's junit tests many times (even though
that's not the case).

From what I can see, there's no way to generate an AAB package for androidTest,
so to be able to run Gecko tests as AAB we finally need to define the
TestRunner as an ordinary package instead.

Differential Revision: https://phabricator.services.mozilla.com/D127320
2021-11-02 18:56:26 +00:00
Agi Sferro 088243109c Bug 1529082 - Locate lib folder within the APK. r=owlish
Before this patch, we would load mozglue using the unqualified
`System.loadLibrary("mozglue")` and then we would try to load all the other
native libraries from the path returned from `nativeLibraryDir`.

Note that since the path is unqualified, we might end up loading a library
that's not inside the APK, potentially a malicious one.

Android App Bundles (or AAB) is a new feature of Android where apps can be
split in multiple APKs (called "splits"). Each APK split contains a functinal
part of the app, e.g. a specific resolution asset folder, all the native
libraries for one CPU architecture etc.

For AAB, `nativeLibraryDir` returns an empty folder as the libraries are
stored, uncompressed, inside one of the APK splits, so GeckoView fails to load
libxul and other libraries when starting up.

The current code also doesn't work for any case where `System.loadLibrary`
fails to load mozglue (we do have code that accounts for that, but I'm not sure
how much of it is funcitonal).

To fix that, we locate the mozglue using code ported from Chromium and use that
to locate all the other native libraries.

Note this still doesn't fix the problem of loading an unqualified mozglue
library, but there's not a lot we can do about that right now (and that's not a
new problem, so we can address it in a separate patch).

Differential Revision: https://phabricator.services.mozilla.com/D122909
2021-11-02 18:56:25 +00:00
Agi Sferro 4d6d26edcd Bug 1736433 - Close File Descriptors when disconnecting from a busy service. r=calu,owlish
Failing to close the File Descriptors causes a shutdown hang, as the main
process is not able to detect when the child process dies because we're leaking
the File Descriptors.

Differential Revision: https://phabricator.services.mozilla.com/D128938
2021-11-02 18:17:41 +00:00
Agi Sferro 6825be4e35 Bug 1736433 - Keep log of launch failures in GeckoProcessManager. r=owlish
This patch refactors `GeckoProcessManager`. Before this patch, we would pass
all arguments needed to start a process in every method call, together with the
previous error (if present).

This patch groups the arguments in a class `StartInfo` and keeps the failure
information separately in a list of exceptions that can be used to generate a
log in case of failure.

This patch also fixes two problems:

- We were calling `detachFd` right after connecting to a process, which is
  incorrect when the binding fails, as we still need a reference to the File
  Descriptor to retry the connection. After the patch, we will call detach only
  at the end when we either have established a connection or we have given up.

- We were taking ownership of the File Descriptors from Gecko. This is
  incorrect because Gecko owns them already and calling `close` accidentally
  will crash the app. We now `dup` them instead, using
  `ParcelFileDescriptor.from`.  This also means that the call to `detachFd` is
  now a call to `close`.

Differential Revision: https://phabricator.services.mozilla.com/D128935
2021-11-02 18:17:40 +00:00
Agi Sferro a1ec46fb8c Bug 1736433 - Don't use unneeded Integer.valueOf. r=calu,owlish
The argument is already an `int` so we don't need to call `valueOf`.

Differential Revision: https://phabricator.services.mozilla.com/D128934
2021-11-02 18:17:39 +00:00
Agi Sferro 09be856797 Bug 1736433 - Add InitInfo::builder. r=owlish
This patch adds a builder for InitInfo and allows us to define its members as
final.

This is especially useful for File Descriptors which are all of the same type,
and could be easily swapped in method calls.

Differential Revision: https://phabricator.services.mozilla.com/D128933
2021-11-02 18:17:39 +00:00
Agi Sferro 1b309951d6 Bug 1736433 - Add GeckoResult::finally_. r=owlish,calu
This method is called regardless of whether the GeckoResult completes
successfully or not.

Differential Revision: https://phabricator.services.mozilla.com/D128932
2021-11-02 18:17:38 +00:00
Agi Sferro 69c7fc95b8 Bug 1733423 - Implement getAllLoginsAsync. r=calu,owlish
This patch adds a new API onLoginFetch() which will be called when Gecko needs
access to all logins saved on the device (as opposed to just logins for a
domain).

Differential Revision: https://phabricator.services.mozilla.com/D129862
2021-11-02 15:59:54 +00:00
Norisz Fay 47a4e47af2 Backed out 7 changesets (bug 1729640) for causing Bp-hybrid bustages on LoginDetectionService.o CLOSED TREE
Backed out changeset 4d3532da5652 (bug 1729640)
Backed out changeset 9ec5346cf9d9 (bug 1729640)
Backed out changeset 43dd05680186 (bug 1729640)
Backed out changeset f44a8f37d84c (bug 1729640)
Backed out changeset 66376bee8cef (bug 1729640)
Backed out changeset c7ffe85380d7 (bug 1729640)
Backed out changeset ae9c5de3902a (bug 1729640)
2021-11-02 16:33:01 +02:00
Dimi c31102442d Bug 1729640 - P3. Notify event when a form with password is submitted r=sfoster,tgiles,geckoview-reviewers,agi
Notify "passwordmgr-form-submission-detected" when a form with password
is submitted.
The event should be notified regardless of whether the password manager
decides to show the doorhanger or not. To support this, this patch
also refactors _maybeSendFormInteractionMessage function to distinguish
"onFormSubmit" event and "showDoorhanger" event.

Differential Revision: https://phabricator.services.mozilla.com/D127104
2021-11-02 13:47:48 +00:00
Makoto Kato 1be11f4ee1 Bug 1556983 - Primary pointer capability should be coarse when having touch screen. r=geckoview-reviewers,agi
Many users report that GeckoView returns non-coarse value for primary pointer
capabilities. Actually, we assume that primary pointer device is 1st device by
`InputDevice.getDeviceIds`, but some mobile devices seems not to return touch
screen as 1st item according to user reports.

Also, Android's `InputDevice` API doesn't define what is primary pointer
device, so we cannot assume primary pointer device well.

Other implements are,

- Chrome returns coarse if something input device has coarse capability.
- Firefox for Windows seems to return coarse if it is tablet mode.

So we should return coarse as primary pointer capability when having touch
screen, like Chrome.

But there is still another issue.

When I check some devices (including Android VM on Chrome OS), even if no touch
screen, the `InputDevice`'s source may has `SOURCE_TOUCHSCREEN`. Chrome checks
that fine pointer at first, then it checks coarse pointer. But current GV is
coarse pointer at first. Since the `InputDevice`'s source may have both
`SOURCE_MOUSE` and `SOURCE_TOUCHSCREEN` on touchpad/mouse, GV returns different
result. So we shouldn't check `SOURCE_TOUCHSCREEN` at first.

Differential Revision: https://phabricator.services.mozilla.com/D129901
2021-11-02 02:04:06 +00:00
Sebastian Hengst d21e359bd2 Merge autoland to mozilla-central. a=merge 2021-11-01 22:58:34 +01:00
Agi Sferro 3b13343187 Bug 1738687 - Suggest running ./mach try auto in GV docs. r=calu
Differential Revision: https://phabricator.services.mozilla.com/D130094
2021-11-01 15:54:11 +00:00
Riya ac2ad7e7f2 Bug 1737032 - Removed traces of "remote XUL". r=Gijs,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D129255
2021-10-25 11:00:47 +00:00
Jan-Erik Rediger ba5c77a572 Bug 1708669 - Register FOG custom pings on Android builds to enable Glean functionality. r=chutten,geckoview-reviewers,agi
This instantiates the FOG service, which in turn registers an idle
observer, which is required for FOG IPC to be triggered occasionally.

Glean itself will be controlled by the surrounding Android application.
Glean symbols are shipped in this GeckoView build.
Any metrics recorded in Gecko will be passed through to the Android
application, e.g. Fenix.

This also re-exports `rlb_flush_dispatcher` to be called by Glean Core from the Kotlin side.

Currently this does not support sending custom pings inside Gecko.
Testing Glean metrics in an Android build will be enabled in subsequent commits.

Differential Revision: https://phabricator.services.mozilla.com/D126799
2021-10-22 08:53:28 +00:00
Gabriel Luong c7a4bab1b6 Bug 1732219 - Add API for fetching the preview image. r=geckoview-reviewers,agi,mconley
Differential Revision: https://phabricator.services.mozilla.com/D128815
2021-10-22 06:04:04 +00:00
Narcis Beleuzu d9da4a1ac6 Backed out changeset bd57366e61d8 (bug 1732219) for bc failures on browser_bad_meta_tags.js. CLOSED TREE 2021-10-22 00:46:39 +03:00
Gabriel Luong 4f70f62317 Bug 1732219 - Add API for fetching the preview image. r=geckoview-reviewers,agi,mconley
Differential Revision: https://phabricator.services.mozilla.com/D128815
2021-10-21 18:48:49 +00:00
owlishDeveloper d308ffcc3a Bug 1733737 - Make sure autocomplete search is initialized with a value r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D128278
2021-10-21 18:35:38 +00:00
Andi-Bogdan Postelnicu 0d12e234b2 Bug 1731582 - Move to clang-13 r=firefox-build-system-reviewers,mhentges,decoder
Join work with glandium.

Differential Revision: https://phabricator.services.mozilla.com/D126208
2021-10-20 12:03:20 +00:00
Butkovits Atila c56f15eca0 Backed out changeset 7de44eaecb13 (bug 1731582) as requested by Andi. CLOSED TREE 2021-10-19 20:52:08 +03:00
Andi-Bogdan Postelnicu 151c81623a Bug 1731582 - Move to clang-13 r=firefox-build-system-reviewers,mhentges,decoder
Join work with glandium.

Differential Revision: https://phabricator.services.mozilla.com/D126208
2021-10-19 14:45:59 +00:00
Timothy Nikkel 35a0a509c6 Bug 1734571. Remove old unused layers tiling left over code bits. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D127787
2021-10-19 10:12:25 +00:00
Marian-Vasile Laza 3883f0ad91 Backed out changeset f3cf8baf4f0a (bug 1731582) for causing build bustages. CLOSED TREE 2021-10-19 12:36:47 +03:00
Andi-Bogdan Postelnicu da72439c02 Bug 1731582 - Move to clang-13 r=firefox-build-system-reviewers,mhentges
Join work with glandium.

Differential Revision: https://phabricator.services.mozilla.com/D126208
2021-10-19 08:00:30 +00:00
Evgenia Kotovich 0d0980ee0d Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-18 09:26:33 +00:00
Noemi Erli 2bba3cec69 Backed out changeset 2ab6bb03dcc1 (bug 1576768) for causing failures in test_double_submit.html CLOSED TREE 2021-10-18 02:05:57 +03:00
Evgenia Kotovich 3e3dff109c Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-17 14:59:14 +00:00
Alexandru Michis dac6815201 Backed out changeset 7c08aa027893 (bug 1576768) for causing multiple failures.
CLOSED TREE
2021-10-15 16:52:43 +03:00
Evgenia Kotovich a8b32926fa Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-15 12:58:11 +00:00
Mike Hommey 7debb35262 Bug 1572618 - Statically link the rlbox library to libxul. r=firefox-build-system-reviewers,nika,andi
We still rely on dynamic loading to find the symbols, but since we get
them from libxul, we don't need to load the library before activating
the process sandbox anymore.

Differential Revision: https://phabricator.services.mozilla.com/D128333
2021-10-15 01:17:58 +00:00
Hiroyuki Ikezoe c61c568d4a Bug 1696785 - Use (400x400) display size in SelectionActionDelegateTest to avoid unexpected multiple updateposition events during the test. r=geckoview-reviewers,agi
SelectionActionDelegateTest does just respond a single event in each test cases,
so if there are multiple events we need to respond, the test stops working since
the response will be discarded in SelectionActionDelegateChild.jsm [1].

We use a lager display size here to avoid the situation, in bug 1735655 the situation
will be eliminated.

[1] https://searchfox.org/mozilla-central/rev/0998b61022a1ece43afe3c750077e5804c6c6392/mobile/android/actors/SelectionActionDelegateChild.jsm#260-264

Differential Revision: https://phabricator.services.mozilla.com/D128418
2021-10-14 02:54:58 +00:00
Michael Comella 94cf414dcd Bug 1734935 - add marker for GeckoSession.onLoadRequest. r=agi
Here is a profile demonstrating the change (debug build) when the request is
resolved UI thread -> Gecko thread -> UI thread:
https://share.firefox.dev/3Aru9NW

Here is a profile when the request is resolved synchronously on the UI thread:
https://share.firefox.dev/3BzGTDs

Differential Revision: https://phabricator.services.mozilla.com/D127989
2021-10-12 21:21:42 +00:00
Agi Sferro e8e0f7e153 Bug 1571899 - Format Java codebase with google-java-formatter. r=owlish
This commit was generated by running |./mach lint -l android-formatter --fix|.

Differential Revision: https://phabricator.services.mozilla.com/D127733
2021-10-11 18:11:56 +00:00
Agi Sferro 2bd64785fc Bug 1571899 - Use google-java-format via spotless to enforce Java formatting. r=ahal,owlish
This change adds a new lint `android-format` which enforces formatting of Java
code using google-java-format.

To run the lint simply run:

./mach lint -l android-format

This command also support automatically fixing all errors running by adding
--fix:

./mach lint -l android-format --fix

This change also removes all the formatting-related checkstyle checks which are
now implicitly enforced by the formatter.

Differential Revision: https://phabricator.services.mozilla.com/D127734
2021-10-11 18:11:55 +00:00
Jamie Nicol 54efd0cd5a Bug 1733732 - Disable display port multiplier on Android. r=tnikkel
On Android we currently apply a 4x multiplier to the size of the
display port. When using the old Layers rendering backend, we would
render the non-multiplied "critical display port" at normal
resolution, and if required we would render the inflated display port
in low resolution. This helped avoid checkerboarding.

With webrender we only render what is currently visible on the
screen, so having an inflated display port is probably less
useful. There are still circumstances when it could help avoid
checkerboarding, for example when the main thread is busy it allows
for more scrolling without a new scene being built. But this benefit
is likely outweighed by the increased display list and scene building
time caused by the larger display port.

As a first step this patch simply sets the layers.low-precision-buffer
pref to false, which will prevent us from increasing the display port
size. This will make the change easy to revert in case it does cause
any issues. If this has the desired effect then we can remove the
relevant code in a follow up patch.

Differential Revision: https://phabricator.services.mozilla.com/D128062
2021-10-11 17:52:14 +00:00
Makoto Kato 9408d87ba5 Bug 1734552 - Don't walk though the accessibility nodes on autofill. r=geckoview-reviewers,agi
When Autofill service runs with compatibility mode [*1] (such as Bitwarden),
`View.onProvideAutofillStructure` walks through the accessibility nodes.
Walking through it spends a lot of times.

When checking Android's source code, the following walks through it.

- `onProvideAutofillVirtualStructure`
- `autofill`
- `isVisibleToUserForAutofill`

Actually, since we already add autofill's virtual nodes, it is unnecessary to
walk through it.

*1 https://developer.android.com/reference/android/service/autofill/AutofillService#compatibility-mode

Differential Revision: https://phabricator.services.mozilla.com/D127952
2021-10-11 13:16:45 +00:00
Tomislav Jovanovic 1b801a123d Bug 1708243 - Part 4: Remove tab-content.js and onExtensionBrowser.js, stop touching .content eagerly r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D127750
2021-10-09 22:45:28 +00:00
Michael Comella 97fefdd3af Bug 1734941 - add marker for EventDispatcher handleMessage. r=agi
Here's a sample profile when loading a page while using this marker (debug
build): https://share.firefox.dev/3Fni5kq

Differential Revision: https://phabricator.services.mozilla.com/D127990
2021-10-08 21:39:36 +00:00
Cathy Lu dcdbccb976 Bug 1708815 - Rename enterpiseRootsEnabled r=geckoview-reviewers,agi,owlish
Differential Revision: https://phabricator.services.mozilla.com/D127729
2021-10-07 19:16:41 +00:00
owlishDeveloper 7a6decb12a Bug 1734028 - Update GeckoView Contributor Guide r=geckoview-reviewers,agi,calu
Differential Revision: https://phabricator.services.mozilla.com/D127493
2021-10-06 16:12:02 +00:00
Agi Sferro 4fa08131c7 Bug 1714945 - Add StorageController::setPrivateBrowsingPermanentPermission. r=owlish
Normally, a private browsing session doesn't store any data permamently. This
extends to permissions, which are cleared at the end of the browsing session
(i.e. when the GeckoRuntime is closed or killed).

There are cases, however, where we want to keep the data around. For example
Focus needs to store tracking protection permissions permanently.

For this reason, this patch introduces a new API that allows embedders to set
permanent permissions for private browsing GeckoSession.

This patch also always sends a tracking protection permission for every page
load, this allows embedders to set the tracking protection permission without
using the deprecated API `setPermission`, this was an oversight during the
implementation of the new StorageController API.

Differential Revision: https://phabricator.services.mozilla.com/D126546
2021-10-05 22:09:59 +00:00
Agi Sferro 486cf25495 Bug 1714945 - Clean up PermissionDelegateTest. r=owlish
Removes redundant namespaces, adds some static imports, cleans up some java-ism
(like .equals and semicolons).

Differential Revision: https://phabricator.services.mozilla.com/D126545
2021-10-05 22:09:59 +00:00
Agi Sferro 165f96a8a2 Bug 1714945 - Actually deprecate ContentBlockingController. r=owlish
Differential Revision: https://phabricator.services.mozilla.com/D126543
2021-10-05 22:09:58 +00:00
Agi Sferro 36efcb63bd Bug 1572245 - Add TestRuntimeService to restart runtime in tests. r=owlish
This patch adds a new test service class that can be used to more easily write
a test that needs to run multiple runtimes or needs to reset the runtime.

The service also includes an optional Instance class that can be used to
control the service and send and receive messages from the remote runtime.

Differential Revision: https://phabricator.services.mozilla.com/D126542
2021-10-05 22:09:58 +00:00
Andrew Halberstadt 95449daa6d Bug 1732723 - Rename "taskgraph" Python module to "gecko_taskgraph". r=jmaher
For a long time two copies of the 'taskgraph' module have existed in parallel.
We've attempted to keep them in sync, but over time they have diverged and the
maintenance burden has increased.

In order to reduce this burden, we'd like to re-join the two code bases. The
canonical repo will be the one that lives outside of mozilla-central, and this
module will depend on it. Since they both have the same module name (taskgraph)
we need to rename the version in mozilla-central to avoid collisions.

Other consumers of 'taskgraph' (like mobile repos) have standardized on
'<project>_taskgraph' as their module names. So replicating that here as well.

Differential Revision: https://phabricator.services.mozilla.com/D127118
2021-09-30 09:50:08 -04:00
Makoto Kato c4cc01692d Bug 1672609 - Implement nsWindow::SetCursor to support cursor property on GeckoView. r=geckoview-reviewers,emilio,owlish
This change also supports pointer icon change such as I-beam etc when pointer
is on text box etc.

Differential Revision: https://phabricator.services.mozilla.com/D126062
2021-10-05 11:42:00 +00:00
Makoto Kato ac58befba4 Bug 1672609 - Add GeckoSessionTestRule.synthesizeMouseMove. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D127019
2021-10-05 11:41:59 +00:00
Mirko Brodesser c61c10a2ce Bug 1731994: part 8) Rename `nsIContentPermissionRequest`'s `isHandlingUserInput` to `hasValidTransientUserGestureActivation`. r=edgar
It's more accurate.

Differential Revision: https://phabricator.services.mozilla.com/D126916
2021-10-04 12:16:00 +00:00
owlishDeveloper 82a30bcd6d Bug 1703976 - [1.0] Extend Autocomplete API to support credit card saving r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D111341
2021-10-02 00:28:05 +00:00
Makoto Kato c3d7964c59 Bug 1582606 - Allow data: url on GVE. r=geckoview-reviewers,agi
If data: url has space, it doesn't be recognized as data: url on GVE.

Differential Revision: https://phabricator.services.mozilla.com/D127124
2021-10-01 04:34:10 +00:00
Agi Sferro 1f930e4253 Bug 1557796 - Custom mozconfig for gradle build. r=nalexander,owlish
This patch introduces a new local.settings field: mozilla-central.mozconfig.

This field can be used to set a custom mozconfig file for the gradle build (and
for Android Studio).

The environment variable MOZCONFIG will take precedence over what is defined in
local.settings to allow Gecko engineers to use multiple mozconfig files.

Co-Authored-By: Nick Alexander <nalexander@mozilla.com>

Differential Revision: https://phabricator.services.mozilla.com/D124830
2021-09-29 17:54:57 +00:00
Noemi Erli 5ae6eff43a Backed out changeset 3339b501299a (bug 1703976) for causing geckoview failures CLOSED TREE 2021-09-28 02:38:01 +03:00
owlishDeveloper 20ea47506e Bug 1703976 - [1.0] Extend Autocomplete API to support credit card saving r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D111341
2021-09-27 21:41:13 +00:00
criss f968bf6006 Backed out changeset cd12974c5646 (bug 1703976) for causing lint failures in api.txt. CLOSED TREE 2021-09-28 00:03:31 +03:00
criss 1dc219c943 Backed out changeset ba8b96449fbd (bug 1703976) for causing Lint failures on Autocomplete.java. CLOSED TREE 2021-09-27 23:48:19 +03:00
owlishDeveloper e6812a3528 Bug 1703976 - [2.0] Update API changelog r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D111343
2021-09-27 20:37:06 +00:00
owlishDeveloper de738da4c8 Bug 1703976 - [1.0] Extend Autocomplete API to support credit card saving r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D111341
2021-09-27 20:16:25 +00:00
Alex Lopez 63022efc7a Bug 1696251: Allow mach commands as stand-alone functions and adapt existing commands. r=mhentges,webdriver-reviewers,perftest-reviewers,sparky,whimboo
This removes the `@CommandProvider` decorator and the need to implement
mach commands inside subclasses of `MachCommandBase`, and moves all
existing commands out from classes to module level functions.

Differential Revision: https://phabricator.services.mozilla.com/D121512
2021-09-27 18:12:51 +00:00
Cristian Tuns e3e80a22dc Bug 1717506 Disabled AutofillDelegate on debug build r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D126613
2021-09-27 15:32:57 +00:00
Rob Wu 32398ebd89 Bug 1641735 - Re-enable some tabs tests on Android r=agi,extension-reviewers,zombie
test_ext_tab_runtimeConnect.html can be re-enabled since bug 1534640 got fixed.
test_ext_tabs_reload.html had a race condition.
test_ext_tabs_reload_bypass_cache.html fix similar to bug 1335180.

Differential Revision: https://phabricator.services.mozilla.com/D124090
2021-09-27 13:34:55 +00:00
Rob Wu f3cf76cb48 Bug 1641735 - Code cleanup of some extension tests r=geckoview-reviewers,agi,mixedpuppy
In the past, add_task was generator-based, and tests were automatically
rewritten to use Promises. Some tests have weird constructs such as the
use of Promise.all+await or still using generators. These have been
fixed.

Some tests request the tabs permission without actually needing it.

This patch does not affect the behavior of the tests.

Differential Revision: https://phabricator.services.mozilla.com/D124089
2021-09-27 13:34:55 +00:00
Rob Wu 8c0d686282 Bug 1641735 - Replace unnecessary uses of useAddonManager of ExtensionTestUtils.loadExtension r=zombie,agi,extension-reviewers
In mochitests on Android, ExtensionTestUtils.loadExtension defaults to
`useAddonManager: "android-only"` to allow Android tests to correctly
register with the AddonManager without unnecessarily forcing this
registration on desktop.

This patch removes all unnecessary uses of useAddonManager, to make it
obvious when a test really depends on the AddonManager (on desktop),
opposed to only depending on it indirectly as part of the GeckoView
implementation.

Differential Revision: https://phabricator.services.mozilla.com/D124088
2021-09-27 13:34:54 +00:00
Butkovits Atila eb735ac57e Backed out changeset 53b1fa0faa6d (bug 1696251) for breaking the static-analysis integration. a=backout 2021-09-23 13:06:40 +03:00
owlishDeveloper 800e6ffa5d Bug 1697866 - Add HTTPS-only specific error code and pass it to GeckoView, to handle HTTPS-only specific errors correctly r=agi,JulianWels,nika,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D120914
2021-09-23 01:41:47 +00:00
Noemi Erli 50d4e6c878 Backed out changeset 890d147bad1d (bug 1697866) for causing bustages in WindowGlobalParent.cpp CLOSED TREE 2021-09-23 01:20:43 +03:00
Katherine Patenio d2129b2d30 Bug 1731381 - remove brandProductName properties for Fluent migration r=fluent-reviewers,flod,mtigley
Differential Revision: https://phabricator.services.mozilla.com/D126027
2021-09-22 19:55:57 +00:00
owlishDeveloper 7acebc65af Bug 1697866 - Add HTTPS-only specific error code and pass it to GeckoView, to handle HTTPS-only specific errors correctly r=agi,JulianWels,nika,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D120914
2021-09-22 18:30:39 +00:00
Makoto Kato ac34e350cd Bug 1731517 - GeckoViewStreamListener::WriteSegment returns error instead of crash by java.lang.OutOfMemoryError. r=geckoview-reviewers,agi
It is better to return error instead of crash since
`nsIInputStream::ReadSegment` can handle error.

Differential Revision: https://phabricator.services.mozilla.com/D126060
2021-09-22 09:47:58 +00:00
Christoph Kerschbaumer 62ef76f6fa Bug 1731750: Adjust test loadWithHTTPSOnlyMode to work with https-first-mode enabled r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D126239
2021-09-22 09:45:40 +00:00
Alex Lopez a8e7083c84 Bug 1696251: Allow mach commands as stand-alone functions and adapt existing commands. r=mhentges,webdriver-reviewers,perftest-reviewers,sparky,whimboo
This removes the `@CommandProvider` decorator and the need to implement
mach commands inside subclasses of `MachCommandBase`, and moves all
existing commands out from classes to module level functions.

Differential Revision: https://phabricator.services.mozilla.com/D121512
2021-09-21 20:38:16 +00:00