diff --git a/components/selectors/parser.rs b/components/selectors/parser.rs index 3fa3f135f9e..197ce4f2629 100644 --- a/components/selectors/parser.rs +++ b/components/selectors/parser.rs @@ -316,7 +316,6 @@ impl SelectorMethods for Component { } } - AttributeInNoNamespace { ref local_name, ref local_name_lower, .. } | AttributeInNoNamespaceExists { ref local_name, ref local_name_lower } => { if !visitor.visit_attribute_selector( &NamespaceConstraint::Specific(&namespace_empty_string::()), @@ -326,7 +325,17 @@ impl SelectorMethods for Component { return false; } } - AttributeOther(ref attr_selector) => { + AttributeInNoNamespace { ref local_name, ref local_name_lower, never_matches, .. } + if !never_matches => { + if !visitor.visit_attribute_selector( + &NamespaceConstraint::Specific(&namespace_empty_string::()), + local_name, + local_name_lower, + ) { + return false; + } + } + AttributeOther(ref attr_selector) if !attr_selector.never_matches => { if !visitor.visit_attribute_selector( &attr_selector.namespace(), &attr_selector.local_name,