diff --git a/components/style/matching.rs b/components/style/matching.rs index 530b3c1f591..4e336c25002 100644 --- a/components/style/matching.rs +++ b/components/style/matching.rs @@ -176,7 +176,7 @@ fn element_matches_candidate(element: &E, miss!(State) } - if element.get_id().is_some() { + if element.get_id() != candidate_element.get_id() { miss!(IdAttr) }