Commit Graph

2295 Commits

Author SHA1 Message Date
Shane Caraveo
6a2b434485 Bug 1594234 remove extensions.content_script_csp preferences in favor of extensions.manifestV3.enabled r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D101212
2021-01-19 19:43:09 +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
Frederik Braun
c1fa7a9762 Bug 1687315 - fix testoriginattributes tests r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D102205
2021-01-19 07:54:31 +00:00
Simon Giesecke
9758d919eb Bug 1583109 - Use StringJoin(Append) where easily possible. r=nika
Bug 1583109 introduced new function templates StringJoin and StringJoinAppend.
These are now used to replace several custom loops across the codebase that
implement string-joining algorithms to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D98750
2020-12-17 14:58:18 +00:00
Csoregi Natalia
d8c9489b13 Backed out changeset 16d174e7c342 (bug 1583109) for bustage on nsReadableUtils.h. CLOSED TREE 2020-12-16 22:51:26 +02:00
Simon Giesecke
72babae175 Bug 1583109 - Use StringJoin(Append) where easily possible. r=nika
Bug 1583109 introduced new function templates StringJoin and StringJoinAppend.
These are now used to replace several custom loops across the codebase that
implement string-joining algorithms to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D98750
2020-12-16 19:38:23 +00:00
Kartik Gautam
f7ffcd09fb Bug 1679758 - Remove trailing empty lines r=sylvestre,marionette-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-15 10:34:54 +00:00
Dorel Luca
7320ae982a Backed out changeset f3aaf04fce3b (bug 1679758) for Devtool failures in browser_styleeditor_syncAddProperty.js. CLOSED TREE 2020-12-13 16:38:21 +02:00
Kartik Gautam
caf549c200 Bug 1679758 - Remove trailing empty lines r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-13 13:28:30 +00:00
Simon Giesecke
5db2472bdf Bug 1673931 - Avoid including ReferrerPolicyBinding.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D97610
2020-12-10 11:09:29 +00:00
Christoph Kerschbaumer
0f05ea9b88 Bug 1678310: Expose siteOriginNoSuffix on nsIPrincipal r=baku,nika
Differential Revision: https://phabricator.services.mozilla.com/D97605
2020-11-28 07:21:32 +00:00
Csoregi Natalia
a810f4e72c Backed out changeset cf796da336c8 (bug 1678310) due to causing memory crashes. CLOSED TREE 2020-11-24 13:00:45 +02:00
Christoph Kerschbaumer
a1c2ca7af2 Bug 1678310: Expose siteOriginNoSuffix on nsIPrincipal r=baku
Differential Revision: https://phabricator.services.mozilla.com/D97605
2020-11-24 09:04:56 +00:00
Simon Giesecke
94b0165df6 Bug 1678374 - Avoid including js/RootingAPI.h from header files. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D97616

Depends on D97467
2020-11-23 16:12:12 +00:00
Simon Giesecke
1000a339cf Bug 1673931 - Avoid including ChromeUtils.h from header files.
Differential Revision: https://phabricator.services.mozilla.com/D96553

Depends on D96552
2020-11-23 16:10:16 +00:00
Simon Giesecke
a1126d1532 Bug 1676362 - Removed unused includes from nsJSPrincipals.h. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D96545

Depends on D96543
2020-11-23 16:09:37 +00:00
Simon Giesecke
971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Peter Van der Beken
ea7daa934e Bug 1677483 - Reenable some tests that are now succeeding with Fission. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D97267
2020-11-17 10:25:51 +00:00
Mihai Alexandru Michis
d06ca5f7d1 Backed out changeset e4b67fc1f101 (bug 1677483) for causing multiple mochitest plain failures.
CLOSED TREE
2020-11-17 19:29:26 +02:00
Peter Van der Beken
75190a1035 Bug 1677483 - Reenable some tests that are now succeeding with Fission. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D97267
2020-11-17 10:25:51 +00:00
Jan Varga
4a6e04dc62 Bug 1676411 - Fix usage calculation for file:// (and potentially other) URIs; r=asuth,dom-workers-and-storage-reviewers
This patch improves the required consistency between GetStorageOriginKey and
GetLocalStorageQuotaKey.

Differential Revision: https://phabricator.services.mozilla.com/D96583
2020-11-13 19:51:08 +00:00
Simon Giesecke
f355f05fec Bug 1673682 - Accept functors rather than a virtual function override in URLParams::Parse. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96428
2020-11-13 08:12:12 +00:00
Simon Giesecke
6206951895 Bug 1673682 - Move URLParams to nsURLHelper.h. r=valentin,necko-reviewers
Move ReadStructuredClone/WriteStructuredClone to URLSearchParams.

Adapt all uses of URLParams.

Differential Revision: https://phabricator.services.mozilla.com/D96416
2020-11-13 08:11:32 +00:00
Ricky Stewart
02a7b4ebdf Bug 1654103: Standardize on Black for Python code in mozilla-central.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Tim Huang
18853bea78 Bug 1670617 - Part 2: Make the CORS preflight cache partitioned by the originAttributes. r=ckerschb,necko-reviewers
We want to partition the CORS preflight cache by the network state
partitioning. So, we have done two things in the patch. First, we make
the CORS preflight cache to be aware of the OriginAttributes. Second, we
use the originAttributes of the network state partitioning in the CORS
preflight cache. As the result, the CORS preflight cache will be
partitioned by the originAttributes.partitionKey as well as other
originAttributes fields if present.

Differential Revision: https://phabricator.services.mozilla.com/D93683
2020-10-26 13:39:12 +00:00
Bogdan Tara
da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart
c0cea3b0fa Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca
1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart
50762dacab Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Marco Bonardo
1019bbf009 Bug 1626016 - Remove createFixupURI and move postData inside URIFixupInfo. r=Gijs,geckoview-reviewers,preferences-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D93189
2020-10-13 10:20:16 +00:00
Olli Pettay
8a508eaa66 Bug 1668357 - Disable tests which fail when fission and session-history-in-parent are enabled, r=peterv,marionette-reviewers,whimboo
In many cases with wpt, most of the tests in the file pass, but it is rather time consuming to annotate
.ini files case by case.

Differential Revision: https://phabricator.services.mozilla.com/D91977
2020-10-01 10:23:47 +00:00
Emilio Cobos Álvarez
d0c1406073 Bug 1667438 - Simplify OriginAttributes::operator==. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D91458
2020-09-25 19:24:29 +00:00
Simon Giesecke
de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Andrea Marchesini
60b6161a74 Bug 1635828 - Isolate HSTS per first-party when privacy.partition.network_state is set to true - part 3 - partition key, r=xeonchen
Differential Revision: https://phabricator.services.mozilla.com/D83316
2020-09-20 20:51:12 +00:00
Narcis Beleuzu
4a31045523 Backed out 4 changesets (bug 1635828) for causing Bug 1666083
Backed out changeset 1f93614c3fde (bug 1635828)
Backed out changeset 04a8f6581dde (bug 1635828)
Backed out changeset 1bfeca8427e6 (bug 1635828)
Backed out changeset 8ec4db600c1f (bug 1635828)
2020-09-20 20:00:45 +03:00
Andrea Marchesini
487589caae Bug 1635828 - Isolate HSTS per first-party when privacy.partition.network_state is set to true - part 3 - partition key, r=xeonchen
Differential Revision: https://phabricator.services.mozilla.com/D83316
2020-09-16 14:33:31 +00:00
Christoph Kerschbaumer
c18ba9eea8 Bug 1145314: Increase expected assertion range to 9 for test_bug995943.xhtml on Linux. r=aryx
Differential Revision: https://phabricator.services.mozilla.com/D82145
2020-09-15 07:30:26 +00:00
Christoph Kerschbaumer
ed4fe6b936 Bug 1145314: Lock down CheckLoadURIFlags by dropping the check that lets any URI_IS_UI_RESOURCE URL link to any other URL with that flag. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D80601
2020-09-15 07:30:26 +00:00
Chris Peterson
118723ea09 Bug 1664100 - Replace MOZ_MUST_USE with [[nodiscard]] in caps. r=ckerschb
The MOZ_MUST_USE macro is defined as clang's and gcc's nonstandard __attribute__((warn_unused_result)). Now that we compile as C++17 by default (bug 1560664), we can replace MOZ_MUST_USE with C++17's standard [[nodiscard]] attribute.

The [[nodiscard]] attribute must precede a function declaration's declaration specifiers (like static, extern, inline, or virtual). The __attribute__((warn_unused_result)) attribute does not have this order restriction.

Differential Revision: https://phabricator.services.mozilla.com/D89697
2020-09-10 14:36:15 +00:00
Christoph Kerschbaumer
c6241df6d4 Bug 1661672: Remove use of security.view-source.reachable-from-inner-protocol r=Gijs,emilio
Differential Revision: https://phabricator.services.mozilla.com/D89163
2020-09-07 13:51:44 +00:00
Sebastian Streich
7defa66497 Bug 1655945 - Remove principal.uri in RemotePageAccessManager.jsm r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D82917
2020-08-25 13:58:49 +00:00
Sebastian Streich
f1c274e657 Bug 1660822 - Add isLocalIpAdress to nsIPrincipal r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D82919
2020-08-24 16:28:26 +00:00
Simon Giesecke
cfd7d0ea9c Bug 1659923 - Avoid unnecessary copies around Base64Encode. r=xpcom-reviewers,necko-reviewers,froydnj,valentin
This also adds some more variants of Base64Encode and Base64EncodeAppend.

Differential Revision: https://phabricator.services.mozilla.com/D87559
2020-08-19 17:45:16 +00:00
Kris Maglione
3af8c4138c Bug 1651519: Remove nsIDOMWindowUtils::currentInnerWindowID. r=nika,remote-protocol-reviewers,webcompat-reviewers,whimboo
It has some properties which make it footgunny, especially in the face of
Fission. Callers should use WindowGlobalChild.innerWindowId instead.

Differential Revision: https://phabricator.services.mozilla.com/D82801
2020-08-17 20:20:50 +00:00
Butkovits Atila
a24ad1c55b Backed out changeset 6d39aab86966 (bug 1633710) for failure at test_disabled_hosts.js. CLOSED TREE 2020-08-05 22:19:30 +03:00
Sebastian Streich
a7595921ed Bug 1633710 - Move display-(spec/prepath/host) to nsIPrincipal r=geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D82913
2020-08-05 16:52:12 +00:00
Sebastian Streich
bf58055b03 Bug 1633710 - Move uri.spec calls to nsIPrincipal r=necko-reviewers,geckoview-reviewers,preferences-reviewers,ckerschb,ntim,snorp,valentin
Differential Revision: https://phabricator.services.mozilla.com/D82911
2020-08-04 11:10:41 +00:00
Mihai Alexandru Michis
e7f08a598b Backed out 3 changesets (bug 1635828) for causing bc failures in browser_tab_detach_restore.js
CLOSED TREE

Backed out changeset 30c58380f352 (bug 1635828)
Backed out changeset d232cb3c4779 (bug 1635828)
Backed out changeset 7c47f9b403ae (bug 1635828)
2020-08-04 13:35:45 +03:00
Andrea Marchesini
df3643be96 Bug 1635828 - Isolate HSTS per first-party when privacy.partition.network_state is set to true - part 3 - partition key, r=xeonchen
Differential Revision: https://phabricator.services.mozilla.com/D83316
2020-08-04 09:45:53 +00:00