From e5e531485c95e57741a2bf36728927fb8b9b0a93 Mon Sep 17 00:00:00 2001 From: Timothy Hatcher Date: Tue, 23 Aug 2022 11:13:09 -0700 Subject: [PATCH 1/4] Add better version specific notes for Safari support. --- webextensions/api/runtime.json | 32 ++++++--- webextensions/manifest/background.json | 67 +++++++++++++++---- .../manifest/chrome_url_overrides.json | 13 +++- .../manifest/externally_connectable.json | 2 +- webextensions/manifest/permissions.json | 30 ++++++--- 5 files changed, 111 insertions(+), 33 deletions(-) diff --git a/webextensions/api/runtime.json b/webextensions/api/runtime.json index c66ebeeb7c5c0c..db34f03898277a 100644 --- a/webextensions/api/runtime.json +++ b/webextensions/api/runtime.json @@ -862,14 +862,30 @@ }, "firefox_android": "mirror", "opera": "mirror", - "safari": { - "notes": "In Safari 14, this event is fired in response to a message from an extension's containing app. In Safari 15.4 and later, this event is also fired in response to a message from webpages.", - "version_added": "14" - }, - "safari_ios": { - "notes": "In Safari 15, this event is fired in response to a message from an extension's containing app. In Safari 15.4 and later, this event is also fired in response to a message from webpages.", - "version_added": "15" - } + "safari": [ + { + "version_added": "15.4", + "partial_implementation": true, + "notes": "Since Safari 15.4, this event is also fired in response to a message from webpages allowed in externally_connectable." + }, + { + "version_added": "14", + "partial_implementation": true, + "notes": "This event is only fired in response to a message from an extension's containing app, not webpages nor other extensions." + } + ], + "safari_ios": [ + { + "version_added": "15.4", + "partial_implementation": true, + "notes": "Since Safari 15.4, this event is also fired in response to a message from webpages allowed in externally_connectable." + }, + { + "version_added": "15", + "partial_implementation": true, + "notes": "This event is only fired in response to a message from an extension's containing app, not webpages nor other extensions." + } + ] } }, "return_promise": { diff --git a/webextensions/manifest/background.json b/webextensions/manifest/background.json index 452be2caab93e8..1e42d461ed8034 100644 --- a/webextensions/manifest/background.json +++ b/webextensions/manifest/background.json @@ -39,10 +39,12 @@ "firefox_android": "mirror", "opera": "mirror", "safari": { - "version_added": "14" + "version_added": "14", + "notes": "Available for use in Manifest V2 or later." }, "safari_ios": { - "version_added": "15" + "version_added": "15", + "notes": "Available for use in Manifest V2 or later." } } } @@ -66,14 +68,29 @@ }, "firefox_android": "mirror", "opera": "mirror", - "safari": { - "notes": "Before 14.1, only persistent pages are supported.", - "version_added": "14" - }, - "safari_ios": { - "notes": "Only non-persistent pages are supported. Requires persistent: false.", - "version_added": "15" - } + "safari": [ + { + "version_added": "14.1", + "notes": "Since Safari 15.4, ignored if service_worker is used." + }, + { + "version_added": "14", + "partial_implementation": true, + "notes": "Only persistent pages are supported." + } + ], + "safari_ios": [ + { + "notes": "Only non-persistent pages are supported. Requires persistent: false or service_worker.", + "partial_implementation": true, + "version_added": "15.4" + }, + { + "notes": "Only non-persistent pages are supported. Requires persistent: false.", + "partial_implementation": true, + "version_added": "15" + } + ] } } }, @@ -81,7 +98,8 @@ "__compat": { "support": { "chrome": { - "version_added": true + "version_added": true, + "notes": "Available for use in Manifest V2 only." }, "edge": { "version_added": "14" @@ -93,13 +111,36 @@ "firefox_android": "mirror", "opera": "mirror", "safari": { - "version_added": "14" + "version_added": "14", + "notes": "Available for use in Manifest V2 or later." }, "safari_ios": { - "version_added": "15" + "version_added": "15", + "notes": "Available for use in Manifest V2 or later." } } } + }, + "service_worker": { + "__compat": { + "support": { + "chrome": { + "version_added": "88", + "notes": "Available for use in Manifest V2 or later." + }, + "edge": "mirror", + "firefox": { + "version_added": false + }, + "firefox_android": "mirror", + "opera": "mirror", + "safari": { + "version_added": "15.4", + "notes": "Available for use in Manifest V2 or later." + }, + "safari_ios": "mirror" + } + } } } } diff --git a/webextensions/manifest/chrome_url_overrides.json b/webextensions/manifest/chrome_url_overrides.json index 08257fdc2b0cf6..dce8830f1ed180 100644 --- a/webextensions/manifest/chrome_url_overrides.json +++ b/webextensions/manifest/chrome_url_overrides.json @@ -20,10 +20,17 @@ "opera": { "version_added": false }, - "safari": { - "version_added": "14.1" - }, + "safari": [ + { + "version_added": "14.1" + }, + { + "alternative_name": "browser_url_overrides", + "version_added": "15" + } + ], "safari_ios": { + "alternative_name": "browser_url_overrides", "version_added": "15" } } diff --git a/webextensions/manifest/externally_connectable.json b/webextensions/manifest/externally_connectable.json index 4ddc3b8cfdcd27..2aa7f6b92002e7 100644 --- a/webextensions/manifest/externally_connectable.json +++ b/webextensions/manifest/externally_connectable.json @@ -21,7 +21,7 @@ "opera": "mirror", "safari": { "version_added": "15.4", - "notes": "Safari only supports the matches attribute." + "notes": "Safari only supports the matches property." }, "safari_ios": "mirror" } diff --git a/webextensions/manifest/permissions.json b/webextensions/manifest/permissions.json index 6cb4b1e0f23660..f293ab055707ab 100644 --- a/webextensions/manifest/permissions.json +++ b/webextensions/manifest/permissions.json @@ -891,14 +891,28 @@ "opera": { "version_added": false }, - "safari": { - "notes": "Before Safari 16, this permission granted a 10 MB storage quota. Since Safari 16, the storage quota is unlimited.", - "version_added": "14" - }, - "safari_ios": { - "notes": "Does not grant an unlimited storage quota. Grants a 10 MB storage quota, instead of the standard 5 MB.", - "version_added": "15" - } + "safari": [ + { + "version_added": "16", + "notes": "Since Safari 16, the storage quota is unlimited." + }, + { + "version_added": "14", + "partial_implementation": true, + "notes": "Does not grant an unlimited storage quota. Grants a 10 MB storage quota, instead of the standard 5 MB." + } + ], + "safari_ios": [ + { + "version_added": "16", + "notes": "Since Safari 16, the storage quota is unlimited." + }, + { + "version_added": "15", + "partial_implementation": true, + "notes": "Does not grant an unlimited storage quota. Grants a 10 MB storage quota, instead of the standard 5 MB." + } + ] } } }, From c1b326d32f09963fb87e8c07df0519488fea0dab Mon Sep 17 00:00:00 2001 From: Timothy Hatcher Date: Tue, 23 Aug 2022 11:13:57 -0700 Subject: [PATCH 2/4] Add Safari 16 version support for getFrameId and drop STP reference. --- webextensions/api/runtime.json | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/webextensions/api/runtime.json b/webextensions/api/runtime.json index db34f03898277a..110143b2738cef 100644 --- a/webextensions/api/runtime.json +++ b/webextensions/api/runtime.json @@ -462,12 +462,9 @@ "firefox_android": "mirror", "opera": "mirror", "safari": { - "version_added": false, - "notes": "Available in Safari Technology Preview 142." + "version_added": "16" }, - "safari_ios": { - "version_added": false - } + "safari_ios": "mirror" } } }, From f771414935aacad632578b2ad54dd3ac0f59ee72 Mon Sep 17 00:00:00 2001 From: Timothy Hatcher Date: Tue, 23 Aug 2022 11:24:01 -0700 Subject: [PATCH 3/4] Add more consistent manifest version availability notes. * Features that are dropped in V3 noted as "Manifest V2 only". * Features that are added in V3 noted as "Manifest V3 or later" to avoid prematurely limiting to V3 when future versions are supported. * Features that are dropped in V3 by some browsers but are supported in full in others still noted as "Manifest V2 or later". --- webextensions/api/scripting.json | 6 ++-- webextensions/api/tabs.json | 34 +++++++++---------- webextensions/manifest/background.json | 8 +++-- .../manifest/content_security_policy.json | 9 ++--- webextensions/manifest/host_permissions.json | 6 ++-- 5 files changed, 32 insertions(+), 31 deletions(-) diff --git a/webextensions/api/scripting.json b/webextensions/api/scripting.json index 4797ec1839ebef..49503d3417dbab 100644 --- a/webextensions/api/scripting.json +++ b/webextensions/api/scripting.json @@ -7,7 +7,8 @@ "mdn_url": "https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/scripting/InjectionTarget", "support": { "chrome": { - "version_added": "88" + "version_added": "88", + "notes": "Available for use in Manifest V3 or later." }, "edge": "mirror", "firefox": { @@ -16,7 +17,8 @@ "firefox_android": "mirror", "opera": "mirror", "safari": { - "version_added": "15.4" + "version_added": "15.4", + "notes": "Available for use in Manifest V2 or later." }, "safari_ios": "mirror" } diff --git a/webextensions/api/tabs.json b/webextensions/api/tabs.json index 4a86f6e721a53c..3999e19997cff7 100644 --- a/webextensions/api/tabs.json +++ b/webextensions/api/tabs.json @@ -1855,32 +1855,32 @@ "version_added": true, "notes": [ "Extensions can't inject scripts into their own pages using this API.", - "Not available for use in Manifest V3." + "Available for use in Manifest V2 only." ] }, "edge": { "version_added": "14", - "notes": "Not available for use in Manifest V3." + "notes": "Available for use in Manifest V2 only." }, "firefox": { "version_added": "43", "notes": [ "Before version 50, Firefox would pass a single result value into its callback rather than an array, unless 'allFrames' had been set.", - "Not available for use in Manifest V3." + "Available for use in Manifest V2 only." ] }, "firefox_android": { "version_added": "54", - "notes": "Not available for use in Manifest V3." + "notes": "Available for use in Manifest V2 only." }, "opera": "mirror", "safari": { "version_added": "14", - "notes": "Not available for use in Manifest V3." + "notes": "Available for use in Manifest V2 only." }, "safari_ios": { "version_added": "15", - "notes": "Not available for use in Manifest V3." + "notes": "Available for use in Manifest V2 only." } } }, @@ -2227,28 +2227,28 @@ "support": { "chrome": { "version_added": true, - "notes": "Not available for use in Manifest V3." + "notes": "Available for use in Manifest V2 only." }, "edge": { "version_added": "14", - "notes": "Not available for use in Manifest V3." + "notes": "Available for use in Manifest V2 only." }, "firefox": { "version_added": "47", - "notes": "Not available for use in Manifest V3." + "notes": "Available for use in Manifest V2 only." }, "firefox_android": { "version_added": "54", - "notes": "Not available for use in Manifest V3." + "notes": "Available for use in Manifest V2 only." }, "opera": "mirror", "safari": { "version_added": "14", - "notes": "Not available for use in Manifest V3." + "notes": "Available for use in Manifest V2 only." }, "safari_ios": { "version_added": "15", - "notes": "Not available for use in Manifest V3." + "notes": "Available for use in Manifest V2 only." } } }, @@ -3544,25 +3544,25 @@ "support": { "chrome": { "version_added": "87", - "notes": "Not available for use in Manifest V3." + "notes": "Available for use in Manifest V2 only." }, "edge": "mirror", "firefox": { "version_added": "49", - "notes": "Not available for use in Manifest V3." + "notes": "Available for use in Manifest V2 only." }, "firefox_android": { "version_added": "54", - "notes": "Not available for use in Manifest V3." + "notes": "Available for use in Manifest V2 only." }, "opera": "mirror", "safari": { "version_added": "14", - "notes": "Not available for use in Manifest V3." + "notes": "Available for use in Manifest V2 only." }, "safari_ios": { "version_added": "15", - "notes": "Not available for use in Manifest V3." + "notes": "Available for use in Manifest V2 only." } } } diff --git a/webextensions/manifest/background.json b/webextensions/manifest/background.json index 1e42d461ed8034..d9ce3212098c16 100644 --- a/webextensions/manifest/background.json +++ b/webextensions/manifest/background.json @@ -28,7 +28,8 @@ "__compat": { "support": { "chrome": { - "version_added": true + "version_added": true, + "notes": "Available for use in Manifest V2 only." }, "edge": { "version_added": "14" @@ -53,11 +54,12 @@ "__compat": { "support": { "chrome": { - "version_added": true + "version_added": true, + "notes": "Available for use in Manifest V2 only." }, "edge": { "version_added": "14", - "notes": "The 'persistent' property is mandatory." + "notes": "The persistent property is mandatory." }, "firefox": { "version_added": "48", diff --git a/webextensions/manifest/content_security_policy.json b/webextensions/manifest/content_security_policy.json index 3b50e3b5147978..01709947709c44 100644 --- a/webextensions/manifest/content_security_policy.json +++ b/webextensions/manifest/content_security_policy.json @@ -34,10 +34,7 @@ "support": { "chrome": { "version_added": "88", - "notes": [ - "Available in Canary builds.", - "Available to Manifest V3 only." - ] + "notes": "Available for use in Manifest V3 or later." }, "edge": "mirror", "firefox": { @@ -53,11 +50,11 @@ "firefox_android": "mirror", "opera": { "version_added": "74", - "notes": "Available to Manifest V3 only." + "notes": "Available for use in Manifest V3 or later." }, "safari": { "version_added": "15.4", - "notes": "Available to Manifest V3 only." + "notes": "Available for use in Manifest V3 or later." }, "safari_ios": "mirror" } diff --git a/webextensions/manifest/host_permissions.json b/webextensions/manifest/host_permissions.json index 815bd44306b0f3..1ddca19b24baf9 100644 --- a/webextensions/manifest/host_permissions.json +++ b/webextensions/manifest/host_permissions.json @@ -7,18 +7,18 @@ "support": { "chrome": { "version_added": "88", - "notes": "Available for use in Manifest V3 only." + "notes": "Available for use in Manifest V3 or later." }, "edge": "mirror", "firefox": { "version_added": "101", - "notes": "Available for use in Manifest V3 only." + "notes": "Available for use in Manifest V3 or later." }, "firefox_android": "mirror", "opera": "mirror", "safari": { "version_added": "15.4", - "notes": "Available for use in Manifest V3 only." + "notes": "Available for use in Manifest V3 or later." }, "safari_ios": "mirror" } From 8f0f5d40cecce339893ed592a855820a62509d3d Mon Sep 17 00:00:00 2001 From: Timothy Hatcher Date: Tue, 23 Aug 2022 12:24:25 -0700 Subject: [PATCH 4/4] More consistent use of required/optional instead of mandatory. --- webextensions/api/tabs.json | 4 ++-- webextensions/manifest/author.json | 2 +- webextensions/manifest/background.json | 2 +- .../manifest/browser_specific_settings.json | 14 ++++---------- webextensions/manifest/theme.json | 10 +++++----- 5 files changed, 13 insertions(+), 19 deletions(-) diff --git a/webextensions/api/tabs.json b/webextensions/api/tabs.json index 3999e19997cff7..db690eccf7626b 100644 --- a/webextensions/api/tabs.json +++ b/webextensions/api/tabs.json @@ -1336,14 +1336,14 @@ "safari": { "notes": [ "The default file format is 'jpeg'.", - "<all_urls> permission is not required to call this." + "<all_urls> permission is optional." ], "version_added": "14" }, "safari_ios": { "notes": [ "The default file format is 'jpeg'.", - "<all_urls> permission is not required to call this." + "<all_urls> permission is optional." ], "version_added": "15" } diff --git a/webextensions/manifest/author.json b/webextensions/manifest/author.json index 5e404c5ba9d328..34a589de17664c 100644 --- a/webextensions/manifest/author.json +++ b/webextensions/manifest/author.json @@ -10,7 +10,7 @@ }, "edge": { "version_added": "14", - "notes": "This key is mandatory in Microsoft Edge." + "notes": "This property is required." }, "firefox": { "version_added": "52" diff --git a/webextensions/manifest/background.json b/webextensions/manifest/background.json index d9ce3212098c16..18e43541067a4f 100644 --- a/webextensions/manifest/background.json +++ b/webextensions/manifest/background.json @@ -59,7 +59,7 @@ }, "edge": { "version_added": "14", - "notes": "The persistent property is mandatory." + "notes": "This property is required." }, "firefox": { "version_added": "48", diff --git a/webextensions/manifest/browser_specific_settings.json b/webextensions/manifest/browser_specific_settings.json index 18630ade742fa3..a637162f2426f3 100644 --- a/webextensions/manifest/browser_specific_settings.json +++ b/webextensions/manifest/browser_specific_settings.json @@ -12,16 +12,10 @@ "version_added": "15", "version_removed": "79" }, - "firefox": [ - { - "version_added": "48" - }, - { - "version_added": "42", - "alternative_name": "applications", - "notes": "Mandatory before Firefox 48." - } - ], + "firefox": { + "version_added": "42", + "notes": "Before Firefox 48, this property was required." + }, "firefox_android": "mirror", "opera": "mirror", "safari": { diff --git a/webextensions/manifest/theme.json b/webextensions/manifest/theme.json index 2c71835582c4e5..a7e18ece863ae0 100644 --- a/webextensions/manifest/theme.json +++ b/webextensions/manifest/theme.json @@ -62,8 +62,8 @@ "version_added": "55", "version_removed": "70", "notes": [ - "Before version 59, the RGB array form was not supported for this property.", - "Before version 63, this property was mandatory.", + "Before Firefox 59, the RGB array form was not supported for this property.", + "Before Firefox 63, this property was required.", "Use frame instead." ] }, @@ -633,8 +633,8 @@ "version_added": "55", "version_removed": "70", "notes": [ - "Before version 59, the RGB array form was not supported for this property.", - "Before version 63, this property was mandatory.", + "Before Firefox 59, the RGB array form was not supported for this property.", + "Before Firefox 63, this property was required.", "Use tab_background_text instead." ] }, @@ -990,7 +990,7 @@ }, "firefox": { "version_added": "55", - "notes": "Mandatory before Firefox 60" + "notes": "Before Firefox 60, this property was required." }, "firefox_android": { "version_added": true