aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/window.rs')
-rw-r--r--components/script/dom/window.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index cd00390a305..b6bf6a35643 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -1200,9 +1200,11 @@ impl Window {
if !for_display || self.Document().needs_reflow() {
issued_reflow = self.force_reflow(goal, query_type, reason);
- // If window_size is `None`, we don't reflow, so the document stays dirty.
- // Otherwise, we shouldn't need a reflow immediately after a reflow.
+ // If window_size is `None`, we don't reflow, so the document stays
+ // dirty. Otherwise, we shouldn't need a reflow immediately after a
+ // reflow, except if we're waiting for a deferred paint.
assert!(!self.Document().needs_reflow() ||
+ (!for_display && self.Document().needs_paint()) ||
self.window_size.get().is_none() ||
self.suppress_reflow.get());
} else {