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.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 8e139158427..565308ff36f 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -1520,6 +1520,13 @@ impl Window {
let stylesheets_changed = document.flush_stylesheets_for_reflow();
+ // If this reflow is for display, ensure webgl canvases are composited with
+ // up-to-date contents.
+ match reflow_goal {
+ ReflowGoal::Full => document.flush_dirty_canvases(),
+ ReflowGoal::TickAnimations | ReflowGoal::LayoutQuery(..) => {},
+ }
+
// Send new document and relevant styles to layout.
let needs_display = reflow_goal.needs_display();
let reflow = ScriptReflow {