diff options
author | Cameron McCormack <cam@mcc.id.au> | 2016-12-04 15:49:52 -1000 |
---|---|---|
committer | Cameron McCormack <cam@mcc.id.au> | 2016-12-04 15:50:25 -1000 |
commit | 78c812866aac018f4d5a42ebe440a01aef3aeab8 (patch) | |
tree | 178665bf73e3caf125d9f5249bfdb9c2a73274eb /components/style/sequential.rs | |
parent | 07a3e9b2266c87493cb70c6f50e36a0d2dfe8a66 (diff) | |
download | servo-78c812866aac018f4d5a42ebe440a01aef3aeab8.tar.gz servo-78c812866aac018f4d5a42ebe440a01aef3aeab8.zip |
Fix current_dom_depth in sequential traversal. (fixes #14414)
Diffstat (limited to 'components/style/sequential.rs')
-rw-r--r-- | components/style/sequential.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/style/sequential.rs b/components/style/sequential.rs index 4b92c52f80d..0e5253b2073 100644 --- a/components/style/sequential.rs +++ b/components/style/sequential.rs @@ -24,8 +24,9 @@ pub fn traverse_dom<N, C>(root: N, C::traverse_children(el, |kid| doit::<N, C>(context, kid, data)); - // NB: Data is unused now, but we can always decrement the count - // here if we need it for the post-order one :) + if let Some(ref mut depth) = data.current_dom_depth { + *depth -= 1; + } } if context.needs_postorder_traversal() { |