mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
Make tree pseudos not precomputed since they are not really anonymous boxes.
This commit is contained in:
parent
4ce3dc7729
commit
cd527733c5
4 changed files with 35 additions and 9 deletions
|
@ -94,6 +94,17 @@ impl PseudoElement {
|
|||
${" | ".join(map(lambda name: "PseudoElement::{}".format(name), EAGER_PSEUDOS))})
|
||||
}
|
||||
|
||||
/// Whether this pseudo-element is tree pseudo-element.
|
||||
#[inline]
|
||||
pub fn is_tree_pseudo_element(&self) -> bool {
|
||||
match *self {
|
||||
% for pseudo in TREE_PSEUDOS:
|
||||
${pseudo_element_variant(pseudo)} => true,
|
||||
% endfor
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
/// Gets the flags associated to this pseudo-element, or 0 if it's an
|
||||
/// anonymous box.
|
||||
pub fn flags(&self) -> u32 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue