mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
style: Add a comment about pre_process_children_hook.
This commit is contained in:
parent
c3a727ebda
commit
572b3c31bd
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue