mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
stylo: Fix PseudoElement::pseudo_type.
MozReview-Commit-ID: DH2Pv52ankl
This commit is contained in:
parent
e57ed3d42f
commit
6b8649e012
2 changed files with 22 additions and 6 deletions
|
@ -111,13 +111,20 @@ impl PseudoElement {
|
|||
/// Construct a `CSSPseudoElementType` from a pseudo-element
|
||||
#[inline]
|
||||
pub fn pseudo_type(&self) -> CSSPseudoElementType {
|
||||
use gecko_bindings::structs::CSSPseudoElementType_InheritingAnonBox;
|
||||
|
||||
match *self {
|
||||
% for pseudo in PSEUDOS:
|
||||
% if not pseudo.is_anon_box():
|
||||
PseudoElement::${pseudo.capitalized()} => CSSPseudoElementType::${pseudo.original_ident},
|
||||
% elif pseudo.is_tree_pseudo_element():
|
||||
PseudoElement::${pseudo.capitalized()}(..) => CSSPseudoElementType_InheritingAnonBox,
|
||||
% elif pseudo.is_inheriting_anon_box():
|
||||
PseudoElement::${pseudo.capitalized()} => CSSPseudoElementType_InheritingAnonBox,
|
||||
% else:
|
||||
PseudoElement::${pseudo.capitalized()} => CSSPseudoElementType::NonInheritingAnonBox,
|
||||
% endif
|
||||
% endfor
|
||||
_ => CSSPseudoElementType::NotPseudo
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue