Bug 1348487 - stylo: Don't allow combinators in :-moz-any.

This commit is contained in:
Matt Brubeck 2017-03-20 08:28:46 -07:00
parent bb54f0a429
commit b8dead37f6

View file

@ -341,6 +341,10 @@ impl<'a> ::selectors::Parser for SelectorParser<'a> {
let selectors = parser.parse_comma_separated(|input| {
ComplexSelector::parse(self, input)
})?;
// Selectors inside `:-moz-any` may not include combinators.
if selectors.iter().any(|s| s.next.is_some()) {
return Err(())
}
NonTSPseudoClass::MozAny(selectors)
}
_ => return Err(())