Commit 143c3e18 authored by Emilio Cobos Álvarez's avatar Emilio Cobos Álvarez
Browse files

Bug 1722400 - Remove layout.css.image-set.enabled. r=TYLin

We shipped this in 88.

Differential Revision: https://phabricator.services.mozilla.com/D120899
parent dc489fa4
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -63,11 +63,7 @@ function do_test() {
  var expected = [ "auto", "initial", "inherit", "unset", "revert", ...allColors, "no-repeat", "repeat",
      "repeat-x", "repeat-y", "space", "round", "fixed", "scroll", "local", "center", "top", "bottom", "left", "right",
      "border-box", "padding-box", "content-box", "text", "contain",
      "cover", "none", "-moz-element", "-moz-image-rect", "url", ...allGradients ];

  if(SpecialPowers.getBoolPref("layout.css.image-set.enabled")) {
    expected.push("image-set");
  }
      "cover", "none", "-moz-element", "-moz-image-rect", "url", ...allGradients, "image-set" ];

  if(SpecialPowers.getBoolPref("layout.css.cross-fade.enabled")) {
    expected.push("cross-fade");
@@ -148,11 +144,7 @@ function do_test() {
  var values = InspectorUtils.getCSSValuesForProperty(prop);
  var expected = [ "auto", "inherit", "revert", "initial", "unset", "repeat", "stretch",
                   "-moz-element", "-moz-image-rect", "url", ...allGradients,
                   "fill", "none", "round", "space" ];

  if(SpecialPowers.getBoolPref("layout.css.image-set.enabled")) {
    expected.push("image-set");
  }
                   "fill", "none", "round", "space", "image-set" ];

  if(SpecialPowers.getBoolPref("layout.css.cross-fade.enabled")) {
    expected.push("cross-fade");
+0 −1
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@ prefs =
  layout.css.accent-color.enabled=true
  layout.css.aspect-ratio.enabled=true
  layout.css.constructable-stylesheets.enabled=true
  layout.css.image-set.enabled=true
  layout.css.individual-transform.enabled=true
  layout.css.motion-path.enabled=true
  layout.css.motion-path-ray.enabled=true
+18 −26
Original line number Diff line number Diff line
@@ -270,8 +270,6 @@ var validNonUrlImageValues = [
  "radial-gradient(at calc(100px + -25px) top, red, blue)",
  "radial-gradient(at left calc(100px + -25px), red, blue)",

  ...(IsCSSPropertyPrefEnabled("layout.css.image-set.enabled")
    ? [
  "image-set(linear-gradient(green, green) 1x, url(foobar.png) 2x)",
  "image-set(linear-gradient(red, red), url(foobar.png) 2x)",
  "image-set(url(foobar.png) 2x)",
@@ -281,8 +279,6 @@ var validNonUrlImageValues = [
  "image-set(url(foobar.png) type('image/png'))",
  "image-set(url(foobar.png) 1x type('image/png'))",
  "image-set(url(foobar.png) type('image/png') 1x)",
      ]
    : []),

  ...(IsCSSPropertyPrefEnabled("layout.css.cross-fade.enabled")
    ? [
@@ -821,8 +817,6 @@ var invalidNonUrlImageValues = [
  "-webkit-repeating-conic-gradient(red, blue)",
  "-moz-repeating-conic-gradient(red, blue)",

  ...(IsCSSPropertyPrefEnabled("layout.css.image-set.enabled")
    ? [
  "image-set(url(foobar.png) 1x, none)",
  "image-set(garbage)",
  "image-set(image-set(garbage))",
@@ -832,8 +826,6 @@ var invalidNonUrlImageValues = [
  "image-set(url(foobar.png) type('image/png') type('image/png'))",
  "image-set(url(foobar.png) type(image/png))",
  "image-set(url(foobar.png) epyt('image/png'))",
      ]
    : []),

  ...(IsCSSPropertyPrefEnabled("layout.css.cross-fade.enabled")
    ? [
+0 −7
Original line number Diff line number Diff line
@@ -6846,13 +6846,6 @@
  value: true
  mirror: always

# Is the image-set() function enabled?
- name: layout.css.image-set.enabled
  type: RelaxedAtomicBool
  value: true
  mirror: always
  rust: true

# Are implicit tracks in computed grid templates serialized?
- name: layout.css.serialize-grid-implicit-tracks
  type: RelaxedAtomicBool
+3 −17
Original line number Diff line number Diff line
@@ -81,16 +81,6 @@ fn cross_fade_enabled() -> bool {
    false
}

#[cfg(feature = "gecko")]
fn image_set_enabled() -> bool {
    static_prefs::pref!("layout.css.image-set.enabled")
}

#[cfg(feature = "servo")]
fn image_set_enabled() -> bool {
    false
}

impl SpecifiedValueInfo for Gradient {
    const SUPPORTED_TYPES: u8 = CssType::GRADIENT;

@@ -132,11 +122,9 @@ impl<Image, Resolution> SpecifiedValueInfo for generic::ImageSet<Image, Resoluti
    const SUPPORTED_TYPES: u8 = 0;

    fn collect_completion_keywords(f: KeywordsCollectFn) {
        if image_set_enabled() {
        f(&["image-set"]);
    }
}
}

/// A specified gradient line direction.
///
@@ -203,11 +191,9 @@ impl Image {
            return Ok(generic::Image::Url(url));
        }

        if image_set_enabled() {
        if let Ok(is) = input.try_parse(|input| ImageSet::parse(context, input, cors_mode, only_url)) {
            return Ok(generic::Image::ImageSet(Box::new(is)));
        }
        }

        if only_url {
            return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
Loading