mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
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:
parent
429db6a3c6
commit
f9205440b5
3 changed files with 29 additions and 14 deletions
|
@ -122,6 +122,12 @@ impl<E: TElement> StyleBloom<E> {
|
|||
self.elements.is_empty()
|
||||
}
|
||||
|
||||
/// Returns the DOM depth of elements that can be correctly
|
||||
/// matched against the bloom filter (that is, the number of
|
||||
/// elements in our list).
|
||||
pub fn matching_depth(&self) -> usize {
|
||||
self.elements.len()
|
||||
}
|
||||
|
||||
/// Clears the bloom filter.
|
||||
pub fn clear(&mut self) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue