diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-01-14 21:06:24 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-01-14 21:45:37 +0100 |
commit | 55174991b6a4e80b8abdaa2c3d23f66beb85c298 (patch) | |
tree | a313a738b42a69f52cb3f8b5bb9ea0008524701d /components/script_layout_interface/wrapper_traits.rs | |
parent | 1b46e2e7597e90a41c6bfb3bd7008bdd922c93c6 (diff) | |
download | servo-55174991b6a4e80b8abdaa2c3d23f66beb85c298.tar.gz servo-55174991b6a4e80b8abdaa2c3d23f66beb85c298.zip |
layout: Stop overriding display of the ::-servo-details-content pseudo-element.
We only override it when there's no "open" attribute. But a display: none
pseudo-element is the same as no pseudo-element at all.
This should get the same behavior when iterating children in dom_wrapper.rs
Diffstat (limited to 'components/script_layout_interface/wrapper_traits.rs')
-rw-r--r-- | components/script_layout_interface/wrapper_traits.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/components/script_layout_interface/wrapper_traits.rs b/components/script_layout_interface/wrapper_traits.rs index 348a7a46cfb..7f92653b52c 100644 --- a/components/script_layout_interface/wrapper_traits.rs +++ b/components/script_layout_interface/wrapper_traits.rs @@ -358,13 +358,9 @@ pub trait ThreadSafeLayoutElement #[inline] fn get_details_content_pseudo(&self) -> Option<Self> { if self.get_local_name() == &local_name!("details") && - self.get_namespace() == &ns!(html) { - let display = if self.get_attr(&ns!(), &local_name!("open")).is_some() { - None // Specified by the stylesheet - } else { - Some(Display::None) - }; - Some(self.with_pseudo(PseudoElementType::DetailsContent(display))) + self.get_namespace() == &ns!(html) && + self.get_attr(&ns!(), &local_name!("open")).is_some() { + Some(self.with_pseudo(PseudoElementType::DetailsContent(None))) } else { None } |