mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
script: Remove 'pending reflow' concept and some explicit reflows (#34558)
The `pending reflow` concept isn't necessary now that *update the rendering* is taking care of triggering reflows at the correct time. `Window::reflow` already avoids reflows if the page is not dirty, so pending reflows is now just an extraneous check as long as *update the rendering* runs properly. This change also removes some explicit reflows, which now wait until the appropriate moment during *update the rendering*. This should remove some extra reflows that are not necessary. Servo needs some way to track that resizing the web view needs to re-layout due to the initial containing block changing. Move handling of `Document::needs_paint` to the script thread and use this, expanding the rustdoc to explain what it is for a bit more clearly. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
bc741bdc0b
commit
3f85a27097
10 changed files with 43 additions and 122 deletions
|
@ -49,14 +49,6 @@ impl<'ld> ServoLayoutDocument<'ld> {
|
|||
.next()
|
||||
}
|
||||
|
||||
pub fn needs_paint_from_layout(&self) {
|
||||
self.document.needs_paint_from_layout()
|
||||
}
|
||||
|
||||
pub fn will_paint(&self) {
|
||||
self.document.will_paint()
|
||||
}
|
||||
|
||||
pub fn style_shared_lock(&self) -> &StyleSharedRwLock {
|
||||
self.document.style_shared_lock()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue