aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/style/matching.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/components/style/matching.rs b/components/style/matching.rs
index 9e54ae9c299..8d96de06b9e 100644
--- a/components/style/matching.rs
+++ b/components/style/matching.rs
@@ -186,6 +186,9 @@ trait PrivateMatchMethods: TElement {
use context::DISPLAY_CHANGED_FROM_NONE_FOR_SMIL;
use properties::longhands::display::computed_value as display;
+ debug_assert!(restyle_hints.intersects(RESTYLE_SMIL),
+ "Should have restyle hint for SMIL");
+
let display_changed_from_none = old_values.map_or(false, |old| {
let old_display_style = old.get_box().clone_display();
let new_display_style = new_values.get_box().clone_display();
@@ -219,10 +222,12 @@ trait PrivateMatchMethods: TElement {
use context::UpdateAnimationsTasks;
if context.shared.traversal_flags.for_animation_only() {
- self.handle_display_change_for_smil_if_needed(context,
- old_values.as_ref().map(|v| &**v),
- new_values,
- restyle_hint);
+ if restyle_hint.intersects(RESTYLE_SMIL) {
+ self.handle_display_change_for_smil_if_needed(context,
+ old_values.as_ref().map(|v| &**v),
+ new_values,
+ restyle_hint);
+ }
return;
}