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

@ -493,10 +493,9 @@ mod shorthand_serialization {
}
mod list_style {
use style::properties::longhands::list_style_image::SpecifiedValue as ListStyleImage;
use style::properties::longhands::list_style_position::SpecifiedValue as ListStylePosition;
use style::properties::longhands::list_style_type::SpecifiedValue as ListStyleType;
use style::values::Either;
use style::values::generics::url::UrlOrNone as ImageUrlOrNone;
use super::*;
#[test]
@ -504,8 +503,7 @@ mod shorthand_serialization {
let mut properties = Vec::new();
let position = ListStylePosition::Inside;
let image =
ListStyleImage(Either::First(SpecifiedUrl::new_for_testing("http://servo/test.png")));
let image = ImageUrlOrNone::Url(SpecifiedUrl::new_for_testing("http://servo/test.png"));
let style_type = ListStyleType::Disc;
properties.push(PropertyDeclaration::ListStylePosition(position));