From e94b3d140c0089ef40cf87ff3d7add6220aff3e7 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 30 Jan 2014 12:07:35 -0800 Subject: [PATCH] update per comment --- src/components/main/layout/parallel.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/main/layout/parallel.rs b/src/components/main/layout/parallel.rs index 674c4a5e423..859a3839333 100644 --- a/src/components/main/layout/parallel.rs +++ b/src/components/main/layout/parallel.rs @@ -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();