style: Restrict XUL tree pseudos on nightly and early-beta.

Differential Revision: https://phabricator.services.mozilla.com/D2598
This commit is contained in:
Emilio Cobos Álvarez 2018-08-01 14:57:01 +02:00
parent 998e6f1797
commit 888ad3eabe
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 8 additions and 2 deletions

View file

@ -112,7 +112,11 @@ impl PseudoElement {
% for pseudo in PSEUDOS:
${pseudo_element_variant(pseudo)} =>
% if pseudo.is_tree_pseudo_element():
0,
if unsafe { structs::StaticPrefs_sVarCache_layout_css_xul_tree_pseudos_content_enabled } {
0
} else {
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS_AND_CHROME
},
% elif pseudo.is_anon_box():
structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS,
% else:

View file

@ -488,7 +488,9 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {
}
let args = args.into_boxed_slice();
if let Some(pseudo) = PseudoElement::tree_pseudo_element(&name, args) {
return Ok(pseudo);
if self.is_pseudo_element_enabled(&pseudo) {
return Ok(pseudo);
}
}
}
Err(