Auto merge of #16045 - mbrubeck:any, r=emilio

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

https://bugzilla.mozilla.org/show_bug.cgi?id=1348487
This commit is contained in:
bors-servo 2017-03-20 08:31:25 -07:00 committed by GitHub
commit 17098ddc8f

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(())