mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Further changes required by Servo
This commit is contained in:
parent
7d1823563e
commit
9cf7df1f31
1 changed files with 17 additions and 3 deletions
|
@ -81,6 +81,16 @@ fn cross_fade_enabled() -> bool {
|
|||
false
|
||||
}
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
fn image_set_enabled() -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
fn image_set_enabled() -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
impl SpecifiedValueInfo for Gradient {
|
||||
const SUPPORTED_TYPES: u8 = CssType::GRADIENT;
|
||||
|
||||
|
@ -122,7 +132,9 @@ impl<Image, Resolution> SpecifiedValueInfo for generic::ImageSet<Image, Resoluti
|
|||
const SUPPORTED_TYPES: u8 = 0;
|
||||
|
||||
fn collect_completion_keywords(f: KeywordsCollectFn) {
|
||||
f(&["image-set"]);
|
||||
if image_set_enabled() {
|
||||
f(&["image-set"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -191,8 +203,10 @@ impl Image {
|
|||
return Ok(generic::Image::Url(url));
|
||||
}
|
||||
|
||||
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 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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue