aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_wrapper.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <ecoal95@gmail.com>2016-08-30 16:37:37 -0700
committerEmilio Cobos Álvarez <ecoal95@gmail.com>2016-08-30 17:01:03 -0700
commitfd9cd2f1036a580eba85dc65c11125a0bc85fb17 (patch)
tree2cf745b208f82a696e87006746a36881044a7853 /components/script/layout_wrapper.rs
parent1fcc447941b23fb54963f9590219387695e73cb6 (diff)
downloadservo-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/layout_wrapper.rs')
-rw-r--r--components/script/layout_wrapper.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs
index 906bde60550..4edd821ad0b 100644
--- a/components/script/layout_wrapper.rs
+++ b/components/script/layout_wrapper.rs
@@ -405,6 +405,14 @@ impl<'ld> TDocument for ServoLayoutDocument<'ld> {
let elements = unsafe { self.document.drain_modified_elements() };
elements.into_iter().map(|(el, snapshot)| (ServoLayoutElement::from_layout_js(el), snapshot)).collect()
}
+
+ fn needs_paint_from_layout(&self) {
+ unsafe { self.document.needs_paint_from_layout(); }
+ }
+
+ fn will_paint(&self) {
+ unsafe { self.document.will_paint(); }
+ }
}
impl<'ld> ServoLayoutDocument<'ld> {