diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-01-14 21:18:00 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-01-14 21:45:38 +0100 |
commit | cb2bba8777192b416989527d472fdd0348f0b551 (patch) | |
tree | b93268c02161a7c82d317f0b090536850009b083 /components/script_layout_interface/wrapper_traits.rs | |
parent | 55174991b6a4e80b8abdaa2c3d23f66beb85c298 (diff) | |
download | servo-cb2bba8777192b416989527d472fdd0348f0b551.tar.gz servo-cb2bba8777192b416989527d472fdd0348f0b551.zip |
style: Remove unused optional display from PseudoElementType definition.
Everyone passes None now.
Diffstat (limited to 'components/script_layout_interface/wrapper_traits.rs')
-rw-r--r-- | components/script_layout_interface/wrapper_traits.rs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/components/script_layout_interface/wrapper_traits.rs b/components/script_layout_interface/wrapper_traits.rs index 7f92653b52c..c08e79b29a3 100644 --- a/components/script_layout_interface/wrapper_traits.rs +++ b/components/script_layout_interface/wrapper_traits.rs @@ -17,7 +17,6 @@ use servo_arc::Arc; use servo_url::ServoUrl; use std::fmt::Debug; use style::attr::AttrValue; -use style::computed_values::display::T as Display; use style::context::SharedStyleContext; use style::data::ElementData; use style::dom::{LayoutIterator, NodeInfo, TNode}; @@ -197,7 +196,7 @@ pub trait ThreadSafeLayoutNode: Clone + Copy + Debug + GetLayoutData + NodeInfo fn as_element(&self) -> Option<Self::ConcreteThreadSafeLayoutElement>; #[inline] - fn get_pseudo_element_type(&self) -> PseudoElementType<Option<Display>> { + fn get_pseudo_element_type(&self) -> PseudoElementType<()> { self.as_element().map_or(PseudoElementType::Normal, |el| el.get_pseudo_element_type()) } @@ -302,7 +301,7 @@ pub trait ThreadSafeLayoutElement /// Creates a new `ThreadSafeLayoutElement` for the same `LayoutElement` /// with a different pseudo-element type. - fn with_pseudo(&self, pseudo: PseudoElementType<Option<Display>>) -> Self; + fn with_pseudo(&self, pseudo: PseudoElementType<()>) -> Self; /// Returns the type ID of this node. /// Returns `None` if this is a pseudo-element; otherwise, returns `Some`. @@ -325,12 +324,12 @@ pub trait ThreadSafeLayoutElement fn style_data(&self) -> AtomicRef<ElementData>; #[inline] - fn get_pseudo_element_type(&self) -> PseudoElementType<Option<Display>>; + fn get_pseudo_element_type(&self) -> PseudoElementType<()>; #[inline] fn get_before_pseudo(&self) -> Option<Self> { if self.style_data().styles.pseudos.get(&PseudoElement::Before).is_some() { - Some(self.with_pseudo(PseudoElementType::Before(None))) + Some(self.with_pseudo(PseudoElementType::Before(()))) } else { None } @@ -339,7 +338,7 @@ pub trait ThreadSafeLayoutElement #[inline] fn get_after_pseudo(&self) -> Option<Self> { if self.style_data().styles.pseudos.get(&PseudoElement::After).is_some() { - Some(self.with_pseudo(PseudoElementType::After(None))) + Some(self.with_pseudo(PseudoElementType::After(()))) } else { None } @@ -349,7 +348,7 @@ pub trait ThreadSafeLayoutElement fn get_details_summary_pseudo(&self) -> Option<Self> { if self.get_local_name() == &local_name!("details") && self.get_namespace() == &ns!(html) { - Some(self.with_pseudo(PseudoElementType::DetailsSummary(None))) + Some(self.with_pseudo(PseudoElementType::DetailsSummary(()))) } else { None } @@ -360,7 +359,7 @@ pub trait ThreadSafeLayoutElement if self.get_local_name() == &local_name!("details") && self.get_namespace() == &ns!(html) && self.get_attr(&ns!(), &local_name!("open")).is_some() { - Some(self.with_pseudo(PseudoElementType::DetailsContent(None))) + Some(self.with_pseudo(PseudoElementType::DetailsContent(()))) } else { None } |