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

30923 Коммитов

Автор SHA1 Сообщение Дата
Mark Banner 14aedbb785 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 12:09:49 +00:00
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