mirror of
https://github.com/servo/servo.git
synced 2025-06-12 18:34:39 +00:00
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
This commit is contained in:
parent
1fcc447941
commit
fd9cd2f103
6 changed files with 106 additions and 52 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue