From 648690d7a516b140a236307bb25201ac313577ec Mon Sep 17 00:00:00 2001 From: Jared Wein Date: Mon, 20 Jul 2020 10:05:58 +0000 Subject: [PATCH] Bug 1649250 - Add experimental features that were introduced in Firefox Nightly 70 and higher. r=jbauman,kvark,jwatt,mayhemer,emilio,masayuki,baku,gl,preferences-reviewers,jdescottes,Pike Differential Revision: https://phabricator.services.mozilla.com/D81623 --- .../browser_misused_characters_in_strings.js | 7 ++ toolkit/components/featuregates/Features.toml | 115 ++++++++++++++++-- .../en-US/toolkit/featuregates/features.ftl | 75 ++++++++++-- .../tests/browser/browser_Troubleshoot.js | 8 +- 4 files changed, 180 insertions(+), 25 deletions(-) diff --git a/browser/base/content/test/static/browser_misused_characters_in_strings.js b/browser/base/content/test/static/browser_misused_characters_in_strings.js index 090d891383ee..82e4f4309078 100644 --- a/browser/base/content/test/static/browser_misused_characters_in_strings.js +++ b/browser/base/content/test/static/browser_misused_characters_in_strings.js @@ -115,6 +115,13 @@ let gWhitelist = [ key: "tos", type: "double-quote", }, + // This string contains HTML markup describing `` and therefore + // is meant to contain actual double quotes. + { + file: "features.ftl", + key: "experimental-features-web-api-link-preload-description", + type: "double-quote", + }, ]; /** diff --git a/toolkit/components/featuregates/Features.toml b/toolkit/components/featuregates/Features.toml index 39721967b11b..68174b61dd28 100644 --- a/toolkit/components/featuregates/Features.toml +++ b/toolkit/components/featuregates/Features.toml @@ -1,5 +1,5 @@ [css-masonry] -title = "experimental-features-css-masonry" +title = "experimental-features-css-masonry2" description = "experimental-features-css-masonry-description" description-links = {explainer = "https://github.com/w3c/csswg-drafts/blob/master/css-grid-2/MASONRY-EXPLAINER.md", w3c-issue = "https://github.com/w3c/csswg-drafts/issues/4650", bug = "https://bugzilla.mozilla.org/show_bug.cgi?id=1607439"} restart-required = false @@ -7,27 +7,116 @@ preference = "layout.css.grid-template-masonry-value.enabled" type = "boolean" bug-numbers = [1607954] is-public = true -default-value = false -[web-gpu] -title = "experimental-features-web-gpu" -description = "experimental-features-web-gpu-description" +[web-api-webgpu] +title = "experimental-features-web-gpu2" +description = "experimental-features-web-gpu-description2" +description-links = {wikipedia = "https://en.wikipedia.org/wiki/Graphics%20Processing%20Unit", spec = "https://gpuweb.github.io/gpuweb/", bugzilla = "https://bugzilla.mozilla.org/show_bug.cgi?id=1602129"} restart-required = true preference = "dom.webgpu.enabled" type = "boolean" bug-numbers = [1602129] is-public = {default = false, nightly = true} -default-value = false -[avif] -title = "experimental-features-avif" -description = "experimental-features-avif-description" +[media-avif] +title = "experimental-features-media-avif" +description = "experimental-features-media-avif-description" +description-links = {bugzilla = "https://bugzilla.mozilla.org/show_bug.cgi?id=1443863"} restart-required = false preference = "image.avif.enabled" type = "boolean" bug-numbers = [1443863] is-public = {default = false, nightly = true} -default-value = false + +[web-api-inputmode] +title = "experimental-features-web-api-inputmode" +description = "experimental-features-web-api-inputmode-description" +description-links = {mdn-inputmode = "https://developer.mozilla.org/docs/Web/HTML/Global_attributes/inputmode", whatwg = "https://bugzilla.mozilla.org/show_bug.cgi?id=1509527", bugzilla = "https://bugzilla.mozilla.org/show_bug.cgi?id=1205133"} +restart-required = false +preference = "dom.forms.inputmode" +type = "boolean" +bug-numbers = [1205133] +is-public = {default = false, nightly = true} + +[web-api-link-preload] +title = "experimental-features-web-api-link-preload" +description = "experimental-features-web-api-link-preload-description" +description-links = {link = "https://developer.mozilla.org/docs/Web/HTML/Element/link", rel = "https://developer.mozilla.org/docs/Web/HTML/Element/link#attr-rel", readmore = "https://developer.mozilla.org/docs/Web/HTML/Preloading_content", bugzilla = "https://bugzilla.mozilla.org/show_bug.cgi?id=1583604"} +restart-required = false +preference = "network.preload" +type = "boolean" +bug-numbers = [1583604] +is-public = {default = false, nightly = true} + +[css-focus-visible] +title = "experimental-features-css-focus-visible" +description = "experimental-features-css-focus-visible-description" +description-links = {bugzilla = "https://bugzilla.mozilla.org/show_bug.cgi?id=1617600"} +restart-required = false +preference = "layout.css.focus-visible.enabled" +type = "boolean" +bug-numbers = [1617600] +is-public = {default = false, nightly = true} + +[web-api-beforeinput] +title = "experimental-features-web-api-beforeinput" +description = "experimental-features-web-api-beforeinput-description" +description-links = {mdn-beforeinput = "https://developer.mozilla.org/docs/Web/API/HTMLElement/beforeinput_event", mdn-input = "https://developer.mozilla.org/docs/Web/HTML/Element/input", mdn-textarea = "https://developer.mozilla.org/docs/Web/HTML/Element/textarea", mdn-contenteditable = "https://developer.mozilla.org/docs/Web/HTML/Global_attributes#attr-contenteditable"} +restart-required = false +preference = "dom.input_events.beforeinput.enabled" +type = "boolean" +bug-numbers = [1609291] +is-public = {default = false, nightly = true} + +[css-constructable-stylesheets] +title = "experimental-features-css-constructable-stylesheets" +description = "experimental-features-css-constructable-stylesheets-description" +description-links = {mdn-cssstylesheet = "https://developer.mozilla.org/docs/Web/API/CSSStyleSheet", mdn-shadowdom = "https://developer.mozilla.org/docs/Web/Web_Components/Using_shadow_DOM", bugzilla = "https://bugzilla.mozilla.org/show_bug.cgi?id=1520690"} +restart-required = false +preference = "layout.css.constructable-stylesheets.enabled" +type = "boolean" +bug-numbers = [1520690] +is-public = {default = false, nightly = true} + +[media-session-api] +title = "experimental-features-media-session-api" +description = "experimental-features-media-session-api-description" +description-links = {bugzilla = "https://bugzilla.mozilla.org/show_bug.cgi?id=1112032"} +restart-required = false +preference = "dom.media.mediasession.enabled" +type = "boolean" +bug-numbers = [1112032] +is-public = {default = false, nightly = true} + +[devtools-color-scheme-simulation] +title = "experimental-features-devtools-color-scheme-simulation" +description = "experimental-features-devtools-color-scheme-simulation-description" +description-links = {mdn-preferscolorscheme = "https://developer.mozilla.org/docs/Web/CSS/@media/prefers-color-scheme", bugzilla1 = "https://bugzilla.mozilla.org/show_bug.cgi?id=1550804", bugzilla2 = "https://bugzilla.mozilla.org/show_bug.cgi?id=1137699"} +restart-required = false +preference = "devtools.inspector.color-scheme-simulation.enabled" +type = "boolean" +bug-numbers = [1550804, 1137699] +is-public = {default = false, nightly = true} + +[devtools-execution-context-selector] +title = "experimental-features-devtools-execution-context-selector" +description = "experimental-features-devtools-execution-context-selector-description" +description-links = {bugzilla1 = "https://bugzilla.mozilla.org/show_bug.cgi?id=1605154", bugzilla2 = "https://bugzilla.mozilla.org/show_bug.cgi?id=1605153"} +restart-required = false +preference = "devtools.webconsole.input.context" +type = "boolean" +bug-numbers = [1605154, 1605153] +is-public = {default = false, nightly = true} + +[devtools-compatibility-panel] +title = "experimental-features-devtools-compatibility-panel" +description = "experimental-features-devtools-compatibility-panel-description" +description-links = {bugzilla = "https://bugzilla.mozilla.org/show_bug.cgi?id=1584464"} +restart-required = false +preference = "devtools.inspector.compatibility.enabled" +type = "boolean" +bug-numbers = [1605154, 1605153] +is-public = true [cookie-samesite-lax-by-default] title = "experimental-features-cookie-samesite-lax-by-default2" @@ -69,9 +158,9 @@ bug-numbers = [1651119] is-public = true default-value = {default = false, nightly = true} -[serviceworker-debugger-support] -title = "experimental-features-serviceworker-debugger-support" -description = "experimental-features-serviceworker-debugger-support-description" +[devtools-serviceworker-debugger-support] +title = "experimental-features-devtools-serviceworker-debugger-support" +description = "experimental-features-devtools-serviceworker-debugger-support-description" restart-required = true preference = "devtools.debugger.features.windowless-service-workers" type = "boolean" diff --git a/toolkit/locales/en-US/toolkit/featuregates/features.ftl b/toolkit/locales/en-US/toolkit/featuregates/features.ftl index eca78b4cdf67..95e25c3294dc 100644 --- a/toolkit/locales/en-US/toolkit/featuregates/features.ftl +++ b/toolkit/locales/en-US/toolkit/featuregates/features.ftl @@ -4,21 +4,74 @@ # The title of the experiment should be kept in English as it may be referenced # by various online articles and is technical in nature. -experimental-features-css-masonry = - .label = CSS Masonry Layout +experimental-features-css-masonry2 = + .label = CSS: Masonry Layout experimental-features-css-masonry-description = Enables support for the experimental CSS Masonry Layout feature. See the explainer for a high level description of the feature. To provide feedback, please comment in this GitHub issue or this bug. # The title of the experiment should be kept in English as it may be referenced # by various online articles and is technical in nature. -experimental-features-web-gpu = - .label = WebGPU -experimental-features-web-gpu-description = Experimental API for graphics and computing on the web +experimental-features-web-gpu2 = + .label = Web API: WebGPU +experimental-features-web-gpu-description2 = This new API provides low-level support for performing computation and graphics rendering using the Graphics Processing Unit (GPU) of the user’s device or computer. The specification is still a work-in-progress. See bug 1602129 for more details. # The title of the experiment should be kept in English as it may be referenced # by various online articles and is technical in nature. -experimental-features-avif = - .label = AVIF -experimental-features-avif-description = Experimental support for AVIF: AV1 Image File Format +experimental-features-media-avif = + .label = Media: AVIF +experimental-features-media-avif-description = With this feature enabled, { -brand-short-name } supports the AV1 Image File (AVIF) format. This is a still image file format that leverages the capabilities of the AV1 video compression algorithms to reduce image size. See bug 1443863 for more details. + +# The title of the experiment should be kept in English as it may be referenced +# by various online articles and is technical in nature. +experimental-features-web-api-inputmode = + .label = Web API: inputmode +# "inputmode" and "contenteditable" are technical terms and shouldn't be translated. +experimental-features-web-api-inputmode-description = Our implementation of the inputmode global attribute has been updated as per the WHATWG specification, but we still need to make other changes too, like making it available on contenteditable content. See bug 1205133 for more details. + +# The title of the experiment should be kept in English as it may be referenced +# by various online articles and is technical in nature. +experimental-features-web-api-link-preload = + .label = Web API: +# Do not translate "rel", "preload" or "link" here, as they are all HTML spec +# values that do not get translated. +experimental-features-web-api-link-preload-description = The rel attribute with value "preload" on a <link> element is intended to help provide performance gains by letting you download resources earlier in the page lifecycle, ensuring that they’re available earlier and are less likely to block page rendering. Read “Preloading content with rel="preload" or see bug 1583604 for more details. + +# The title of the experiment should be kept in English as it may be referenced +# by various online articles and is technical in nature. +experimental-features-css-focus-visible = + .label = CSS: Pseudo-class: :focus-visible +experimental-features-css-focus-visible-description = Allows focus styles to be applied to elements like buttons and form controls, only when they are focused using the keyboard (e.g. when tabbing between elements), and not when they are focused using a mouse or other pointing device. See bug 1617600 for more details. + +# The title of the experiment should be kept in English as it may be referenced +# by various online articles and is technical in nature. +experimental-features-web-api-beforeinput = + .label = Web API: beforeinput Event +# The terms "beforeinput", "input", "textarea", and "contenteditable" are technical terms +# and shouldn't be translated. +experimental-features-web-api-beforeinput-description = The global beforeinput event is fired on an <input> and <textarea> elements, or any element whose contenteditable attribute is enabled, immediately before the element’s value changes. The event allows web apps to override the browser’s default behavior for user interaction, e.g., web apps can cancel user input only for specific characters or can modify pasting styled text only with approved styles. + +# The title of the experiment should be kept in English as it may be referenced +# by various online articles and is technical in nature. +experimental-features-css-constructable-stylesheets = + .label = CSS: Constructable Stylesheets +experimental-features-css-constructable-stylesheets-description = The addition of a constructor to the CSSStyleSheet interface as well as a variety of related changes makes it possible to directly create new stylesheets without having to add the sheet to the HTML. This makes it much easier to create reusable stylesheets for use with Shadow DOM. See bug 1520690 for more details. + +# The title of the experiment should be kept in English as it may be referenced +# by various online articles and is technical in nature. +experimental-features-media-session-api = + .label = Web API: Media Session API +experimental-features-media-session-api-description = The entire { -brand-short-name } implementation of the Media Session API is currently experimental. This API is used to customize the handling of media-related notifications, to manage events and data useful for presenting a user interface for managing media playback, and to obtain media file metadata. See bug 1112032 for more details. + +experimental-features-devtools-color-scheme-simulation = + .label = Developer Tools: Color Scheme Simulation +experimental-features-devtools-color-scheme-simulation-description = Adds an option to simulate different color schemes allowing you to test @prefers-color-scheme media queries. Using this media query lets your stylesheet respond to whether the user prefers a light or dark user interface. This feature lets you test your code without having to change settings in your browser (or operating system, if the browser follows a system-wide color scheme setting). See bug 1550804 and bug 1137699 for more details. + +experimental-features-devtools-execution-context-selector = + .label = Developer Tools: Execution Context Selector +experimental-features-devtools-execution-context-selector-description = This feature displays a button on the console’s command line that lets you change the context in which the expression you enter will be executed. See bug 1605154 and bug 1605153 for more details. + +experimental-features-devtools-compatibility-panel = + .label = Developer Tools: Compatibility Panel +experimental-features-devtools-compatibility-panel-description = A side panel for the Page Inspector that shows you information detailing your app’s cross-browser compatibility status. See bug 1584464 for more details. # Do not translate 'SameSite', 'Lax' and 'None'. experimental-features-cookie-samesite-lax-by-default2 = @@ -43,7 +96,7 @@ experimental-features-cookie-samesite-schemeful = experimental-features-cookie-samesite-schemeful-description = Treat cookies from the same domain, but with different schemes (e.g. http://example.com and https://example.com) as cross-site instead of same-site. Improves security, but potentially introduces breakage. # "Service Worker" is an API name and is usually not translated. -experimental-features-serviceworker-debugger-support = - .label = DevTools: Service Worker debugging +experimental-features-devtools-serviceworker-debugger-support = + .label = Developer Tools: Service Worker debugging # "Service Worker" is an API name and is usually not translated. -experimental-features-serviceworker-debugger-support-description = Enables experimental support for Service Workers in the DevTools Debugger panel. This feature may slow down DevTools and increase memory consumption. +experimental-features-devtools-serviceworker-debugger-support-description = Enables experimental support for Service Workers in the Debugger panel. This feature may slow the Developer Tools down and increase memory consumption. diff --git a/toolkit/modules/tests/browser/browser_Troubleshoot.js b/toolkit/modules/tests/browser/browser_Troubleshoot.js index 9013c8c38200..e3e98412cddf 100644 --- a/toolkit/modules/tests/browser/browser_Troubleshoot.js +++ b/toolkit/modules/tests/browser/browser_Troubleshoot.js @@ -40,9 +40,15 @@ var tests = [ SpecialPowers.pushPrefEnv( { set: [ + ["devtools.inspector.compatibility.enabled", false], + ["devtools.webconsole.input.context", false], + ["dom.media.mediasession.enabled", false], + ["dom.forms.inputmode", false], + ["layout.css.focus-visible.enabled", false], ["network.cookie.sameSite.laxByDefault", false], ["network.cookie.sameSite.noneRequiresSecure", false], ["network.cookie.sameSite.schemeful", false], + ["network.preload", false], ], }, done @@ -67,7 +73,7 @@ var tests = [ for (let gate of featureGates) { ok( !Services.prefs.getBoolPref(gate.preference), - "Features should be disabled by default" + `Feature ${gate.preference} should be disabled by default` ); }