mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Only restyle viewport-relative nodes on viewport size change
This commit is contained in:
parent
e7a55ae55e
commit
f754cacbd5
28 changed files with 515 additions and 11 deletions
|
@ -1072,9 +1072,15 @@ impl LayoutThread {
|
|||
.send(ConstellationMsg::ViewportConstrained(self.id, constraints))
|
||||
.unwrap();
|
||||
}
|
||||
// FIXME (#10104): Only dirty nodes affected by vh/vw/vmin/vmax styles.
|
||||
if data.document_stylesheets.iter().any(|sheet| sheet.dirty_on_viewport_size_change) {
|
||||
needs_dirtying = true;
|
||||
for node in node.traverse_preorder() {
|
||||
if node.needs_dirty_on_viewport_size_changed() {
|
||||
node.dirty_self();
|
||||
node.dirty_descendants();
|
||||
// TODO(shinglyu): We can skip the traversal if the descendants were already
|
||||
// dirtied
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue