style: Add a comment about pre_process_children_hook.

This commit is contained in:
Emilio Cobos Álvarez 2016-07-25 21:26:49 -07:00
parent c3a727ebda
commit 572b3c31bd
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -73,6 +73,12 @@ fn top_down_dom<N, C>(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;