Bug 1349553: Add a bit of debugging information to the preprocess_children stage.
MozReview-Commit-ID: 7zv62MRX8dE
--- a/servo/components/style/traversal.rs
+++ b/servo/components/style/traversal.rs
@@ -562,16 +562,17 @@ fn compute_style<E, D>(_traversal: &D,
fn preprocess_children<E, D>(traversal: &D,
element: E,
mut propagated_hint: StoredRestyleHint,
damage_handled: RestyleDamage,
parent_inherited_style_changed: bool)
where E: TElement,
D: DomTraversal<E>
{
+ debug!("preprocess_children: {:?}", element);
// Loop over all the children.
for child in element.as_node().children() {
// FIXME(bholley): Add TElement::element_children instead of this.
let child = match child.as_element() {
Some(el) => el,
None => continue,
};
@@ -594,16 +595,18 @@ fn preprocess_children<E, D>(traversal:
// Propagate the parent and sibling restyle hint.
if !propagated_hint.is_empty() {
restyle_data.hint.insert(&propagated_hint);
}
// Handle element snapshots and sibling restyle hints.
let stylist = &traversal.shared_context().stylist;
let later_siblings = restyle_data.compute_final_hint(child, stylist);
+ debug!(" > {:?} -> {:?}, later_siblings: {:?}",
+ child, restyle_data.hint, later_siblings);
if later_siblings {
propagated_hint.insert(&(RESTYLE_SELF | RESTYLE_DESCENDANTS).into());
}
// Store the damage already handled by ancestors.
restyle_data.set_damage_handled(damage_handled);
// If properties that we inherited from the parent changed, we need to recascade.