Commit 8f68dad4 authored by Tim Nguyen's avatar Tim Nguyen
Browse files

Bug 1685621b - Fix serialization of complex :not(). r=emilio, a=jcristau

Differential Revision: https://phabricator.services.mozilla.com/D101090
parent d26e799a
......@@ -1519,14 +1519,6 @@ impl<Impl: SelectorImpl> ToCss for Component<Impl> {
AttributeOther(ref attr_selector) => attr_selector.to_css(dest),
// Pseudo-classes
Negation(ref arg) => {
dest.write_str(":not(")?;
for component in arg.iter() {
component.to_css(dest)?;
}
dest.write_str(")")
},
FirstChild => dest.write_str(":first-child"),
LastChild => dest.write_str(":last-child"),
OnlyChild => dest.write_str(":only-child"),
......@@ -1556,10 +1548,11 @@ impl<Impl: SelectorImpl> ToCss for Component<Impl> {
write_affine(dest, a, b)?;
dest.write_char(')')
},
Is(ref list) | Where(ref list) => {
Is(ref list) | Where(ref list) | Negation(ref list) => {
match *self {
Where(..) => dest.write_str(":where(")?,
Is(..) => dest.write_str(":is(")?,
Negation(..) => dest.write_str(":not(")?,
_ => unreachable!(),
}
serialize_selector_list(list.iter(), dest)?;
......
[parse-not.html]
[":not(span.a, div.b)" should be a valid selector]
expected: FAIL
[":not(.a .b ~ c, .d .e)" should be a valid selector]
expected: FAIL
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment