mirror of
https://github.com/servo/servo.git
synced 2025-08-28 16:48:22 +01:00
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:
parent
8f226f841b
commit
cc838f54e5
26 changed files with 157 additions and 124 deletions
|
@ -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>> {
|
||||
|
|
|
@ -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(),
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue