Bug 1641324 Remove the layout.css.scrollbar-width.enabled and layout.css.scrollbar-color.enabled prefs r=emilio
authorneil <nilabja10201992@gmail.com>
Wed, 10 Jun 2020 13:16:34 +0000
changeset 598938 2b9a70901fd8e97f413c7487d9b9c10f35dacf50
parent 598937 fca2a64739b13da32d93ee5d48f6bd2e2f23fadc
child 598939 7777540437e99eca60fcb0faf57d1526254fec5e
push id13310
push userffxbld-merge
push dateMon, 29 Jun 2020 14:50:06 +0000
treeherdermozilla-beta@15a59a0afa5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1641324
milestone79.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1641324 Remove the layout.css.scrollbar-width.enabled and layout.css.scrollbar-color.enabled prefs r=emilio Differential Revision: https://phabricator.services.mozilla.com/D78400
browser/base/content/test/static/browser_parsable_css.js
devtools/shared/css/generated/properties-db.js
layout/reftests/css-scrollbars/reftest.list
layout/style/test/property_database.js
layout/style/test/test_transitions_per_property.html
modules/libpref/init/StaticPrefList.yaml
servo/components/style/properties/longhands/inherited_ui.mako.rs
servo/components/style/properties/longhands/ui.mako.rs
testing/web-platform/meta/css/css-scrollbars/scrollbar-width-keywords.html.ini
testing/web-platform/meta/css/css-scrollbars/textarea-scrollbar-width-none.html.ini
testing/web-platform/meta/css/css-scrollbars/viewport-scrollbar-body.html.ini
testing/web-platform/meta/css/css-scrollbars/viewport-scrollbar.html.ini
widget/tests/test_scrollbar_colors.html
--- a/browser/base/content/test/static/browser_parsable_css.js
+++ b/browser/base/content/test/static/browser_parsable_css.js
@@ -84,24 +84,16 @@ if (
   // These are UA sheets which use non-content-exposed `display` values.
   whitelist.push({
     sourceName: /(skin\/shared\/Heartbeat|((?:res|gre-resources)\/(ua|html)))\.css$/i,
     errorMessage: /Error in parsing value for .*\bdisplay\b/i,
     isFromDevTools: false,
   });
 }
 
-if (!Services.prefs.getBoolPref("layout.css.scrollbar-width.enabled")) {
-  whitelist.push({
-    sourceName: /(?:res|gre-resources)\/forms\.css$/i,
-    errorMessage: /Unknown property .*\bscrollbar-width\b/i,
-    isFromDevTools: false,
-  });
-}
-
 if (!Services.prefs.getBoolPref("layout.css.file-chooser-button.enabled")) {
   // Reserved to UA sheets, behind a pref for content.
   whitelist.push({
     sourceName: /(?:res|gre-resources)\/forms\.css$/i,
     errorMessage: /Unknown pseudo-.*file-chooser-button/i,
     isFromDevTools: false,
   });
 }
--- a/devtools/shared/css/generated/properties-db.js
+++ b/devtools/shared/css/generated/properties-db.js
@@ -10725,20 +10725,16 @@ exports.PREFERENCES = [
     "offset-rotate",
     "layout.css.motion-path.enabled"
   ],
   [
     "overflow-anchor",
     "layout.css.scroll-anchoring.enabled"
   ],
   [
-    "scrollbar-width",
-    "layout.css.scrollbar-width.enabled"
-  ],
-  [
     "text-decoration-skip-ink",
     "layout.css.text-decoration-skip-ink.enabled"
   ],
   [
     "text-justify",
     "layout.css.text-justify.enabled"
   ],
   [
@@ -10817,20 +10813,16 @@ exports.PREFERENCES = [
     "rotate",
     "layout.css.individual-transform.enabled"
   ],
   [
     "scale",
     "layout.css.individual-transform.enabled"
   ],
   [
-    "scrollbar-color",
-    "layout.css.scrollbar-color.enabled"
-  ],
-  [
     "text-decoration-thickness",
     "layout.css.text-decoration-thickness.enabled"
   ],
   [
     "translate",
     "layout.css.individual-transform.enabled"
   ],
   [
--- a/layout/reftests/css-scrollbars/reftest.list
+++ b/layout/reftests/css-scrollbars/reftest.list
@@ -1,4 +1,2 @@
-defaults pref(layout.css.scrollbar-color.enabled,true)
-
 == viewport-scrollbar-color-change.html viewport-scrollbar-color-change-ref.html
 == scrollbar-thin-overflow-change.html scrollbar-thin-overflow-change-ref.html
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -12992,37 +12992,33 @@ if (false) {
     inherited: true,
     type: CSS_TYPE_LONGHAND,
     initial_values: ["transparent"],
     other_values: ["green", "#fc3"],
     invalid_values: ["000000", "ff00ff"],
   };
 }
 
-if (IsCSSPropertyPrefEnabled("layout.css.scrollbar-color.enabled")) {
-  gCSSProperties["scrollbar-color"] = {
-    domProp: "scrollbarColor",
-    inherited: true,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: ["auto"],
-    other_values: ["red green", "blue yellow", "#ffff00 white"],
-    invalid_values: ["ffff00 red", "auto red", "red auto", "green"],
-  };
-}
-
-if (IsCSSPropertyPrefEnabled("layout.css.scrollbar-width.enabled")) {
-  gCSSProperties["scrollbar-width"] = {
-    domProp: "scrollbarWidth",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: ["auto"],
-    other_values: ["none", "thin"],
-    invalid_values: ["1px"],
-  };
-}
+gCSSProperties["scrollbar-color"] = {
+  domProp: "scrollbarColor",
+  inherited: true,
+  type: CSS_TYPE_LONGHAND,
+  initial_values: ["auto"],
+  other_values: ["red green", "blue yellow", "#ffff00 white"],
+  invalid_values: ["ffff00 red", "auto red", "red auto", "green"],
+};
+
+gCSSProperties["scrollbar-width"] = {
+  domProp: "scrollbarWidth",
+  inherited: false,
+  type: CSS_TYPE_LONGHAND,
+  initial_values: ["auto"],
+  other_values: ["none", "thin"],
+  invalid_values: ["1px"],
+};
 
 if (IsCSSPropertyPrefEnabled("layout.css.motion-path.enabled")) {
   gCSSProperties["offset"] = {
     domProp: "offset",
     inherited: false,
     type: CSS_TYPE_TRUE_SHORTHAND,
     subproperties: [
       "offset-path",
--- a/layout/style/test/test_transitions_per_property.html
+++ b/layout/style/test/test_transitions_per_property.html
@@ -421,21 +421,19 @@ if (IsCSSPropertyPrefEnabled("layout.css
 }
 
 if (IsCSSPropertyPrefEnabled("layout.css.individual-transform.enabled")) {
   supported_properties["rotate"] = [ test_rotate_transition ];
   supported_properties["scale"] = [ test_scale_transition ];
   supported_properties["translate"] = [ test_translate_transition ];
 }
 
-if (IsCSSPropertyPrefEnabled("layout.css.scrollbar-color.enabled")) {
-  supported_properties["scrollbar-color"] = [
-    test_scrollbar_color_transition,
-  ];
-}
+supported_properties["scrollbar-color"] = [
+  test_scrollbar_color_transition,
+];
 
 // For properties which are well-tested by web-platform-tests, we don't need to
 // test animations/transitions again on them.
 var skipped_transitionable_properties = [
   "border-image-outset",
   "border-image-slice",
   "border-image-width",
   "grid-template-columns",
--- a/modules/libpref/init/StaticPrefList.yaml
+++ b/modules/libpref/init/StaticPrefList.yaml
@@ -5922,28 +5922,16 @@
   value: false
   mirror: always
 
 - name: layout.css.scroll-behavior.damping-ratio
   type: AtomicFloat
   value: 1.0f
   mirror: always
 
-# Is support for scrollbar-color property enabled?
-- name: layout.css.scrollbar-color.enabled
-  type: bool
-  value: true
-  mirror: always
-
-# Is support for scrollbar-width property enabled?
-- name: layout.css.scrollbar-width.enabled
-  type: bool
-  value: true
-  mirror: always
-
 - name: layout.css.supports-selector.enabled
   type: RelaxedAtomicBool
   value: true
   mirror: always
   rust: true
 
 # Is CSSOM-View scroll-behavior and its MSD smooth scrolling enabled?
 - name: layout.css.scroll-behavior.enabled
--- a/servo/components/style/properties/longhands/inherited_ui.mako.rs
+++ b/servo/components/style/properties/longhands/inherited_ui.mako.rs
@@ -72,18 +72,12 @@
 )}
 
 ${helpers.predefined_type(
     "scrollbar-color",
     "ui::ScrollbarColor",
     "Default::default()",
     engines="gecko",
     spec="https://drafts.csswg.org/css-scrollbars-1/#scrollbar-color",
-    gecko_pref="layout.css.scrollbar-color.enabled",
-    # Surprisingly, yes the computed value of scrollbar-color has no effect on
-    # Gecko scrollbar elements, since the value only matters on the scrollable
-    # element itself.
-    has_effect_on_gecko_scrollbars=False,
     animation_value_type="ScrollbarColor",
     boxed=True,
     ignored_when_colors_disabled=True,
-    enabled_in="chrome",
 )}
--- a/servo/components/style/properties/longhands/ui.mako.rs
+++ b/servo/components/style/properties/longhands/ui.mako.rs
@@ -22,18 +22,16 @@
 )}
 
 ${helpers.single_keyword(
     "scrollbar-width",
     "auto thin none",
     engines="gecko",
     gecko_enum_prefix="StyleScrollbarWidth",
     animation_value_type="discrete",
-    gecko_pref="layout.css.scrollbar-width.enabled",
-    enabled_in="chrome",
     spec="https://drafts.csswg.org/css-scrollbars-1/#scrollbar-width"
 )}
 
 ${helpers.predefined_type(
     "user-select",
     "UserSelect",
     "computed::UserSelect::Auto",
     engines="gecko",
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-scrollbars/scrollbar-width-keywords.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[scrollbar-width-keywords.html]
-    prefs: [layout.css.scrollbar-width.enabled:true]
--- a/testing/web-platform/meta/css/css-scrollbars/textarea-scrollbar-width-none.html.ini
+++ b/testing/web-platform/meta/css/css-scrollbars/textarea-scrollbar-width-none.html.ini
@@ -1,9 +1,8 @@
 [textarea-scrollbar-width-none.html]
-  prefs: [layout.css.scrollbar-width.enabled:true]
   expected:
     if (os == "win") and (processor == "aarch64"): PASS
     if (os == "win") and (version == "6.1.7601"): FAIL
     if not webrender and (os == "win") and (version == "10.0.17134"): FAIL
     if os == "mac": FAIL
     if (os == "android") and not e10s: FAIL
     if (os == "android") and e10s: FAIL
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-scrollbars/viewport-scrollbar-body.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[viewport-scrollbar-body.html]
-  prefs: [layout.css.scrollbar-color.enabled:true]
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-scrollbars/viewport-scrollbar.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[viewport-scrollbar.html]
-  prefs: [layout.css.scrollbar-color.enabled:true]
--- a/widget/tests/test_scrollbar_colors.html
+++ b/widget/tests/test_scrollbar_colors.html
@@ -66,36 +66,30 @@ const LINUX_REFERENCES = [
 ];
 
 let outer = document.querySelector(".outer");
 let outerRect = outer.getBoundingClientRect();
 if (outerRect.width == outer.clientWidth &&
     outerRect.height == outer.clientHeight) {
   ok(true, "Using overlay scrollbar, skip this test");
 } else {
-  SimpleTest.waitForExplicitFinish();
-  SpecialPowers.pushPrefEnv({
-    "set": [["layout.css.scrollbar-color.enabled", true]],
-  }, function() {
-    document.querySelector("#style").textContent = `
-      .outer { scrollbar-color: blue cyan; }
-    `;
+  document.querySelector("#style").textContent = `
+    .outer { scrollbar-color: blue cyan; }
+  `;
 
-    let canvas = snapshotRect(window, outerRect);
-    let stats = countPixels(canvas);
-    let references;
-    if (navigator.platform.startsWith("Win")) {
-      references = WIN_REFERENCES;
-    } else if (navigator.platform.startsWith("Mac")) {
-      references = MAC_REFERENCES;
-    } else if (navigator.platform.startsWith("Linux")) {
-      references = LINUX_REFERENCES;
-    } else {
-      ok(false, "Unsupported platform");
-    }
-    for (let [color, count] of references) {
-      let value = stats.get(color);
-      is(value, count, `Pixel count of color ${color}`);
-    }
-    SimpleTest.finish();
-  });
+  let canvas = snapshotRect(window, outerRect);
+  let stats = countPixels(canvas);
+  let references;
+  if (navigator.platform.startsWith("Win")) {
+    references = WIN_REFERENCES;
+  } else if (navigator.platform.startsWith("Mac")) {
+    references = MAC_REFERENCES;
+  } else if (navigator.platform.startsWith("Linux")) {
+    references = LINUX_REFERENCES;
+  } else {
+    ok(false, "Unsupported platform");
+  }
+  for (let [color, count] of references) {
+    let value = stats.get(color);
+    is(value, count, `Pixel count of color ${color}`);
+  }
 }
 </script>