From 206f4ea5b83dcd7cfdab20b9fb67387ce66f1880 Mon Sep 17 00:00:00 2001 From: Thiago Pontes Date: Fri, 25 Nov 2016 15:51:53 -0500 Subject: use Either type for UrlOrNone fix test-tidy errors fix style unit test use the Parse trait instead of ParseWithContext fix stylo test and geckolib build move all specified url parse code to parse trait and remove refs to unused type --- components/layout/construct.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'components/layout/construct.rs') diff --git a/components/layout/construct.rs b/components/layout/construct.rs index 453c68dcae1..f3309b97b75 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -45,7 +45,7 @@ use std::marker::PhantomData; use std::mem; use std::sync::Arc; use std::sync::atomic::Ordering; -use style::computed_values::{caption_side, display, empty_cells, float, list_style_image, list_style_position}; +use style::computed_values::{caption_side, display, empty_cells, float, list_style_position}; use style::computed_values::content::ContentItem; use style::computed_values::position; use style::context::SharedStyleContext; @@ -54,6 +54,7 @@ use style::properties::{self, ServoComputedValues}; use style::selector_parser::{PseudoElement, RestyleDamage}; use style::servo::restyle_damage::{BUBBLE_ISIZES, RECONSTRUCT_FLOW}; use style::stylist::Stylist; +use style::values::Either; use table::TableFlow; use table_caption::TableCaptionFlow; use table_cell::TableCellFlow; @@ -1205,13 +1206,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::T::Url(ref url_value) => { + Either::First(ref url_value) => { let image_info = box ImageFragmentInfo::new(node, url_value.url().map(|u| u.clone()), &self.layout_context.shared); vec![Fragment::new(node, SpecificFragmentInfo::Image(image_info), self.layout_context)] } - list_style_image::T::None => { + Either::Second(_none) => { match ListStyleTypeContent::from_list_style_type(node.style(self.style_context()) .get_list() .list_style_type) { -- cgit v1.2.3