diff options
author | Emilio Cobos Álvarez <ecoal95@gmail.com> | 2016-08-30 16:37:37 -0700 |
---|---|---|
committer | Emilio Cobos Álvarez <ecoal95@gmail.com> | 2016-08-30 17:01:03 -0700 |
commit | fd9cd2f1036a580eba85dc65c11125a0bc85fb17 (patch) | |
tree | 2cf745b208f82a696e87006746a36881044a7853 /components/script/dom/window.rs | |
parent | 1fcc447941b23fb54963f9590219387695e73cb6 (diff) | |
download | servo-fd9cd2f1036a580eba85dc65c11125a0bc85fb17.tar.gz servo-fd9cd2f1036a580eba85dc65c11125a0bc85fb17.zip |
layout: Keep track of whether we've deferred the painting of the document due to
a script query.
This will, rather unfortunately, mean that we might repaint two times if we've
deferred a paint, then get an out-of-band reflow. Still seemed better than not
suppressing paints at all.
Fixes #13131
Diffstat (limited to 'components/script/dom/window.rs')
-rw-r--r-- | components/script/dom/window.rs | 6 |
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 { |