mirror of
https://github.com/servo/servo.git
synced 2025-06-21 15:49:04 +01:00
update per comment
This commit is contained in:
parent
b27f4a8969
commit
e94b3d140c
1 changed files with 2 additions and 0 deletions
|
@ -158,6 +158,8 @@ fn match_and_cascade_node(unsafe_layout_node: UnsafeLayoutNode,
|
|||
// Prepare for flow construction by adding this node to the leaf set or counting its
|
||||
// children.
|
||||
if child_count == 0 {
|
||||
// We don't need set the `child_count` field here since that's only used by kids during
|
||||
// bottom-up traversals, and since this node is a leaf it has no kids.
|
||||
layout_context.dom_leaf_set.access(|dom_leaf_set| dom_leaf_set.insert(&node));
|
||||
} else {
|
||||
let mut layout_data_ref = node.mutate_layout_data();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue