Commit Graph

30412 Commits

Author SHA1 Message Date
Hiroyuki Ikezoe
b759a55797 Bug 1687430 - Introduce INPUT_RESULT_IGNORED to represent nsEventStatus_eConsumeNoDefault. r=botond,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D102270
2021-01-21 00:24:33 +00:00
Tim Huang
e50502e5c2 Bug 1687390 - Part 1: Set the name of window when calling window.open() with 'noopener' in GeckoView. r=geckoview-reviewers,agi
This patch makes the aName in the GeckoViewNavigation.openURIInFrame() to
be set properly to the new opened window when calling window.open() with
'noopener'.

Differential Revision: https://phabricator.services.mozilla.com/D102240
2021-01-20 20:39:13 +00:00
Shane Caraveo
98c9307c72 Bug 1594234 manifest v3 content security validation improvements r=robwu,geckoview-reviewers,agi
This patch adds CSP validation for manifest v3 changes when parsing the addon manifest.

Differential Revision: https://phabricator.services.mozilla.com/D100720
2021-01-19 19:42:41 +00:00
Shane Caraveo
4a14410028 Bug 1594234 manifest v3 content security policy support r=robwu,geckoview-reviewers,agi
Implement manifest v3 CSP that is compatible with the current chrome implementation.

Support for content_security_policy.isolated_world (a.k.a. content_security_policy.content_scripts)
has been removed for consistency with
345390adf6%5E%21/

Differential Revision: https://phabricator.services.mozilla.com/D100573
2021-01-07 14:53:18 +00:00
Emilio Cobos Álvarez
cd99d52bde Bug 1673683 - Copy activeness status in CanonicalBrowsingContext::ReplacedBy, instead of handling it on consumers. r=nika,agi
Differential Revision: https://phabricator.services.mozilla.com/D102220
2021-01-20 15:09:09 +00:00
smolnar
1182b67f0f Backed out changeset 8e3490247126 (bug 1673683) for causing bc failures in browser_aboutNewTab_bookmarksToolbar.js CLOSED TREE 2021-01-20 15:17:08 +02:00
Emilio Cobos Álvarez
a3f5fa882e Bug 1673683 - Copy activeness status in CanonicalBrowsingContext::ReplacedBy, instead of handling it on consumers. r=nika,agi
Differential Revision: https://phabricator.services.mozilla.com/D102220
2021-01-20 12:16:20 +00:00
smolnar
a905f86ac5 Merge autoland to mozilla-central. a=merge 2021-01-20 11:49:57 +02:00
smolnar
b3bcdd2462 Backed out changeset ae3db166c985 (bug 1673683) for causing empty pinned tabs with fission (bug 1687616). a=backout DONTBUILD 2021-01-20 11:46:11 +02:00
William Durand
620f570acb Bug 1686187 - Use AMO API v4. r=robwu
AMO API v3 is deprecated and we should now use API v4. Both versions are pretty similar even if the [changelog](https://addons-server.readthedocs.io/en/latest/topics/api/overview.html#v4-api-changelog) appears to be large (we mainly added new features).

I reviewed our usage of the AMO API in FF and diff'ed the API responses. I didn't notice any main difference except for `about:addons` disco, which is why I removed some code related to old properties.

Differential Revision: https://phabricator.services.mozilla.com/D101945
2021-01-19 18:10:24 +00:00
Emilio Cobos Álvarez
199530f89a Bug 1673683 - Copy activeness status in CanonicalBrowsingContext::ReplacedBy, instead of handling it on consumers. r=nika,agi
Differential Revision: https://phabricator.services.mozilla.com/D102220
2021-01-19 17:21:24 +00:00
Eugen Sawin
3b175177dd Bug 1682005 - [1.0] Attach the telemetry proxy when attaching to the runtime to avoid premature proxy registration. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D102194
2021-01-19 17:34:12 +00:00
Anny Gakhokidze
3ae9a2f63d Bug 1630908 - Part 1: Pass OriginAttributes to be included with remote type, r=nika,marionette-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D101073
2021-01-19 22:23:29 +00:00
Dan Minor
57ae936f38 Bug 1420335 - Make OSPreferences::ReadDateTimePattern check 12h/24h on Android; r=zbraniecki
As is the case with GTK, Android provides an OS override to display times in
AM/PM or 24 hour format. This moves the code for rewriting skeletons from the
GTK specific code to OSPreferences, and calls it from the Android OSPreferences
implementation.

This was tested manually by visiting the file:/// uri. I don't believe this is
feasible to test from automation, as it would require changing Android OS settings
from within our test code.

Differential Revision: https://phabricator.services.mozilla.com/D101641
2021-01-15 19:28:12 +00:00
Agi Sferro
cc616d4e76 Bug 1685389 - Use callback.resolveTo instead of result.accept. r=esawin
One thing I've noticed before going on break last year is that a lot of the
times we don't close out promises when an error occurs. Our code normally does
something like:

```
delegatePromise.then(response -> {
    // manipulate response
    callback.resolve(manipulatedResponse);
})
```

where `delegatePromise` is the `GeckoResult` from a delegate. The problem here
is that if the `delegatePromise` is rejected, the above never rejects the
callback.

A month ago we introduced `callback.resolveTo(result)` which obviates this
problem a little bit (it will rejects the callback if the result is rejected)
but it's still a little hard to use because you need to then the result to the
right value.

`result.map` sort of closes this gap a little bit and now you can write
something like this:

```
callback.resolveTo(delegatePromise.map(value -> {
     // manipulate value to match the response
    return manipulatedValue;
});
```

Which is the recommended way to resolve callbacks in GV

Another problem with callback.reject is that we pretty much only support strings but it's not made really clear (some existing code in GV returns an exception there, which doesn't work). resolveTo will take care of that by using the message of the exception passed in

Differential Revision: https://phabricator.services.mozilla.com/D101093
2021-01-15 17:29:34 +00:00
Jonathan Kew
bb780cf223 Bug 1685122 - Don't allow U+3000 in testcase to trigger an async fallback and reflow, which may disrupt a following test. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D101877
2021-01-15 16:21:42 +00:00
Mike Hommey
5552bc3c4a Bug 1686646 - In mozconfigs, don't set paths to tools configure can now find on its own. r=firefox-build-system-reviewers,dmajor
Differential Revision: https://phabricator.services.mozilla.com/D101721
2021-01-15 04:33:09 +00:00
Agi Sferro
f05a40ee57 Bug 1686809 - Use Locale.ROOT when calling toLowerCase. r=owlish
By default `toLowerCase` uses the device's Locale, which could have unexpected
consequences on non-en_US locales.

See also
https://github.com/googleapis/google-http-java-client/pull/420#issue-200260049.

Differential Revision: https://phabricator.services.mozilla.com/D101822
2021-01-14 22:16:05 +00:00
Mike Hommey
a9c5e28258 Bug 1480005 - Move NM to python configure. r=firefox-build-system-reviewers,nalexander
There is only one place where it's used:
config/check_vanilla_allocations.py, which is only executed from
js/src/build/Makefile.in on the condition that the build is targeting
Linux and not LTO. But the LTO test is actually outdated, because we
don't build with `-flto`, but `-flto=thin`, so the exclusion doesn't
work anymore.

There is however no AC_CHECK_PROG, and we currently rely on NM to be
given, or fall back to "nm", which works in most cases, except LTO with
clang. It works on CI because in LTO builds we explicitly set NM to
llvm-nm (which can output symbols from LLVM bitcode objects), but we
could also do that automatically.

So we add a full detection of nm/llvm-nm to python configure, and limit
it to Linux, since we only ever use it there.

Differential Revision: https://phabricator.services.mozilla.com/D101681
2021-01-14 20:17:08 +00:00
Mike Hommey
3a558130b5 Bug 1480005 - Remove check for RANLIB. r=firefox-build-system-reviewers,nalexander
It hasn't been used since bug 569597 and bug 1295937.

Differential Revision: https://phabricator.services.mozilla.com/D101680
2021-01-14 03:40:45 +00:00
Mike Hommey
647145eef9 Bug 1480005 - Look for llvm-ar for AR when compiling with clang. r=firefox-build-system-reviewers,nalexander
And stop setting AR to llvm-ar in mozconfigs.

Differential Revision: https://phabricator.services.mozilla.com/D101679
2021-01-14 03:41:39 +00:00
Narcis Beleuzu
242a631698 Backed out changeset 10cb82a1a314 (bug 1643736) for geckoview failures on testBrowserTabsCreate 2021-01-14 21:10:40 +02:00
ankushduacodes
066250f7d6 Bug 1643736 - Adding appropriate check before passing cookieStoreId to GeckoViewTabBridge.createNewTab() r=robwu,agi
Differential Revision: https://phabricator.services.mozilla.com/D100151
2021-01-14 16:57:45 +00:00
Bogdan Tara
60482b14fc Backed out changeset dc9229077eaa (bug 1420335) for security/manager* and toolkit/mozapps/* xpc failures CLOSED TREE 2021-01-14 18:43:19 +02:00
Dan Minor
487bcdd4ea Bug 1420335 - Make OSPreferences::ReadDateTimePattern check 12h/24h on Android; r=zbraniecki
As is the case with GTK, Android provides an OS override to display times in
AM/PM or 24 hour format. This moves the code for rewriting skeletons from the
GTK specific code to OSPreferences, and calls it from the Android OSPreferences
implementation.

This was tested manually by visiting the file:/// uri. I don't believe this is
feasible to test from automation, as it would require changing Android OS settings
from within our test code.

Differential Revision: https://phabricator.services.mozilla.com/D101641
2021-01-14 13:45:40 +00:00
Aaron Klotz
b55bf5ac03 Bug 1611554: Part 3 - Use jinja templates to generate GeckoChildProcessServices.java and AndroidManifest_overlay.xml; r=geckoview-reviewers,agi
This patch converts `GeckoChildProcessServices.java` into a jinja template.
We also add an overlay generated from a jinja template for `AndroidManifest.xml`
that provides the definitions for content process services.

Note that even though Gradle supports simple substitution of variables in
manifests, I opted not to use that functionality. Since we need the more
powerful template functionality that jinja provides, I felt that having multiple
ways to substitute information into the manifest would be confusing, so we're
using jinja exclusively.

Differential Revision: https://phabricator.services.mozilla.com/D82578
2021-01-13 01:19:15 +00:00
Aaron Klotz
ae684a1dee Bug 1611554: Part 2 - Modify GeckoView build to generate manifest and service definitions from jinja files; r=nalexander,geckoview-reviewers,snorp
* We add a config option for setting the number of content services;
* We add a config option to indicate whether content services should be isolated.
  This one is just a `project_flag` since it doesn't really need the ability to
  be overridden; it's something whose default we would want to flip when the
  time comes;
* We set a dependency so that mobile/android/base/pre-export is executed;
* We add the `gen_from_jinja.py` script which is mostly just a dumb shim that
  takes the input template and the config arguments, instantiates jinja,
  generates the final output, and dumps it to the output fd;
* We add the requisite `moz.build` statements to generate the manifest overlay
  and the service definitions;
* We update `build.gradle` so that Gradle knows to look for the generated files
  when building the apk.

Differential Revision: https://phabricator.services.mozilla.com/D82577
2021-01-13 17:32:54 +00:00
Butkovits Atila
bcdf48f6d6 Backed out 3 changesets (bug 1611554) for causing bustage on recurse.mk. CLOSED TREE
Backed out changeset bb1ce63d73ec (bug 1611554)
Backed out changeset 0d4317da1006 (bug 1611554)
Backed out changeset dc905e5db0cc (bug 1611554)
2021-01-13 03:16:17 +02:00
Aaron Klotz
898fb17519 Bug 1611554: Part 3 - Use jinja templates to generate GeckoChildProcessServices.java and AndroidManifest_overlay.xml; r=geckoview-reviewers,agi
This patch converts `GeckoChildProcessServices.java` into a jinja template.
We also add an overlay generated from a jinja template for `AndroidManifest.xml`
that provides the definitions for content process services.

Note that even though Gradle supports simple substitution of variables in
manifests, I opted not to use that functionality. Since we need the more
powerful template functionality that jinja provides, I felt that having multiple
ways to substitute information into the manifest would be confusing, so we're
using jinja exclusively.

Differential Revision: https://phabricator.services.mozilla.com/D82578
2021-01-13 00:38:25 +00:00
Aaron Klotz
669a8ecdcc Bug 1611554: Part 2 - Modify GeckoView build to generate manifest and service definitions from jinja files; r=nalexander,geckoview-reviewers,snorp
* We add a config option for setting the number of content services;
* We add a config option to indicate whether content services should be isolated.
  This one is just a `project_flag` since it doesn't really need the ability to
  be overridden; it's something whose default we would want to flip when the
  time comes;
* We set a dependency so that mobile/android/base/pre-export is executed;
* We add the `gen_from_jinja.py` script which is mostly just a dumb shim that
  takes the input template and the config arguments, instantiates jinja,
  generates the final output, and dumps it to the output fd;
* We add the requisite `moz.build` statements to generate the manifest overlay
  and the service definitions;
* We update `build.gradle` so that Gradle knows to look for the generated files
  when building the apk.

Differential Revision: https://phabricator.services.mozilla.com/D82577
2021-01-13 00:24:06 +00:00
Aaron Klotz
affae3f451 Bug 1686100: Follow-up to fix lint failure; r=bustage
CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D101417
2021-01-11 23:53:07 +00:00
Aaron Klotz
a30b099b2e Bug 1686100: Route Service.onTrimMemory notifications through to Gecko's memory-pressure observer; r=geckoview-reviewers,agi
Gecko already broadcasts `memory-pressure` events from the parent process down
to its content processes, but that excludes any case where Android is calling
`Service.onTrimMemory` directly on the content processes.

This patch handles `onTrimMemory` and translates its requests into
`memory-pressure` events that various Gecko components (including the GC)
listen for. We only handle the severity levels for background processes for now,
as memory cleanup for background processes is currently the most pressing issue
(and I'm not even sure what we could do for foreground memory cleanup without
janking anything).

The argument to `memory-pressure` should depend on the severity of the request
as well as the frequency of pressure events. In particular:

* The most severe request, `TRIM_MEMORY_COMPLETE`, is a last-ditch effort to
  reduce memory. This should trigger a full GC, so we use `low-memory` here.
* "New" requests, where "new" is defined as an event that was triggered in
  excess of 10 seconds since the previous "new" event, also gets a full GC, so we
  use `low-memory` here as well.
* Additional requests that do not fall under either of the above criteria
  receive the `low-memory-ongoing` event, which omits a full GC. The idea here
  is that, when low memory notifications occur in rapid succession, repeatedly
  doing full GCs over and over is just going to hang the Gecko thread and not
  result in any notable improvement.

Differential Revision: https://phabricator.services.mozilla.com/D101406
2021-01-11 22:08:00 +00:00
Agi Sferro
ea5931e9fd Bug 1685614 - Use GeckoResult in EventDispatcher. r=owlish,snorp
This patch adds `queryString`, `queryBoolean`, `queryVoid` and `queryBundle` to
`EventDispatcher` in place of `dispatch(type, message, callback)`.

These `query*` methods returns a `GeckoResult` which can be manipulated using
`GeckoResult.map`.

Differential Revision: https://phabricator.services.mozilla.com/D96951
2021-01-07 22:24:46 +00:00
Agi Sferro
9eb3454733 Bug 1684761 - Pass null principal for external loads. r=aklotz,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D100837
2021-01-07 21:36:33 +00:00
Kartik Gautam
7ae6aea145 Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D100484
2021-01-07 08:53:08 +00:00
Hiroyuki Ikezoe
510659d878 Bug 1674104 - Reset the vertical clipping value to zero whenever we change the dynamic toolbar max height. r=botond
So that we will not mis-align position:fixed elements with the old stale
clipping value.

Differential Revision: https://phabricator.services.mozilla.com/D100862
2021-01-06 18:05:52 +00:00
Agi Sferro
83036590b9 Bug 1682668 - Improve error messages when TabDelegate is not present. r=owlish
Differential Revision: https://phabricator.services.mozilla.com/D99851
2021-01-06 20:17:51 +00:00
Agi Sferro
d07e5d1640 Bug 1682668 - Add GeckoResult.map. r=owlish,aklotz
This method allows callers to synchronously map a GeckoResult value to another
value.

Differential Revision: https://phabricator.services.mozilla.com/D96950
2021-01-06 20:18:54 +00:00
Makoto Kato
c20f1137cb Bug 1624562 - Remove Fennec theme files. r=geckoview-reviewers,agi
Now, Fennec theme files (mobile/android/themes/core) are unused and
GV's files are in mobile/android/themes/geckoview.

So we can remove Fennec theme files.

Differential Revision: https://phabricator.services.mozilla.com/D100755
2021-01-05 20:14:15 +00:00
Agi Sferro
4de0910c2e Bug 1671497 - Remove deprecated loadUri methods. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D99836
2021-01-05 22:33:09 +00:00
Agi Sferro
8238f1d6fa Bug 1671497 - Removed deprecated REPLACED_UNSAFE_CONTENT r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D99835
2021-01-05 22:33:17 +00:00
Geoff Brown
13ad2a5fbe Bug 1643448 - Update test handling of ACCESS_WIFI_STATE; r=geckoview-reviewers,bc,agi
Add ACCESS_WIFI_STATE to the gve manifest, same as androidTest.
Remove ACCESS_WIFI_STATE from the list of pm grants, since it is not of
type dangerous.

Differential Revision: https://phabricator.services.mozilla.com/D100727
2021-01-05 20:14:23 +00:00
owlishDeveloper
1e40c5074f Bug 1683160 - Add a note on WebResponse.body to documentation r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D100704
2021-01-04 19:28:36 +00:00
Cosmin Sabou
2978aa00a3 Backed out changeset dbed1cdf588f (bug 1684173) for mochitest plain and devtools failures. a=backout DONTBUILD 2020-12-28 00:43:51 +02:00
Kartik Gautam
775cdec032 Bug 1684173 - Add newline character at end of files when missing r=sylvestre
Depends on D100443

Differential Revision: https://phabricator.services.mozilla.com/D100484
2020-12-27 11:43:41 +00:00
owlishDeveloper
df49be0905 Bug 1656336: Implement Web Extension downloads.download() - GV API r=geckoview-reviewers,robwu,agi
Differential Revision: https://phabricator.services.mozilla.com/D99573
2020-12-23 01:56:37 +00:00
owlishDeveloper
a5467fbd19 Bug 1656336: Implement Web Extension downloads.download() - JS part r=geckoview-reviewers,robwu,agi
Differential Revision: https://phabricator.services.mozilla.com/D99572
2020-12-23 01:37:09 +00:00
Aaron Klotz
a4f8c7ec04 Bug 1654817: Part 2 - Bump dom.ipc.processCount pref to 3 on Nightly; r=geckoview-reviewers,agi
I want to start with 3 so that we initially get a good look at how things run
with multiple processes, but when we easily hit the limit. We'll increase to
our final process count in a future bug.

Differential Revision: https://phabricator.services.mozilla.com/D94884
2020-11-23 17:16:05 +00:00
Makoto Kato
1ef677536a Bug 1682565 - Remove unused remained Fennec L10N resources. r=geckoview-reviewers,agi
`devicePrompt.properties` ... Presentation API UI frontend for Fennec.
`phishing.dtd` ... Safe browsing API UI on Fennec.
`pippki.properties` ... NSS Dialog UI such as importing certificate of Fennec.
`sync.properties` ... Firefox sync UI on Fennec.
`webcompatReporter.properties` - Web compat addon on Fennec

`passwordmgr.properties` still be referenced from `LoginManagerPrompter.jsm`.
So, I'm not sure we should keep this.

Differential Revision: https://phabricator.services.mozilla.com/D99798
2020-12-17 16:45:42 +00:00
Emilio Cobos Álvarez
9715d1f96c Bug 1475316 - Rename -moz-autofill to just autofill. r=geckoview-reviewers,esawin,boris
No compat impact, as this remains an internal pseudo-class for the time
being.

Differential Revision: https://phabricator.services.mozilla.com/D99295
2020-12-16 08:16:08 +00:00