Skip to content

Commit

Permalink
style: Restrict XUL tree pseudos on nightly and early-beta.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed Aug 7, 2018
1 parent 998e6f1 commit 888ad3e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion components/style/gecko/pseudo_element_definition.mako.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion components/style/gecko/selector_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 888ad3e

Please sign in to comment.