mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
script: Eliminate PseudoElementType
(#36146)
Servo has a `PseudoElementType` which more or less duplicate's Stylo's `PseudoElement` with the addition of a non-pseudo element variant. This type needs to be converted into `PseudoElement` anyway when asking for the style of an element from Stylo, so eliminate Servo's version and simply use `Option<PseudoElement>` with the `None` variant meaning the non-pseudo. This is preparation for adding support for the `::marker` pseudo element. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
09041e77a0
commit
a9b393a854
7 changed files with 75 additions and 145 deletions
|
@ -407,8 +407,8 @@ where
|
|||
Node: NodeExt<'dom>,
|
||||
{
|
||||
match which {
|
||||
WhichPseudoElement::Before => element.to_threadsafe().get_before_pseudo(),
|
||||
WhichPseudoElement::After => element.to_threadsafe().get_after_pseudo(),
|
||||
WhichPseudoElement::After => element.to_threadsafe().get_pseudo(PseudoElement::After),
|
||||
WhichPseudoElement::Before => element.to_threadsafe().get_pseudo(PseudoElement::Before),
|
||||
}
|
||||
.and_then(|pseudo_element| {
|
||||
let style = pseudo_element.style(context.shared_context());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue