Commit graph

664 commits

Author SHA1 Message Date
Dana Keeler
56e7ae8648 Bug 1781104 - replace error type booleans with error category in nsITransportSecurityInfo r=necko-reviewers,mixedpuppy,jschanck,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D154561
2022-08-26 18:48:38 +00:00
Rob Wu
3494ccd426 Bug 1745762 - Add registration of DNR session rules r=rpl
This patch offers the Rule type and updateSessionRules and
getSessionRules to register rules. The actual evaluation of rules and
most of the associated validation is not part of this patch.

Differential Revision: https://phabricator.services.mozilla.com/D154801
2022-08-22 20:44:26 +00:00
Rob Wu
a4f8ce604c Bug 1782816 - Introduce test.assertDeepEq r=rpl,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D153531
2022-08-16 20:06:37 +00:00
Rob Wu
f9cec0891a Bug 1780747 - Restrict DNR permissions to MV3 for now r=rpl
Restrict the DNR permissions to MV3 to allow the add-ons linter to
easily flag the use of the not-yet-supported DNR permission, until
we do actually enable the feature.

Since the full DNR namespace is gated on this permission, this
effectively means that in order to use the API, not only the
extensions.dnr.enabled pref needs to be set, but also the
extensions.manifestV3.enabled pref + using manifest_version: 3..

Differential Revision: https://phabricator.services.mozilla.com/D153458
2022-08-09 12:16:34 +00:00
Rob Wu
7e7534ced4 Bug 1780747 - Register DNR schema and permissions r=rpl,geckoview-reviewers,owlish,flod
This patch adds the minimum necessary to register the
declarativeNetRequest API and its permissions, behind prefs.

Tests have been added/updated to verify that the permissions and API
access are enforced correctly (effectiveness of preferences, API
visibility, permission warnings).

Before landing this, we need to register the permission warning in
Android-Components too, as mentioned in the bug (i.e. bug 1671453).

Differential Revision: https://phabricator.services.mozilla.com/D152503
2022-08-09 12:16:34 +00:00
Cristian Tuns
a96814126e Backed out 2 changesets (bug 1780747) for causing xpcshell failures on test_ext_permission_warnings.js CLOSED TREE
Backed out changeset be950e847c33 (bug 1780747)
Backed out changeset b07c7315a02a (bug 1780747)
2022-08-08 19:04:56 -04:00
Rob Wu
7832030f4f Bug 1780747 - Restrict DNR permissions to MV3 for now r=rpl
Restrict the DNR permissions to MV3 to allow the add-ons linter to
easily flag the use of the not-yet-supported DNR permission, until
we do actually enable the feature.

Since the full DNR namespace is gated on this permission, this
effectively means that in order to use the API, not only the
extensions.dnr.enabled pref needs to be set, but also the
extensions.manifestV3.enabled pref + using manifest_version: 3..

Differential Revision: https://phabricator.services.mozilla.com/D153458
2022-08-08 22:11:08 +00:00
Rob Wu
f8ed240ae5 Bug 1780747 - Register DNR schema and permissions r=rpl,geckoview-reviewers,owlish,flod
This patch adds the minimum necessary to register the
declarativeNetRequest API and its permissions, behind prefs.

Tests have been added/updated to verify that the permissions and API
access are enforced correctly (effectiveness of preferences, API
visibility, permission warnings).

Before landing this, we need to register the permission warning in
Android-Components too, as mentioned in the bug (i.e. bug 1671453).

Differential Revision: https://phabricator.services.mozilla.com/D152503
2022-08-08 22:11:08 +00:00
Gerald Squelart
6cd5fee5d2 Bug 1571089 - Remove the "leaf" profiler feature - r=canaltinova
We currently support stack walking everywhere, and when it fails, we fall back
to leaf stacks. The leaf option is a bit confusing in how it works, and doesn't
provide much value.

Differential Revision: https://phabricator.services.mozilla.com/D153695
2022-08-08 12:29:43 +00:00
William Durand
f1509d8749 Bug 1751436 - Add support for persistAcrossSessions in scripting.RegisteredContentScript. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D147671
2022-08-04 09:09:07 +00:00
Shane Caraveo
bc481f252f Bug 1773115 ensure extension access to its own web accessible resources r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D150498
2022-08-02 17:08:59 +00:00
Shane Caraveo
f1212fb1db Bug 1711168 support extension matching in webAccessibleResources r=zombie,smaug,rpl
Differential Revision: https://phabricator.services.mozilla.com/D115114
2022-08-02 17:08:58 +00:00
Butkovits Atila
ae6f4c94fc Backed out 3 changesets (bug 1711168, bug 1773115) for causing failures at test_ext_web_accessible_resources.html. CLOSED TREE
Backed out changeset 703c909eb009 (bug 1773115)
Backed out changeset 902385a7ce60 (bug 1711168)
Backed out changeset 3d061ce03de7 (bug 1711168)
2022-07-27 00:13:26 +03:00
Shane Caraveo
8d60992fa4 Bug 1773115 ensure extension access to its own web accessible resources r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D150498
2022-07-26 19:39:15 +00:00
Shane Caraveo
a73cd6df49 Bug 1711168 support extension matching in webAccessibleResources r=zombie,smaug,rpl
Differential Revision: https://phabricator.services.mozilla.com/D115114
2022-07-26 19:39:14 +00:00
Tim Huang
d33b3438a7 Bug 1773695 - Part 4: Add email tracking flags to webrequest. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D151151
2022-07-18 21:48:16 +00:00
criss
b77dc7a479 Backed out 6 changesets (bug 1773691, bug 1773695) for causing Bp-hybrid bustages on UrlClassifierFeatureEmailTrackingProtection
Backed out changeset f402f1bd4caa (bug 1773695)
Backed out changeset 001c38822c53 (bug 1773695)
Backed out changeset 8ef4d3597d92 (bug 1773695)
Backed out changeset f4770b2fe53d (bug 1773695)
Backed out changeset fb625ae08f73 (bug 1773695)
Backed out changeset 6c23adf9184f (bug 1773691)
2022-07-14 23:41:50 +03:00
Tim Huang
b4ceda6504 Bug 1773695 - Part 4: Add email tracking flags to webrequest. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D151151
2022-07-14 19:39:33 +00:00
Matthew Gaudet
edb3b93ed6 Bug 1777529 - Remove Profiler Support for TraceLogger r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D150768
2022-07-13 15:26:47 +00:00
Shane Caraveo
7fb400fd9d Bug 1776841 Support <all_urls> in MV3 web_accessible_resources[].matches r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D151071
2022-07-12 21:19:26 +00:00
Butkovits Atila
c12865c623 Backed out changeset c48a6a27843f (bug 1776841) for causing xpcshell failures at test_ext_web_accessible_resources_matches.js. CLOSED TREE 2022-07-07 01:47:08 +03:00
Shane Caraveo
57e74c9d69 Bug 1776841 Support <all_urls> in MV3 web_accessible_resources[].matches r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D151071
2022-07-06 20:57:09 +00:00
Florian Queze
e21c8845f3 Bug 1774844 - Add a new 'Power Use' (ie. 'power') profiler feature, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D150059
2022-06-29 21:24:11 +00:00
Andreea Pavel
488ec4bffd Backed out 3 changesets (bug 1774844) for failing condprof at test_ext_geckoProfiler_schema.js on a CLOSED TREE
Backed out changeset f33bef1f7d56 (bug 1774844)
Backed out changeset b4b82b6892b3 (bug 1774844)
Backed out changeset d98352922a5c (bug 1774844)
2022-06-29 18:29:18 +03:00
Florian Queze
07bd81efcd Bug 1774844 - Add a new 'Power Use' (ie. 'power') profiler feature, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D150059
2022-06-29 13:29:44 +00:00
Luca Greco
61c161b441 Bug 1739114 - Moved privileged WebExtensions permissions in their own JSONSchema type and added a new custom privileged keyword on each privileged manifest fields. r=robwu,mixedpuppy
This patch includes only the subset of D145687 changes related to the reworked JSONSchema data, plus some minor changes to Schemas.jsm to take the new
JSONSchema type ("PrivilegedPermissions") and the new custom JSONSchema keyword (the boolean "privileged" property used to identify manifest fields
only allowed in privileged extensions).

Besides the changes to the schema data, this patch is not expected to introduce any difference in behavior and so it could also land on its own
if needed (and the rest of the changes landed separately).

Differential Revision: https://phabricator.services.mozilla.com/D146800
2022-05-20 08:55:03 +00:00
Marian-Vasile Laza
6924977975 Backed out changeset d3577f741ef5 (bug 1739114) for causing xpcshell failures on test_ext_permissions.js. CLOSED TREE 2022-05-19 23:35:07 +03:00
Luca Greco
b928b2d0a8 Bug 1739114 - Moved privileged WebExtensions permissions in their own JSONSchema type and added a new custom privileged keyword on each privileged manifest fields. r=robwu,mixedpuppy
This patch includes only the subset of D145687 changes related to the reworked JSONSchema data, plus some minor changes to Schemas.jsm to take the new
JSONSchema type ("PrivilegedPermissions") and the new custom JSONSchema keyword (the boolean "privileged" property used to identify manifest fields
only allowed in privileged extensions).

Besides the changes to the schema data, this patch is not expected to introduce any difference in behavior and so it could also land on its own
if needed (and the rest of the changes landed separately).

Differential Revision: https://phabricator.services.mozilla.com/D146800
2022-05-19 18:20:59 +00:00
William Durand
6ea3cb2b54 Bug 1766615 - Enable scripting APIs in MV2. r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D145629
2022-05-10 14:30:24 +00:00
William Durand
d8f7805736 Bug 1754924 - Deprecate nonPersistentCookies option from the privacy.websites.cookieConfig API. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D145249
2022-05-06 18:03:31 +00:00
Iulian Moraru
ba4edef826 Backed out 2 changesets (bug 1766615, bug 1760451) for causing mochitest failures on test_ext_scripting_permissions.html. CLOSED TREE
Backed out changeset 4db3945f4fcb (bug 1760451)
Backed out changeset 74cf7a839ea5 (bug 1766615)
2022-05-06 17:43:46 +03:00
William Durand
12958808f5 Bug 1766615 - Enable scripting APIs in MV2. r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D145629
2022-05-06 11:31:46 +00:00
William Durand
8aed0d5f01 Bug 1762366 - Add an injectImmediately option in scripting.executeScript(). r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D143697
2022-04-26 14:09:58 +00:00
Csoregi Natalia
368001bc1d Backed out changeset 64a0fc3e1e44 (bug 1762366) for causing failures on test_ext_scripting_executeScript_injectImmediately.html. CLOSED TREE 2022-04-26 14:57:22 +03:00
William Durand
25225e53b3 Bug 1762366 - Add an injectImmediately option in scripting.executeScript(). r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D143697
2022-04-26 11:09:29 +00:00
Rob Wu
cda568340e Bug 1764566 - Update API availability in MV3 r=mixedpuppy
- Remove unsupported tabs API definitions that are gone in MV3.
- Mark content script APIs (superseded by scripting APIs) as MV2-only.
- Re-enable extension.getBackgroundPage in MV2 since it makes sense with
  event pages, and we enabled runtime.getBackgroundPage in bug 1759308.
- Add tests that verify API availability in MV3.

Differential Revision: https://phabricator.services.mozilla.com/D143721
2022-04-17 16:43:50 +00:00
Rob Wu
a8c8aab2e1 Bug 1758475 - Add StorageArea.onChanged event targets r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D142519
2022-04-06 20:39:13 +00:00
Shane Caraveo
0db02f40d1 Bug 1753850 implement runtime.onSuspend for non-persistent background r=rpl,robwu
Differential Revision: https://phabricator.services.mozilla.com/D137950
2022-03-28 21:44:48 +00:00
Butkovits Atila
467da1afa1 Backed out changeset 8ca972dfa3d8 (bug 1753850) for causing Android Xpcshell failures. CLOSED TREE 2022-03-28 21:57:06 +03:00
Shane Caraveo
f974eb5d15 Bug 1753850 implement runtime.onSuspend for non-persistent background r=rpl,robwu
Differential Revision: https://phabricator.services.mozilla.com/D137950
2022-03-28 16:46:43 +00:00
William Durand
399eb9a6c7 Bug 1759932 - Add support for world: 'ISOLATED' in scripting.ScriptInjection. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D141292
2022-03-18 11:38:13 +00:00
Shane Caraveo
0355c0ad6a Bug 1759308 make getBackgroundPage load the event page if necessary r=robwu,rpl
Differential Revision: https://phabricator.services.mozilla.com/D140919
2022-03-17 14:54:04 +00:00
Emilio Cobos Álvarez
3d2bf29691 Bug 1750932 - Add color_scheme / content_color_scheme properties to theme API. r=robwu,dao
This allows themes to override our light / dark theme heuristics if they
choose to, so that we don't have to complicate the heuristics too much.

This is specially useful for themes with images, where the image might
be "light", but still have enough contrast with light text. A good
example is the theme mentioned in bug 1749837 comment 0.

The semantics are:

 * color_scheme: If set, overrides the general "toolbar theme" (so
   window and context menu appearance and so on), otherwise we fall back
   to heuristics.

 * content_color_scheme: If set, overrides the color scheme for the
   content area. Otherwise we fall back to color_scheme if present, or
   heuristics otherwise.

One thing that I didn't include was a sort of "system" option, which
might be useful to say "this theme is neutral, and works both for light
and dark themes". Let me know if you think that's a must-have, otherwise
I think it's probably worth deferring to a follow-up if it's needed at
all.

Differential Revision: https://phabricator.services.mozilla.com/D136354
2022-03-17 14:44:03 +00:00
William Durand
b193dabebb Bug 1736585 - Initial implementation of scripting.updateContentScripts(). r=robwu
Depends on D140729

Differential Revision: https://phabricator.services.mozilla.com/D139037
2022-03-17 14:34:45 +00:00
William Durand
dc07caf975 Bug 1755976 - Add support for css in scripting.RegisteredContentScript. r=robwu
Depends on D140631

Differential Revision: https://phabricator.services.mozilla.com/D140729
2022-03-15 15:13:22 +00:00
Tomislav Jovanovic
0f29ff78ca Bug 1745818 - Treat host permissions as optional in mv3, r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D136225
2022-03-12 20:14:41 +00:00
Iulian Moraru
351eb726f4 Backed out changeset 53b7b2117588 (bug 1745818) for causing mochitest failures on test_ext_scripting_executeScript.html. CLOSED TREE 2022-03-12 18:49:21 +02:00
Tomislav Jovanovic
d4e3e7af7f Bug 1745818 - Treat host permissions as optional in mv3, r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D136225
2022-03-12 15:51:40 +00:00
William Durand
a7cea289a4 Bug 1758007 - Add support for persistAcrossSessions: false in scripting.RegisteredContentScript. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D140631
2022-03-11 09:43:48 +00:00
William Durand
c1292fa5c4 Bug 1736584 - Initial implementation of scripting.unregisterContentScripts(). r=robwu
Depends on D139503

Differential Revision: https://phabricator.services.mozilla.com/D138819
2022-03-04 12:12:37 +00:00