From 55174991b6a4e80b8abdaa2c3d23f66beb85c298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 14 Jan 2018 21:06:24 +0100 Subject: [PATCH] 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 --- components/script_layout_interface/wrapper_traits.rs | 10 +++------- 1 file 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 { 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 }