Bug 1383001: Improve the information the "styles not up-to-date" assertion gives back. r?heycam
Always I end up debugging it I end up adding a bunch of printlns near it. This
should be clearer.
MozReview-Commit-ID: ITpfi9tXAw3
--- a/servo/ports/geckolib/glue.rs
+++ b/servo/ports/geckolib/glue.rs
@@ -2797,17 +2797,17 @@ pub extern "C" fn Servo_ResolveStyle(ele
// In the case where we process for throttled animation, there remaings
// restyle hints other than animation hints.
let flags = if restyle_behavior == Restyle::ForThrottledAnimationFlush {
ANIMATION_ONLY
} else {
TraversalFlags::empty()
};
debug_assert!(element.has_current_styles_for_traversal(&*data, flags),
- "Resolving style on element without current styles");
+ "Resolving style on {:?} without current styles: {:?}", element, data);
data.styles.primary().clone().into_strong()
}
#[no_mangle]
pub extern "C" fn Servo_ResolveStyleLazily(element: RawGeckoElementBorrowed,
pseudo_type: CSSPseudoElementType,
rule_inclusion: StyleRuleInclusion,
snapshots: *const ServoElementSnapshotTable,