mirror of
https://github.com/servo/servo.git
synced 2025-07-16 11:53:39 +01:00
Fix current_dom_depth in sequential traversal. (fixes #14414)
This commit is contained in:
parent
07a3e9b226
commit
78c812866a
1 changed files with 3 additions and 2 deletions
|
@ -24,8 +24,9 @@ pub fn traverse_dom<N, C>(root: N,
|
||||||
|
|
||||||
C::traverse_children(el, |kid| doit::<N, C>(context, kid, data));
|
C::traverse_children(el, |kid| doit::<N, C>(context, kid, data));
|
||||||
|
|
||||||
// NB: Data is unused now, but we can always decrement the count
|
if let Some(ref mut depth) = data.current_dom_depth {
|
||||||
// here if we need it for the post-order one :)
|
*depth -= 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if context.needs_postorder_traversal() {
|
if context.needs_postorder_traversal() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue