Bug 1383001: Improve the information the "styles not up-to-date" assertion gives back. r?heycam draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sat, 22 Jul 2017 01:33:33 +0200
changeset 613452 f8e46b0c5c8124da900022c5e62c60c198ddf182
parent 613451 d3e54004627bc52e81f32c6ce45114b813569cca
child 613453 199c62dc0df355b668b061ae98188039ea91be63
push id69804
push userbmo:emilio+bugs@crisal.io
push dateFri, 21 Jul 2017 23:36:19 +0000
reviewersheycam
bugs1383001
milestone56.0a1
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
servo/ports/geckolib/glue.rs
--- 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,