mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Use Servo-specific pseudo element for InlineBlock fragment
This commit is contained in:
parent
54e2b7b2d5
commit
836e554c30
5 changed files with 24 additions and 15 deletions
|
@ -39,6 +39,7 @@ pub enum PseudoElement {
|
|||
ServoAnonymousTableRow,
|
||||
ServoAnonymousTableCell,
|
||||
ServoAnonymousBlock,
|
||||
ServoInlineBlockWrapper,
|
||||
}
|
||||
|
||||
impl ToCss for PseudoElement {
|
||||
|
@ -57,6 +58,7 @@ impl ToCss for PseudoElement {
|
|||
ServoAnonymousTableRow => "::-servo-anonymous-table-row",
|
||||
ServoAnonymousTableCell => "::-servo-anonymous-table-cell",
|
||||
ServoAnonymousBlock => "::-servo-anonymous-block",
|
||||
ServoInlineBlockWrapper => "::-servo-inline-block-wrapper",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -89,7 +91,8 @@ impl PseudoElement {
|
|||
PseudoElement::ServoAnonymousTable |
|
||||
PseudoElement::ServoAnonymousTableRow |
|
||||
PseudoElement::ServoAnonymousTableCell |
|
||||
PseudoElement::ServoAnonymousBlock => PseudoElementCascadeType::Precomputed,
|
||||
PseudoElement::ServoAnonymousBlock |
|
||||
PseudoElement::ServoInlineBlockWrapper => PseudoElementCascadeType::Precomputed,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -320,6 +323,12 @@ impl<'a> ::selectors::Parser for SelectorParser<'a> {
|
|||
}
|
||||
ServoAnonymousBlock
|
||||
},
|
||||
"-servo-inline-block-wrapper" => {
|
||||
if !self.in_user_agent_stylesheet() {
|
||||
return Err(())
|
||||
}
|
||||
ServoInlineBlockWrapper
|
||||
},
|
||||
_ => return Err(())
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue