Implement a URL-generic type for list-style-image

This should fix the following two "expected to fail" tests:

- getComputedStyle(elem) for url() listStyleImage uses the resolved URL
  and elem.style uses the original URL

- getComputedStyle(elem) for url() listStyle uses the resolved URL
  and elem.style uses the original URL
This commit is contained in:
Fausto Núñez Alberro 2018-02-24 21:44:22 +01:00
parent 8f226f841b
commit cc838f54e5
No known key found for this signature in database
GPG key ID: 475A94D9B398B2DF
26 changed files with 157 additions and 124 deletions

View file

@ -7,7 +7,7 @@
<%helpers:shorthand name="marker" products="gecko"
sub_properties="marker-start marker-end marker-mid"
spec="https://www.w3.org/TR/SVG2/painting.html#MarkerShorthand">
use values::specified::UrlOrNone;
use values::specified::url::UrlOrNone;
pub fn parse_value<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
-> Result<Longhands, ParseError<'i>> {

View file

@ -9,7 +9,7 @@
derive_serialize="True"
spec="https://drafts.csswg.org/css-lists/#propdef-list-style">
use properties::longhands::{list_style_image, list_style_position, list_style_type};
use values::{Either, None_};
use values::specified::url::ImageUrlOrNone;
pub fn parse_value<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
-> Result<Longhands, ParseError<'i>> {
@ -74,7 +74,7 @@
(true, 2, None, None) => {
Ok(expanded! {
list_style_position: position,
list_style_image: list_style_image::SpecifiedValue(Either::Second(None_)),
list_style_image: ImageUrlOrNone::none(),
list_style_type: list_style_type_none(),
})
}
@ -88,14 +88,14 @@
(true, 1, Some(list_style_type), None) => {
Ok(expanded! {
list_style_position: position,
list_style_image: list_style_image::SpecifiedValue(Either::Second(None_)),
list_style_image: ImageUrlOrNone::none(),
list_style_type: list_style_type,
})
}
(true, 1, None, None) => {
Ok(expanded! {
list_style_position: position,
list_style_image: list_style_image::SpecifiedValue(Either::Second(None_)),
list_style_image: ImageUrlOrNone::none(),
list_style_type: list_style_type_none(),
})
}