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

We shipped this in 88.

Differential Revision: https://phabricator.services.mozilla.com/D120899
This commit is contained in:
Emilio Cobos Álvarez 2021-07-27 06:59:39 +00:00
Родитель dc489fa47e
Коммит 143c3e18d7
8 изменённых файлов: 23 добавлений и 66 удалений

Просмотреть файл

@ -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");

Просмотреть файл

@ -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

Просмотреть файл

@ -270,19 +270,15 @@ 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)",
"image-set(url(foobar.png) 1x, url(bar.png) 2x, url(baz.png) 3x)",
"image-set('foobar.png', 'bar.png' 2x, url(baz.png) 3x)",
"image-set(image-set('foobar.png', 'bar.png' 2x) 1x, url(baz.png) 3x)",
"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)",
]
: []),
"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)",
"image-set(url(foobar.png) 1x, url(bar.png) 2x, url(baz.png) 3x)",
"image-set('foobar.png', 'bar.png' 2x, url(baz.png) 3x)",
"image-set(image-set('foobar.png', 'bar.png' 2x) 1x, url(baz.png) 3x)",
"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,19 +817,15 @@ 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))",
"image-set()",
"image-set(type('image/png') url(foobar.png) 1x)",
"image-set(url(foobar.png) type('image/png') 1x type('image/png'))",
"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'))",
]
: []),
"image-set(url(foobar.png) 1x, none)",
"image-set(garbage)",
"image-set(image-set(garbage))",
"image-set()",
"image-set(type('image/png') url(foobar.png) 1x)",
"image-set(url(foobar.png) type('image/png') 1x type('image/png'))",
"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")
? [

Просмотреть файл

@ -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

Просмотреть файл

@ -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,9 +122,7 @@ 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"]);
}
f(&["image-set"]);
}
}
@ -203,10 +191,8 @@ 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 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 {

Просмотреть файл

@ -1 +0,0 @@
prefs: [layout.css.image-set.enabled:true]

Просмотреть файл

@ -1,2 +0,0 @@
[fcp-bg-image-set.html]
prefs: [layout.css.image-set.enabled:true]

Просмотреть файл

@ -1,2 +0,0 @@
[fetch-request-css-images.https.html]
prefs: [layout.css.image-set.enabled:true]