servo: Merge #13132 - layout: Keep track of whether we've deferred the painting of the document due to a script query (from emilio:deferred-paint); r=pcwalton
<!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #13131 <!-- Either: --> - [x] There are tests for these changes OR <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> r? @pcwalton Source-Repo: https://github.com/servo/servo Source-Revision: acb47007ba9494c73272494efe9ebd2c05e4c014
This commit is contained in:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user