From e3a9637107a175c4333a36becd7fb37be4088caa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 2 Dec 2016 12:29:25 +0100 Subject: [PATCH] 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. --- components/style/bloom.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/style/bloom.rs b/components/style/bloom.rs index 937c8788728..d3ed204fb1e 100644 --- a/components/style/bloom.rs +++ b/components/style/bloom.rs @@ -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::().expect("Emilio is bad at math"); current_depth -= 1; }