style: Don't support a list of selectors in ::slotted yet.

Bug: 1425757
Reviewed-by: xidorn
MozReview-Commit-ID: G0I0gM2sWTh
This commit is contained in:
Emilio Cobos Álvarez 2017-12-17 18:45:51 +01:00
parent c2cacb69f3
commit b556ddbf55
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 66 additions and 39 deletions

View file

@ -555,18 +555,16 @@ where
{
match *selector {
Component::Combinator(_) => unreachable!(),
Component::Slotted(ref selectors) => {
Component::Slotted(ref selector) => {
context.shared.nesting_level += 1;
let result =
element.assigned_slot().is_some() &&
selectors.iter().any(|s| {
matches_complex_selector(
s.iter(),
element,
context.shared,
flags_setter,
)
});
matches_complex_selector(
selector.iter(),
element,
context.shared,
flags_setter,
);
context.shared.nesting_level -= 1;
result
}