Remove special-casing anonymous box in PseudoElement::exposed_in_non_ua_sheets.

This commit is contained in:
Xidorn Quan 2017-07-12 15:07:27 +10:00
parent 38577fd6ee
commit 01ea3cc3e3
2 changed files with 6 additions and 11 deletions

View file

@ -91,10 +91,6 @@ impl PseudoElement {
/// Whether this pseudo-element is web-exposed.
pub fn exposed_in_non_ua_sheets(&self) -> bool {
if self.is_anon_box() {
return false;
}
(self.flags() & structs::CSS_PSEUDO_ELEMENT_UA_SHEET_ONLY) == 0
}

View file

@ -65,13 +65,12 @@ impl PseudoElement {
pub fn flags(&self) -> u32 {
match *self {
% for pseudo in PSEUDOS:
PseudoElement::${pseudo.capitalized()} => {
% if pseudo.is_anon_box():
0
% else:
structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_${pseudo.original_ident}
% endif
}
PseudoElement::${pseudo.capitalized()} =>
% if pseudo.is_anon_box():
structs::CSS_PSEUDO_ELEMENT_UA_SHEET_ONLY,
% else:
structs::SERVO_CSS_PSEUDO_ELEMENT_FLAGS_${pseudo.original_ident},
% endif
% endfor
}
}