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

30972 Коммитов

Автор SHA1 Сообщение Дата
Noemi Erli e0f4b9b5fe Backed out 2 changesets (bug 1729460) for causing newtab failures CLOSED TREE
Backed out changeset 5617839462be (bug 1729460)
Backed out changeset 6d52fde3ee0e (bug 1729460)
2021-09-10 13:14:12 +03:00
Mark Banner 3cfdb5c41a Bug 1729460 - Change users of defineLazyServiceGetter(s) to use Services.* where appropriate. r=mossop,webdriver-reviewers,extension-reviewers,whimboo,robwu
Differential Revision: https://phabricator.services.mozilla.com/D124838
2021-09-10 09:38:42 +00:00
Agi Sferro 2ee8774b86 Bug 1729561 - Update com.koushikdutta.async to 3.1.0. r=owlish
This fixes a crash in our test harness, see
https://github.com/koush/AndroidAsync/issues/685.

Differential Revision: https://phabricator.services.mozilla.com/D124924
2021-09-09 15:57:32 +00:00
Tetsuharu Ohzeki 1b25bc2c77 Bug 1729580 - Remove unused `layers.***` pref more. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D124866
2021-09-08 15:31:50 +00:00
Makoto Kato 750b27206e Bug 1729295 - Call super.actorCreated() to use eventDispatcher. r=geckoview-reviewers,agi
When tapping accessiblecaret and moving/releasing it, the follow error occurs.

```
GeckoViewContent[C]: handleEvent: mozcaretstatechanged
Web Content: [JavaScript Error: "TypeError: can't access property "sendRequest", this.eventDispatcher is undefined" {file: "resource:///actors/GeckoViewContentChild.jsm" line: 291}]
Web Content: handleEvent@resource:///actors/GeckoViewContentChild.jsm:291:11
```

I think that we miss super.actorCreated() call in actorCreate(). This might be
regression by bug 1661480.

Differential Revision: https://phabricator.services.mozilla.com/D124639
2021-09-07 23:06:31 +00:00
Agi Sferro fe18354034 Bug 1713969 - Generate session id ahead of time when requesting new session. r=owlish
Hiro found this race condition.

The problem is in this code:

```
338:    this.eventDispatcher
339:      .sendRequestForResult(message)
340:      .then(sessionId => {
341:        return this.waitAndSetupWindow(sessionId, aOpenWindowInfo, aName);
342:      })
```

At line 339 we ask the Java front-end to create a session and return back the
id of the session just created.

We then, at line 341, wait until the `geckoview-window-created` event fires
which signals that the session has been opened. We then _synchronously_ set
some attributes on the window object that allows us to connect the Java session
to the JavaScript window object.

Synchronicity is important as right after the `geckoview-window-created` event
fires all actors expect the embedderElement to be set on the window.

This, however, races with the code that creates the session:

```
540: } else if ("GeckoView:OnNewSession".equals(event)) {
541:     final String uri = message.getString("uri");
542:     final GeckoResult<GeckoSession> result = delegate.onNewSession(GeckoSession.this, uri);
...
547:
548:     callback.resolveTo(result.map(session -> {
...
562:         session.open(GeckoSession.this.mWindow.runtime);
563:         return session.getId();
564:     }));
```

As you can see, at line 562 we open the session, which asynchronously builds
the Gecko window and eventually fires the `geckoview-window-create` event. In
most cases, the message with the sessionId, sent at line 563, reaches the
JavaScript layer before the window has been opened, but sometimes it doesn't.

When the window opens before the JavaScript layer receives the sessionId back,
the promise at line 341 will never complete, causing intermittent failures in
our testing harness (and causing missing windows in consumer devices).

To fix this problem we modify the timing of creating the GeckoSession id.

The GeckoSession id only makes sense when the session is associated to a
GeckoRuntime instance, as the id is only used by Gecko. We can thus generate
the id whenever the Session is opened.

For sessions that are opened by the embedder directly, we can generate the id
randomly like usual. However, when the session is opened as a result of a
onNewSession (or onNewTab) call, we will set the id of the session using the id
given by the JavaScript layer.

This will enable the JavaScript layer to wait for the `geckoview-window-create`
before the Java layer has opportunity to respond, fixing the race condition.

Co-Authored-By: Hiroyuki Ikezoe <hikezoe.birchill@mozilla.com>

Differential Revision: https://phabricator.services.mozilla.com/D124502
2021-09-07 15:25:28 +00:00
Makoto Kato 07a531585b Bug 1724811 - Disable selection check of Java side on inputConnection_sendKeyEvent. r=geckoview-reviewers,agi
Actually `inputConnection_sendKeyEvent` test is rarely failed such as bug
1676245. Because we have no way to wait for correct selection data.
`TextInputDelegate.updateSelection` isn't called when view isn't attached to
window like geckoview-junit case.

So I would like to comment out this check now.

Depends on D124435

Differential Revision: https://phabricator.services.mozilla.com/D124436
2021-09-06 12:38:26 +00:00
owlishDeveloper 2942d2a222 Bug 1726209 - Add null check when retreiving UUID of a Node r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D123274
2021-09-03 22:43:01 +00:00
Rob Wu 2974448d5d Bug 1728669 - Simplify GeckoView:WebExtension:Connect/Message handlers r=agi
Differential Revision: https://phabricator.services.mozilla.com/D124260
2021-09-02 19:55:13 +00:00
Agi Sferro 52b49a2dbe Bug 1676216 - Remove unused checkbox on promptAuth and similar. r=dimi,owlish,necko-reviewers,kershaw
The checkbox is never actually displayed (I think) so we don't need any of this
code.

Differential Revision: https://phabricator.services.mozilla.com/D122502
2021-09-01 23:42:25 +00:00
Agi Sferro 0daddcbbb6 Bug 1676216 - Revert "Bug 1607537: Fix timeouts in ParentCrashTest.crashParent and re-enable the test" r=owlish
The code in this patch is not needed anymore because now we can handle multiple
in-app runtimes after Bug 1696460.

This reverts commit d49a34c51bc537caffcd559cda07be994105cebb.

Differential Revision: https://phabricator.services.mozilla.com/D123980
2021-09-01 23:40:35 +00:00
Agi Sferro 9ec1b5b24c Bug 1676216 - Use login storage for HTTP auth on Android r=dimi,owlish
This commit allows Android to use the login storage for HTTP auth by migrating
some common toolkit code to promptUsernameAndPassword and promptPassword which
use the login storage.

Differential Revision: https://phabricator.services.mozilla.com/D122508
2021-09-01 23:40:34 +00:00
Agi Sferro 1b4bd12049 Bug 1676216 - Allow runtime delegates in GeckoSessionTestRule. r=owlish
Historically, only session delegates have been allowed in GeckoSessionTestRule
utilities like delegateUntilTestEnd or delegateDuringNextWait.

There's no reason it has to be that way though, and allowing runtime delegates
to use the same utilities removes a lot of boilerplate code that we don't need.

Differential Revision: https://phabricator.services.mozilla.com/D122507
2021-09-01 23:40:34 +00:00
Agi Sferro a4f2c7f7f0 Bug 1676216 - Remove o.m.g.test.util.Callbacks. r=owlish
It's a relic of the past when we didn't require default methods for delegates,
we don't need it anymore.

Differential Revision: https://phabricator.services.mozilla.com/D122506
2021-09-01 23:40:33 +00:00
Agi Sferro f4796a5e64 Bug 1676216 - Add missing delegate getters. r=owlish
Almost all delegates have getters except for these two. These are also helpful
when implementing delegateUntilTestEnd for runtime delegates.

Differential Revision: https://phabricator.services.mozilla.com/D122505
2021-09-01 23:40:33 +00:00
Agi Sferro 524db15b59 Bug 1710668 - Allow Gecko to dismiss a prompt. r=owlish
This change adds a new API that allows Gecko to dismiss a prompt automatically.

This will be used to dismiss prompts when they shouldn't be displayed anymore,
e.g. when using basic auth, we hide the prompt if the server rejects the login
information, as we know that the login info is not correct, so there's no point
in saving it.

We will also dismiss prompts automatically when they become stale, e.g. if a
permission prompt is raised and then the user navigates away.

To be able to dismiss a prompt we need to keep track of existing prompt
instances for a Session. We assign each prompt a unique, randomly generated,
UUID that is used to match the javascript prompt instance with the java
counterpart.

The prompts are stored in PromptHolder. Because the PromptController is owned
by the GeckoSession, whenever the session is GC'd we will also release the
prompts associated to it (if any).

Differential Revision: https://phabricator.services.mozilla.com/D122504
2021-09-01 23:40:32 +00:00
Agi Sferro d0f048826c Bug 1710668 - Refactor handlePromptEvent into PromptController. r=owlish
Differential Revision: https://phabricator.services.mozilla.com/D122503
2021-09-01 23:40:32 +00:00
Narcis Beleuzu 117d408424 Backed out 1 changesets (bug 1728669) for mochitest failures on test_ext_tabs_executeScript_good.html
Backed out changeset 35295637d5fd (bug 1728669)
2021-09-02 02:25:00 +03:00
Agi Sferro 44c6b0ba31 Bug 1728666 - Allow building artifact builds without the NDK. r=nalexander
Looks like the new gradle version throws an exception now.

Differential Revision: https://phabricator.services.mozilla.com/D124258
2021-09-01 21:59:41 +00:00
Rob Wu 8bf1867b97 Bug 1728669 - Simplify GeckoView:WebExtension:Connect/Message handlers r=agi
Differential Revision: https://phabricator.services.mozilla.com/D124260
2021-09-01 21:57:20 +00:00
Botond Ballo 4d407aff38 Bug 1727676 - Remove APZ support code for progressive painting. r=tnikkel
The patch also removes the remaining related code from
CompositorBridgeParent/Child.

Differential Revision: https://phabricator.services.mozilla.com/D123721
2021-09-01 19:57:59 +00:00
Iulian Moraru 0672e33a18 Backed out 8 changesets (bug 1676216, bug 1710668) for causing build bustages. CLOSED TREE
Backed out changeset b18aea9590ee (bug 1676216)
Backed out changeset bb5fc7f9df83 (bug 1676216)
Backed out changeset dfc0ce411a75 (bug 1676216)
Backed out changeset d83b518be746 (bug 1676216)
Backed out changeset a7c71027c898 (bug 1676216)
Backed out changeset 41fee786f8ec (bug 1676216)
Backed out changeset 86546e1132f5 (bug 1710668)
Backed out changeset 8e3d053f5f55 (bug 1710668)
2021-09-01 21:57:28 +03:00
Agi Sferro 33356cb6e5 Bug 1676216 - Revert "Bug 1607537: Fix timeouts in ParentCrashTest.crashParent and re-enable the test" r=owlish
The code in this patch is not needed anymore because now we can handle multiple
in-app runtimes after Bug 1696460.

This reverts commit d49a34c51bc537caffcd559cda07be994105cebb.

Differential Revision: https://phabricator.services.mozilla.com/D123980
2021-09-01 17:19:41 +00:00
Agi Sferro 22c6b5887b Bug 1676216 - Remove unused checkbox on promptAuth and similar. r=dimi,owlish,necko-reviewers,kershaw
The checkbox is never actually displayed (I think) so we don't need any of this
code.

Differential Revision: https://phabricator.services.mozilla.com/D122502
2021-09-01 17:19:41 +00:00
Agi Sferro 3a3490bde8 Bug 1676216 - Use login storage for HTTP auth on Android r=dimi,owlish
This commit allows Android to use the login storage for HTTP auth by migrating
some common toolkit code to promptUsernameAndPassword and promptPassword which
use the login storage.

Differential Revision: https://phabricator.services.mozilla.com/D122508
2021-09-01 17:19:40 +00:00
Agi Sferro b885582d75 Bug 1676216 - Allow runtime delegates in GeckoSessionTestRule. r=owlish
Historically, only session delegates have been allowed in GeckoSessionTestRule
utilities like delegateUntilTestEnd or delegateDuringNextWait.

There's no reason it has to be that way though, and allowing runtime delegates
to use the same utilities removes a lot of boilerplate code that we don't need.

Differential Revision: https://phabricator.services.mozilla.com/D122507
2021-09-01 17:19:40 +00:00
Agi Sferro d556f6b9a9 Bug 1676216 - Remove o.m.g.test.util.Callbacks. r=owlish
It's a relic of the past when we didn't require default methods for delegates,
we don't need it anymore.

Differential Revision: https://phabricator.services.mozilla.com/D122506
2021-09-01 17:19:39 +00:00
Agi Sferro 70bca1ec31 Bug 1676216 - Add missing delegate getters. r=owlish
Almost all delegates have getters except for these two. These are also helpful
when implementing delegateUntilTestEnd for runtime delegates.

Differential Revision: https://phabricator.services.mozilla.com/D122505
2021-09-01 17:19:39 +00:00
Agi Sferro 675ba8fb82 Bug 1710668 - Allow Gecko to dismiss a prompt. r=owlish
This change adds a new API that allows Gecko to dismiss a prompt automatically.

This will be used to dismiss prompts when they shouldn't be displayed anymore,
e.g. when using basic auth, we hide the prompt if the server rejects the login
information, as we know that the login info is not correct, so there's no point
in saving it.

We will also dismiss prompts automatically when they become stale, e.g. if a
permission prompt is raised and then the user navigates away.

To be able to dismiss a prompt we need to keep track of existing prompt
instances for a Session. We assign each prompt a unique, randomly generated,
UUID that is used to match the javascript prompt instance with the java
counterpart.

The prompts are stored in PromptHolder. Because the PromptController is owned
by the GeckoSession, whenever the session is GC'd we will also release the
prompts associated to it (if any).

Differential Revision: https://phabricator.services.mozilla.com/D122504
2021-09-01 17:19:38 +00:00
Agi Sferro 063b1134e6 Bug 1710668 - Refactor handlePromptEvent into PromptController. r=owlish
Differential Revision: https://phabricator.services.mozilla.com/D122503
2021-09-01 17:19:38 +00:00
Tomislav Jovanovic 4d1c2087ec Bug 1708243 - Part 2: stop using sender data from the child process r=robwu,agi
Differential Revision: https://phabricator.services.mozilla.com/D123351
2021-08-31 23:15:17 +00:00
Agi Sferro 06af054df7 Bug 1727438 - Define glean as a capability instead of depending on it. r=nalexander,owlish
Depending on glean creates a circular dependency as glean depends on
glean-native which is substituted with GeckoView in omni builds.

Since Gradle 6 capabilities are passed on to consumers using the Gradle Module
Metadata, so now we can just define a glean capability in GeckoView and Fenix
will consume glean-native from GeckoView instead of adding a duplicated
libglean blob (there is code in the glean plugin to make sure this happens).

See also: https://docs.gradle.org/current/userguide/component_capabilities.html

Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>

Differential Revision: https://phabricator.services.mozilla.com/D123572
2021-08-31 20:53:10 +00:00
Agi Sferro 2d0ad69c9d Bug 1727438 - Import publishing metadata from variant. r=nalexander,owlish
There's a lot of code that we don't need anymore in our publication path (I'm
assuming it was needed when it was written but then gradle/the android plugin
caught up).

This has the nice side effect of producing better metadata (e.g. our
implementation dependencies end up in the |runtime| dependency group instead of
the default one where they were before, which means the app doesn't inherit our
private dependencies).

Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>

Differential Revision: https://phabricator.services.mozilla.com/D123571
2021-08-31 20:53:10 +00:00
Agi Sferro a820b1404e Bug 1727438 - Upgrade kotlin to 1.5.20. r=nalexander,owlish
Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>

Differential Revision: https://phabricator.services.mozilla.com/D123570
2021-08-31 20:53:09 +00:00
Agi Sferro 5675e00bd6 Bug 1727438 - Upgrade to Gradle 6.9.1. r=nalexander,owlish
This is the last version that doesn't require Java 11, we will upgrade to
Gradle 7 once all components are ready (namely, apilint).

Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>

Differential Revision: https://phabricator.services.mozilla.com/D123569
2021-08-31 20:53:09 +00:00
Agi Sferro 8b804e3125 Bug 1727438 - Increase java max heap to 32G. r=nalexander,owlish
Looks like 6G is not enough for an ASAN build when updating the gradle version.
I tried 8G and 16G on try but that's not enough either.

This also:

* Moves the asan job to `b-linux-large` as the `b-linux` builder does not have
  enough memory to run this build.
* Stops running a full build during lints, which is not necessary (and
  sometimes uses more memory than the build runner has, failing the lint).

Differential Revision: https://phabricator.services.mozilla.com/D123970
2021-08-31 20:53:08 +00:00
criss d1e9a72deb Backed out changeset a269440d7e21 (bug 1708243) for causing failures on mochitest/test_ext_tabs_create.html. CLOSED TREE 2021-08-31 23:22:19 +03:00
Tomislav Jovanovic c8825f7521 Bug 1708243 - Part 2: stop using sender data from the child process r=robwu,agi
Differential Revision: https://phabricator.services.mozilla.com/D123351
2021-08-31 18:48:17 +00:00
Agi Sferro 8c5a8a729e Bug 1725469 - Remove deprecated LoginStorageDelegate. r=owlish
This also removes deprecated getProfileDir.

Differential Revision: https://phabricator.services.mozilla.com/D122911
2021-08-31 14:53:59 +00:00
Csoregi Natalia ac7da6c730 Backed out changeset f966b7898d9f (bug 1708243) for geckoview failures. CLOSED TREE 2021-08-31 18:40:20 +03:00
Makoto Kato 74eb4491ae Bug 1727151 - Don't pass all text to intent if it is large. r=geckoview-reviewers,agi
Although we set all selected text to intent that is text processing, it may
cause `RemoteException` since binder cannot handle large data.

So we should truncate the text if it is more than 100K. This value is same as
Blink's limitation (https://crbug.com/1077599).

Differential Revision: https://phabricator.services.mozilla.com/D123410
2021-08-31 11:54:59 +00:00
Tomislav Jovanovic fdf59b2ca2 Bug 1708243 - Part 2: stop using sender data from the child process r=robwu,agi
Differential Revision: https://phabricator.services.mozilla.com/D123351
2021-08-31 11:46:11 +00:00
Marian-Vasile Laza d4a1825562 Backed out changeset 1395c54325a7 (bug 1708243) for causing gv-junit failures. CLOSED TREE 2021-08-31 06:53:43 +03:00
Tomislav Jovanovic 596f309c03 Bug 1708243 - Part 2: stop using sender data from the child process r=robwu,agi
Differential Revision: https://phabricator.services.mozilla.com/D123351
2021-08-31 00:21:38 +00:00
Marian-Vasile Laza e12ef6952e Backed out changeset 38cfb452cecf (bug 1708243) for causing mochitest failures on test_ext_tabs_sendMessage.html. CLOSED TREE 2021-08-31 02:40:51 +03:00
Tomislav Jovanovic 45dbaa8381 Bug 1708243 - Part 2: stop using sender data from the child process r=robwu,agi
Differential Revision: https://phabricator.services.mozilla.com/D123351
2021-08-30 22:54:47 +00:00
Cosmin Sabou c9893d3d5f Backed out 5 changesets (bug 1727438) for causing android build bustages. CLOSED TREE
Backed out changeset 66bad7f53820 (bug 1727438)
Backed out changeset e015a4e8b62e (bug 1727438)
Backed out changeset 97a06ad4cbcc (bug 1727438)
Backed out changeset ebb080f68880 (bug 1727438)
Backed out changeset 8d03d49fe3a3 (bug 1727438)
2021-08-31 00:11:19 +03:00
Agi Sferro dd1a360320 Bug 1727438 - Define glean as a capability instead of depending on it. r=nalexander,owlish
Depending on glean creates a circular dependency as glean depends on
glean-native which is substituted with GeckoView in omni builds.

Since Gradle 6 capabilities are passed on to consumers using the Gradle Module
Metadata, so now we can just define a glean capability in GeckoView and Fenix
will consume glean-native from GeckoView instead of adding a duplicated
libglean blob (there is code in the glean plugin to make sure this happens).

See also: https://docs.gradle.org/current/userguide/component_capabilities.html

Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>

Differential Revision: https://phabricator.services.mozilla.com/D123572
2021-08-30 19:15:11 +00:00
Agi Sferro 05048aa439 Bug 1727438 - Import publishing metadata from variant. r=nalexander,owlish
There's a lot of code that we don't need anymore in our publication path (I'm
assuming it was needed when it was written but then gradle/the android plugin
caught up).

This has the nice side effect of producing better metadata (e.g. our
implementation dependencies end up in the |runtime| dependency group instead of
the default one where they were before, which means the app doesn't inherit our
private dependencies).

Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>

Differential Revision: https://phabricator.services.mozilla.com/D123571
2021-08-30 19:15:11 +00:00
Agi Sferro aed476bdf8 Bug 1727438 - Upgrade kotlin to 1.5.20. r=nalexander,owlish
Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>

Differential Revision: https://phabricator.services.mozilla.com/D123570
2021-08-30 19:15:10 +00:00
Agi Sferro 78ae1c7c9b Bug 1727438 - Upgrade to Gradle 6.9.1. r=nalexander,owlish
This is the last version that doesn't require Java 11, we will upgrade to
Gradle 7 once all components are ready (namely, apilint).

Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>

Differential Revision: https://phabricator.services.mozilla.com/D123569
2021-08-30 19:15:10 +00:00
Agi Sferro d15794b08e Bug 1727438 - Increase java max heap to 16G. r=nalexander
Looks like 6G is not enough for an ASAN build when updating the gradle version.
I tried 8G on try but that's not enough either.

Differential Revision: https://phabricator.services.mozilla.com/D123970
2021-08-30 19:15:10 +00:00
Makoto Kato cceec66897 Bug 1670129 - Changing inputmode to none should dismiss software keyboard. r=geckoview-reviewers,agi
When focus isn't changed and inputmode in focused element is changed to none,
we should dismiss software keyboard.

Also, this has same issue for changing from none to text to show software
keyboard.

When changing inputmode, icNotifyIMEContext is called then we should control
software keyboard open/close state too.

Differential Revision: https://phabricator.services.mozilla.com/D122491
2021-08-30 01:30:30 +00:00
Butkovits Atila e42d7aa018 Backed out 5 changesets (bug 1727438, bug 1727577) for causing Android bustage. CLOSED TREE
Backed out changeset 552d8919435c (bug 1727577)
Backed out changeset 59d1a463178b (bug 1727438)
Backed out changeset 8cba5f574196 (bug 1727438)
Backed out changeset 00d32a3af979 (bug 1727438)
Backed out changeset efda82445d85 (bug 1727438)
2021-08-26 03:33:58 +03:00
Agi Sferro 6eb547963d Bug 1727438 - Define glean as a capability instead of depending on it. r=nalexander
Depending on glean creates a circular dependency as glean depends on
glean-native which is substituted with GeckoView in omni builds.

Since Gradle 6 capabilities are passed on to consumers using the Gradle Module
Metadata, so now we can just define a glean capability in GeckoView and Fenix
will consume glean-native from GeckoView instead of adding a duplicated
libglean blob (there is code in the glean plugin to make sure this happens).

See also: https://docs.gradle.org/current/userguide/component_capabilities.html

Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>

Differential Revision: https://phabricator.services.mozilla.com/D123572
2021-08-25 21:02:18 +00:00
Agi Sferro 895f5e7ae7 Bug 1727438 - Import publishing metadata from variant. r=nalexander
There's a lot of code that we don't need anymore in our publication path (I'm
assuming it was needed when it was written but then gradle/the android plugin
caught up).

This has the nice side effect of producing better metadata (e.g. our
implementation dependencies end up in the |runtime| dependency group instead of
the default one where they were before, which means the app doesn't inherit our
private dependencies).

Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>

Differential Revision: https://phabricator.services.mozilla.com/D123571
2021-08-25 21:02:18 +00:00
Agi Sferro 3e4b709e6d Bug 1727438 - Upgrade kotlin to 1.5.20. r=nalexander
Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>

Differential Revision: https://phabricator.services.mozilla.com/D123570
2021-08-25 21:02:17 +00:00
Agi Sferro 16fe3c1b74 Bug 1727438 - Upgrade to Gradle 6.9.1. r=nalexander
This is the last version that doesn't require Java 11, we will upgrade to
Gradle 7 once all components are ready (namely, apilint).

Co-authored-by: Jan-Erik Rediger <janerik@fnordig.de>

Differential Revision: https://phabricator.services.mozilla.com/D123569
2021-08-25 21:02:17 +00:00
Narcis Beleuzu 4981262857 Backed out changeset e49874b751fa (bug 1708243) for bc failures on browser_shims.js . CLOSED TREE 2021-08-25 19:23:32 +03:00
Tomislav Jovanovic 091713a1b5 Bug 1708243 - Part 2: stop using sender data from the child process r=robwu,agi
Differential Revision: https://phabricator.services.mozilla.com/D123351
2021-08-25 12:00:34 +00:00
Alex Lopez 4ae24b1f1b Bug 1696251: Refactor docstrings in mach commands. r=mhentges,webdriver-reviewers,geckoview-reviewers,agi
The purpose of this is to remove as many docstrings from CommandProvider
classes to make the step of moving commands out of classes simpler.
Where possible, the docstring has been moved to or merged with the function.

Differential Revision: https://phabricator.services.mozilla.com/D123288
2021-08-24 20:16:05 +00:00
Rob Wu 9cb377d63a Bug 1727272 - Improve performance of GeckoViewWebExtension.ensureBuiltIn r=agi,rpl
Differential Revision: https://phabricator.services.mozilla.com/D123431
2021-08-24 17:40:29 +00:00
Cosmin Sabou 0292ffb142 Backed out 6 changesets (bug 1676216, bug 1710668) for turning Bug 1615203 into permafail. CLOSED TREE
Backed out changeset 4784149fa5ae (bug 1676216)
Backed out changeset 42527af9a64a (bug 1676216)
Backed out changeset 9f187777d447 (bug 1676216)
Backed out changeset 708468680122 (bug 1676216)
Backed out changeset 71a4059dfe6f (bug 1710668)
Backed out changeset dbfc41e9bb76 (bug 1710668)
2021-08-24 07:22:27 +03:00
Agi Sferro 3f31865abf Bug 1676216 - Use login storage for HTTP auth on Android r=dimi,owlish
This commit allows Android to use the login storage for HTTP auth by migrating
some common toolkit code to promptUsernameAndPassword and promptPassword which
use the login storage.

