mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
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
This commit is contained in:
parent
1b46e2e759
commit
55174991b6
1 changed files with 3 additions and 7 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue