Skip to content

Commit

Permalink
Add some logging to the traversal.
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: 3PzkUtEsa6p
  • Loading branch information
bholley committed Aug 9, 2017
1 parent c92f883 commit 2a73717
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ports/geckolib/glue.rs
Expand Up @@ -258,6 +258,8 @@ pub extern "C" fn Servo_TraverseSubtree(root: RawGeckoElementBorrowed,

let element = GeckoElement(root);

debug!("Servo_TraverseSubtree (flags={:?})", traversal_flags);

// It makes no sense to do an animation restyle when we're restyling
// newly-inserted content.
if !traversal_flags.contains(traversal_flags::UnstyledChildrenOnly) {
Expand All @@ -266,6 +268,8 @@ pub extern "C" fn Servo_TraverseSubtree(root: RawGeckoElementBorrowed,
element.has_animation_restyle_hints();

if needs_animation_only_restyle {
debug!("Servo_TraverseSubtree doing animation-only restyle (aodd={})",
element.has_animation_only_dirty_descendants());
traverse_subtree(element,
raw_data,
traversal_flags | traversal_flags::AnimationOnly,
Expand All @@ -274,6 +278,8 @@ pub extern "C" fn Servo_TraverseSubtree(root: RawGeckoElementBorrowed,
}

if traversal_flags.for_animation_only() {
debug!("Servo_TraverseSubtree complete (animation-only, aodd={})",
element.has_animation_only_dirty_descendants());
return element.has_animation_only_dirty_descendants() ||
element.borrow_data().unwrap().restyle.is_restyle();
}
Expand All @@ -283,6 +289,11 @@ pub extern "C" fn Servo_TraverseSubtree(root: RawGeckoElementBorrowed,
traversal_flags,
unsafe { &*snapshots });

debug!("Servo_TraverseSubtree complete (dd={}, aodd={}, restyle={:?})",
element.has_dirty_descendants(),
element.has_animation_only_dirty_descendants(),
element.borrow_data().unwrap().restyle);

element.has_dirty_descendants() ||
element.has_animation_only_dirty_descendants() ||
element.borrow_data().unwrap().restyle.contains_restyle_data()
Expand Down

0 comments on commit 2a73717

Please sign in to comment.