diff options
Diffstat (limited to 'components/layout_thread/lib.rs')
-rw-r--r-- | components/layout_thread/lib.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index fe1f82f533b..e670d214e03 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -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 + } + } } } |