style: Add a way to match a single compound selector.

Also improve the ergonomics of matches_complex_selector.

Bug: 1368240
MozReview-Commit-ID: 9DWDvyZmetM
This commit is contained in:
Emilio Cobos Álvarez 2017-06-13 10:58:47 +02:00
parent 262f6adc30
commit 151b636562
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 91 additions and 17 deletions

View file

@ -1547,7 +1547,7 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
let old_value = context.within_functional_pseudo_class_argument;
context.within_functional_pseudo_class_argument = true;
let result = sels.iter().any(|s| {
matches_complex_selector(s, 0, self, context, flags_setter)
matches_complex_selector(s.iter(), self, context, flags_setter)
});
context.within_functional_pseudo_class_argument = old_value;
result