Differential Revision: https://phabricator.services.mozilla.com/D122508
2021-08-23 17:40:07 +00:00
Agi Sferro 8cbdee0f49 Bug 1676216 - Allow runtime delegates in GeckoSessionTestRule. r=owlish
Historically, only session delegates have been allowed in GeckoSessionTestRule
utilities like delegateUntilTestEnd or delegateDuringNextWait.

There's no reason it has to be that way though, and allowing runtime delegates
to use the same utilities removes a lot of boilerplate code that we don't need.

Differential Revision: https://phabricator.services.mozilla.com/D122507
2021-08-23 17:40:07 +00:00
Agi Sferro 659b7748f9 Bug 1676216 - Remove o.m.g.test.util.Callbacks. r=owlish
It's a relic of the past when we didn't require default methods for delegates,
we don't need it anymore.

Differential Revision: https://phabricator.services.mozilla.com/D122506
2021-08-23 17:40:06 +00:00
Agi Sferro 3dfc1b68c4 Bug 1676216 - Add missing delegate getters. r=owlish
Almost all delegates have getters except for these two. These are also helpful
when implementing delegateUntilTestEnd for runtime delegates.

Differential Revision: https://phabricator.services.mozilla.com/D122505
2021-08-23 17:40:06 +00:00
Agi Sferro 1a53e17bd7 Bug 1710668 - Allow Gecko to dismiss a prompt. r=owlish
This change adds a new API that allows Gecko to dismiss a prompt automatically.

This will be used to dismiss prompts when they shouldn't be displayed anymore,
e.g. when using basic auth, we hide the prompt if the server rejects the login
information, as we know that the login info is not correct, so there's no point
in saving it.

We will also dismiss prompts automatically when they become stale, e.g. if a
permission prompt is raised and then the user navigates away.

To be able to dismiss a prompt we need to keep track of existing prompt
instances for a Session. We assign each prompt a unique, randomly generated,
UUID that is used to match the javascript prompt instance with the java
counterpart.

The prompts are stored in PromptHolder. Because the PromptController is owned
by the GeckoSession, whenever the session is GC'd we will also release the
prompts associated to it (if any).

Differential Revision: https://phabricator.services.mozilla.com/D122504
2021-08-23 17:40:05 +00:00
Agi Sferro 32f191786b Bug 1710668 - Refactor handlePromptEvent into PromptController. r=owlish
Differential Revision: https://phabricator.services.mozilla.com/D122503
2021-08-23 17:40:05 +00:00
Mike Hommey 2f0f713de2 Bug 1726101 - Enable wasm sandboxing on 64-bits Android. r=firefox-build-system-reviewers,mhentges,agi
Differential Revision: https://phabricator.services.mozilla.com/D122827
2021-08-20 04:02:41 +00:00
Mike Hommey b13e2389b8 Bug 1726453 - Don't set LLVM_LIBDIR_SUFFIX=64 when building android-cross clang. r=firefox-build-system-reviewers,mhentges
It's an unnecessary difference with our other clang builds. It looks
like it was cargo-culted from some external script. It makes the
android-cross clang different in the way it finds e.g. compiler
runtimes, some of which are in lib/, and others in lib64/, and only the
latter are actually found.

Differential Revision: https://phabricator.services.mozilla.com/D123017
2021-08-20 03:56:12 +00:00
Cosmin Sabou 84969e5caa Backed out 12 changesets (bug 1665776) for causing mda failures. CLOSED TREE
Backed out changeset 1093b571cd9e (bug 1665776)
Backed out changeset 97401a43356f (bug 1665776)
Backed out changeset e4d1fab7ed91 (bug 1665776)
Backed out changeset eef564e4e8ce (bug 1665776)
Backed out changeset b436ced5a9c2 (bug 1665776)
Backed out changeset 231057bbccc6 (bug 1665776)
Backed out changeset 918d100709b3 (bug 1665776)
Backed out changeset 63a6fb712a7c (bug 1665776)
Backed out changeset 2f9e721a4adb (bug 1665776)
Backed out changeset f65349f581ac (bug 1665776)
Backed out changeset eb289c096758 (bug 1665776)
Backed out changeset 077b96856a67 (bug 1665776)
2021-08-20 01:55:26 +03:00
John Lin 89a7c5d4f9 Bug 1665776 - p5: add VPx support to AndroidEncoderModule. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D121022
2021-08-19 19:01:20 +00:00
cschanaj f44ca48708 Bug 1510664 - Replace `HashMap` with `SparseArray` r=agi
This PR replaces `HashMap` with `SparseArray` from the Android API to
improve memory efficiency and performance.

Differential Revision: https://phabricator.services.mozilla.com/D121484
2021-08-18 14:40:26 +00:00
Butkovits Atila 3926c74569 Backed out changeset d06e292a30c1 (bug 1726101) for causing build bustages. CLOSED TREE 2021-08-18 13:37:17 +03:00
Mike Hommey 0476c7b042 Bug 1726101 - Enable wasm sandboxing on 64-bits Android. r=firefox-build-system-reviewers,mhentges,agi
Differential Revision: https://phabricator.services.mozilla.com/D122827
2021-08-18 01:17:55 +00:00
Eitan Isaacson 369b2d3854 Bug 1725413 - Null check arguments argument in performAction. r=agi
Differential Revision: https://phabricator.services.mozilla.com/D122647
2021-08-17 18:13:28 +00:00
Agi Sferro 5c215db6b3 Bug 1726180 - Include |api| dependencies in pom file. r=mhentges,owlish
Glean introduced a new type of dependencies (for us), "api". Since we build our
pom file manually we need to look at api dependencies too now.

Differential Revision: https://phabricator.services.mozilla.com/D122869
2021-08-17 16:24:38 +00:00
Marian-Vasile Laza b50f0ce625 Backed out changeset 65f8b0434e1e (bug 1708580) for causing Btime failures. CLOSED TREE 2021-08-14 00:44:48 +03:00
John Lin 7ef81ed249 Bug 1519236 - p1: expose cbcs support methods to JNI. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D122509
2021-08-13 18:35:55 +00:00
Aaron Klotz d8a5c41db0 Bug 1708580: When the "quit-application" event fires in GeckoView, annotate the GeckoThread.State and force crash on nightly and early beta; r=agi
AFAICT, all roads lead though [`nsAppStartup::Quit`](https://searchfox.org/mozilla-central/rev/0fec57c05d3996cc00c55a66f20dd5793a9bfb5d/toolkit/components/startup/nsAppStartup.cpp#448),
which is responsible for firing the `"quit-application"` observer notification
and then posting the `nsAppExitEvent` that causes the `nsAppShell` to break out
of its event loop and proceed with shutdown.

If we trigger a native crash in the observer, we should be able to capture a
symbolicated stack of whatever called `Quit`. We might as well force-crash
anyway, since AC is going to throw an exception regardless...

Before we crash, we annotate the current `GeckoThread` state to enable us to
find out whether we were fully initialized at the time of the shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D122256
2021-08-13 15:45:37 +00:00
Narcis Beleuzu 5956c10a41 Backed out 10 changesets (bug 1665776) for mda failures on test_peerConnection_basicH264Video.html. CLOSED TREE
Backed out changeset 495d29e49600 (bug 1665776)
Backed out changeset def1b1ef88a0 (bug 1665776)
Backed out changeset d6c3bea02005 (bug 1665776)
Backed out changeset b5aecfe25f9f (bug 1665776)
Backed out changeset 76ab66d90c6b (bug 1665776)
Backed out changeset d5bd2b250b28 (bug 1665776)
Backed out changeset e8dc6645692d (bug 1665776)
Backed out changeset a1e00e5bd88f (bug 1665776)
Backed out changeset 3f6ff34fda68 (bug 1665776)
Backed out changeset 8d2f96b977ea (bug 1665776)
2021-08-13 04:34:55 +03:00
John Lin cbb3b7b6c4 Bug 1665776 - p5: add VPx support to AndroidEncoderModule. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D121022
2021-08-12 22:12:15 +00:00
Dorel Luca c5bcb28b25 Backed out changeset 27e6d1f6f6c1 (bug 1708580) on Dev's request. CLOSED TREE 2021-08-12 22:30:34 +03:00
Aaron Klotz 9daf72aa1f Bug 1708580: When the "quit-application" event fires in GeckoView, annotate the GeckoThread.State and force crash on nightly and early beta; r=agi
AFAICT, all roads lead though [`nsAppStartup::Quit`](https://searchfox.org/mozilla-central/rev/0fec57c05d3996cc00c55a66f20dd5793a9bfb5d/toolkit/components/startup/nsAppStartup.cpp#448),
which is responsible for firing the `"quit-application"` observer notification
and then posting the `nsAppExitEvent` that causes the `nsAppShell` to break out
of its event loop and proceed with shutdown.

If we trigger a native crash in the observer, we should be able to capture a
symbolicated stack of whatever called `Quit`. We might as well force-crash
anyway, since AC is going to throw an exception regardless...

Before we crash, we annotate the current `GeckoThread` state to enable us to
find out whether we were fully initialized at the time of the shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D122256
2021-08-12 19:12:49 +00:00
Agi Sferro c14e63e428 Bug 1725400 - Fix GeckoView release artifactId. r=nalexander,owlish
The problem here is that the release artifactId was using single quotes instead
of double. I rewrote this code a little bit to avoid this sort of problem next
time by not having a release-build-only conditional branch.

Differential Revision: https://phabricator.services.mozilla.com/D122496
2021-08-12 18:36:42 +00:00
Agi Sferro b78b62e773 Bug 1725006 - Add missing unregister actor call. r=owlish
Differential Revision: https://phabricator.services.mozilla.com/D122396
2021-08-11 23:22:05 +00:00
Hiroyuki Ikezoe 982e2f4067 Bug 1678895 - Wait for PageStop and call promiseAllPaintsDone instead of waiting for the first-contentful-paint. r=geckoview-reviewers,agi
The first-contentful-paint doesn't ensure there's no more pending paint requests,
so if there's still pending paint requests and if one of the requests was an
important request to make sure our hit testing machinery works as expected (for
example, addEventListener triggers a paint request [1]), test doesn't work as
expected.

[1] https://searchfox.org/mozilla-central/rev/bb5549df90f9b0f5b453f9d8e872a94e503c64a6/dom/events/EventListenerManager.cpp#478

Differential Revision: https://phabricator.services.mozilla.com/D122311
2021-08-11 21:09:38 +00:00
Hiroyuki Ikezoe 68028d7f04 Bug 1678895 - Add GeckoSessionTestRule.promiseAllPaintsDone to make sure all pending paints have been finished. r=geckoview-reviewers,agi
This function will be used in the next commit to make sure there's no remaining
paint requests before proceeding each test cases. This code was mostly copied
and pasted from the commit when we introduced flushApzRepaints in bug 1660357.

This `promiseAllPaintsDone` is a simplified version of promiseAllPaintsDone in
paint_listener.js.  Though the paint_listener version is supposed to be loaded
and supposed to add an event listener for MozAfterPaint events in the first
place, whereas this version is supposed to keep adding an event listener for a
MozAfterPaint event until there's no pending paint request when it gets called,
it's a compromise but it should work as expected in most cases.

Differential Revision: https://phabricator.services.mozilla.com/D122310
2021-08-11 21:09:37 +00:00
Jan Varga 4311e5674b Bug 1599979 - Enable LSNG on Release; r=dom-storage-reviewers,jari,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D121941
2021-08-10 14:53:34 +00:00
Emilio Cobos Álvarez 624584c368 Bug 1724405 - Make ui.caretBlinkCount a proper widget int, and make it respect GTK settings. r=stransky
And make sure the caret ends up being visible, rather than _not_
visible.

This should be implementable on windows as well. It seems macOS doesn't
have a timeout thing.

Differential Revision: https://phabricator.services.mozilla.com/D122132
2021-08-10 14:39:27 +00:00
Nika Layzell 9a93da8ebd Bug 1650089 - Part 9: Report errors back to caller when messaging from outside of a GeckoView controlled window, r=agi
Differential Revision: https://phabricator.services.mozilla.com/D122147
2021-08-10 14:31:19 +00:00
Nika Layzell aa9b1db7d6 Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.

The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
   for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
   state such as the current remoteType when possible. This makes reasoning
   about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
   ensure that if an existing document in the same BCG is found, the load will
   finish in the required content process. This should make dynamic checks such
   as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
   easier to log just the information related to process selection when
   debugging.
5. Null result principal precursors are considered when performing process
   selection.

Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D120673
2021-08-10 14:31:17 +00:00
Jan-Erik Rediger 123198cf63 Bug 1670261 - GeckoView: Ignore the JNA module. r=agi,firefox-build-system-reviewers,nalexander
Otherwise we end up with `libjnidispatch.so` for all targets in the
final APK, which we don't want.

Depends on D121100

Differential Revision: https://phabricator.services.mozilla.com/D122104
2021-08-10 07:49:09 +00:00
Jan-Erik Rediger 20e5ef2e83 Bug 1670261 - Add Mozilla Maven as a maven repository on CI. r=agi,firefox-build-system-reviewers,mhentges,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D116603
2021-08-10 07:49:08 +00:00
Jan-Erik Rediger 9ff433d96b Bug 1670261 - Ensure the Glean versions in the project match. r=agi,chutten
In GeckoView we need to depend on the same Glean version as the included
Glean Rust crate has.
We _could_ let Gradle read that from Cargo.lock directly,
but that complicates the build.

Instead we manually update both versions to the same
and have Gradle ensure we don't forget that.

Differential Revision: https://phabricator.services.mozilla.com/D116602
2021-08-10 07:49:08 +00:00
Jan-Erik Rediger b2808bbfce Bug 1670261 - Re-export the Glean Kotlin bindings from GeckoView. r=agi
This also upgrades to Kotlin 1.3.50, which is required to due Glean
requirements. Fenix is already on 1.4, so that's no problem.

We also turn the geckoview_example into a multiDex application.
Otherwise we run into the 64k dex symbols size limit.

Differential Revision: https://phabricator.services.mozilla.com/D116601
2021-08-10 07:49:08 +00:00
Butkovits Atila 22fb2b6793 Backed out 8 changesets (bug 1650089) for causing Xpcshell failures on test_ext_redirects.js. CLOSED TREE
Backed out changeset ee763318d378 (bug 1650089)
Backed out changeset 24d7898ec4bd (bug 1650089)
Backed out changeset bcdd2f5c9840 (bug 1650089)
Backed out changeset 24a5bd7f97dd (bug 1650089)
Backed out changeset 1b8b4e939e82 (bug 1650089)
Backed out changeset a7a4f37a5d72 (bug 1650089)
Backed out changeset 78c012d4b071 (bug 1650089)
Backed out changeset e870508c1ddc (bug 1650089)
2021-08-06 04:35:52 +03:00
Nika Layzell 58c1037005 Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.

The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
   for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
   state such as the current remoteType when possible. This makes reasoning
   about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
   ensure that if an existing document in the same BCG is found, the load will
   finish in the required content process. This should make dynamic checks such
   as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
   easier to log just the information related to process selection when
   debugging.
5. Null result principal precursors are considered when performing process
   selection.

Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D120673
2021-08-06 00:10:57 +00:00
Agi Sferro 42b4f07527 Bug 1697636 - Removed deprecated GeckoResult.ALLOW and DENY. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D119807
2021-08-04 18:01:33 +00:00