mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Make the needs_reflow method actually work correctly.
The document node is always dirty because layout never clears the bit; instead, check the dirty bit of the root element.
This commit is contained in:
parent
ea690a2dff
commit
31c013858f
2 changed files with 15 additions and 4 deletions
|
@ -966,7 +966,11 @@ impl Window {
|
|||
return
|
||||
}
|
||||
|
||||
self.force_reflow(goal, query_type, reason)
|
||||
self.force_reflow(goal, query_type, reason);
|
||||
|
||||
// If window_size is `None`, we don't reflow, so the document stays dirty.
|
||||
// Otherwise, we shouldn't need a reflow immediately after a reflow.
|
||||
assert!(!self.Document().needs_reflow() || self.window_size.get().is_none());
|
||||
}
|
||||
|
||||
pub fn layout(&self) -> &LayoutRPC {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue