style: Don't pop too much in the bloom filter.

This is not a problem for Servo, because we recovered it without much problem a
few lines below, and we never reached the pathological case where the filter has
one element (the root), and we restyled another element with depth 1.

Fixes bug 1321725.
This commit is contained in:
Emilio Cobos Álvarez 2016-12-02 12:29:25 +01:00
parent a913815a4d
commit e3a9637107
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -181,7 +181,7 @@ impl StyleBloom {
// If the filter represents an element too deep in the dom, we need to
// pop ancestors.
while current_depth >= element_depth - 1 {
while current_depth > element_depth - 1 {
self.pop::<E>().expect("Emilio is bad at math");
current_depth -= 1;
}