Parent mismatch should not clear style sharing cache.

We can have cousins in the cache whose parent doesn't match ours, and other
cousins whose parent does.  When we encounter one of the former, that's not a
reason to stop lookin for the latter.

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1369620
This commit is contained in:
Boris Zbarsky 2017-06-05 16:31:52 -04:00
parent 429db6a3c6
commit f9205440b5
3 changed files with 29 additions and 14 deletions

View file

@ -883,12 +883,14 @@ pub trait MatchMethods : TElement {
.validation_data
.take();
let dom_depth = context.thread_local.bloom_filter.matching_depth();
context.thread_local
.style_sharing_candidate_cache
.insert_if_possible(self,
data.styles().primary.values(),
primary_results.relations,
validation_data);
validation_data,
dom_depth);
}
child_cascade_requirement