From 5ddf455235be2a31d10ef388572a35d2433361ae Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 15 May 2017 15:55:05 -0400 Subject: [PATCH] Fix style sharing cache lookups to compare ids of the two elements. Otherwise we can have a situation like this: and the style sharing cache lookup for the second would try to revalidate against the cached value for the first , but end up failing asserts about the two elements matching lists of revalidation selectors that have the same length. --- components/style/matching.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) }