diff --git a/components/style/parallel.rs b/components/style/parallel.rs index 889f7f0a15b..b82727657c3 100644 --- a/components/style/parallel.rs +++ b/components/style/parallel.rs @@ -73,6 +73,12 @@ fn top_down_dom(unsafe_nodes: UnsafeNodeList, // Possibly enqueue the children. let mut children_to_process = 0isize; for kid in node.children() { + // Trigger the hook pre-adding the kid to the list. This can (and in + // fact uses to) change the result of the should_process operation. + // + // As of right now, this hook takes care of propagating the restyle + // flag down the tree. In the future, more accurate behavior is + // probably going to be needed. context.pre_process_child_hook(node, kid); if context.should_process(kid) { children_to_process += 1;