diff options
author | Fausto Núñez Alberro <fausto.nunez@mailbox.org> | 2018-02-24 21:44:22 +0100 |
---|---|---|
committer | Fausto Núñez Alberro <fausto.nunez@mailbox.org> | 2018-04-03 22:01:26 +0200 |
commit | cc838f54e5042668259ddd9235d8af34230a9fd8 (patch) | |
tree | 267023f7923ea26627e960a6a1bc942a96c3bc9b /components/layout/construct.rs | |
parent | 8f226f841bd5e1ab412ff2cd8417919b222f7555 (diff) | |
download | servo-cc838f54e5042668259ddd9235d8af34230a9fd8.tar.gz servo-cc838f54e5042668259ddd9235d8af34230a9fd8.zip |
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
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r-- | components/layout/construct.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs index 3849e43ad51..291e8941e7d 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -52,11 +52,10 @@ use style::context::SharedStyleContext; use style::dom::TElement; use style::logical_geometry::Direction; use style::properties::ComputedValues; -use style::properties::longhands::list_style_image; use style::selector_parser::{PseudoElement, RestyleDamage}; use style::servo::restyle_damage::ServoRestyleDamage; -use style::values::Either; use style::values::computed::counters::ContentItem; +use style::values::generics::url::UrlOrNone as ImageUrlOrNone; use table::TableFlow; use table_caption::TableCaptionFlow; use table_cell::TableCellFlow; @@ -1278,13 +1277,13 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode> -> ConstructionResult { let flotation = FloatKind::from_property(flotation); let marker_fragments = match node.style(self.style_context()).get_list().list_style_image { - list_style_image::computed_value::T(Either::First(ref url_value)) => { + ImageUrlOrNone::Url(ref url_value) => { let image_info = Box::new(ImageFragmentInfo::new( url_value.url().map(|u| u.clone()), node, &self.layout_context )); vec![Fragment::new(node, SpecificFragmentInfo::Image(image_info), self.layout_context)] } - list_style_image::computed_value::T(Either::Second(_none)) => { + ImageUrlOrNone::None => { match ListStyleTypeContent::from_list_style_type(node.style(self.style_context()) .get_list() .list_style_type) { |