mirror of
https://github.com/servo/servo.git
synced 2025-06-08 00:23:30 +00:00
layout: Don't force to overwrite display for pseudo-elements.
This commit is contained in:
parent
2a499d5a0b
commit
cf5c090576
3 changed files with 42 additions and 43 deletions
|
@ -1507,11 +1507,13 @@ impl<'a, ConcreteThreadSafeLayoutNode> PostorderNodeMutTraversal<ConcreteThreadS
|
|||
// Pseudo-element.
|
||||
let style = node.style(self.style_context());
|
||||
let display = match node.get_pseudo_element_type() {
|
||||
PseudoElementType::Normal => display::T::inline,
|
||||
PseudoElementType::Before(display) => display,
|
||||
PseudoElementType::After(display) => display,
|
||||
PseudoElementType::DetailsContent(display) => display,
|
||||
PseudoElementType::DetailsSummary(display) => display,
|
||||
PseudoElementType::Normal
|
||||
=> display::T::inline,
|
||||
PseudoElementType::Before(maybe_display) |
|
||||
PseudoElementType::After(maybe_display) |
|
||||
PseudoElementType::DetailsContent(maybe_display) |
|
||||
PseudoElementType::DetailsSummary(maybe_display)
|
||||
=> maybe_display.unwrap_or(style.get_box().display),
|
||||
};
|
||||
(display, style.get_box().float, style.get_box().position)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue