aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/style/data.rs2
-rw-r--r--components/style/dom.rs2
-rw-r--r--components/style/invalidation/element/restyle_hints.rs8
3 files changed, 8 insertions, 4 deletions
diff --git a/components/style/data.rs b/components/style/data.rs
index 21d35252304..c835593fed2 100644
--- a/components/style/data.rs
+++ b/components/style/data.rs
@@ -324,7 +324,7 @@ impl ElementData {
}
debug_assert!(hint.has_recascade_self(),
- "We definitely need to do something!");
+ "We definitely need to do something: {:?}!", hint);
return RestyleKind::CascadeOnly;
}
diff --git a/components/style/dom.rs b/components/style/dom.rs
index 4b69a8e2c8a..58050757b30 100644
--- a/components/style/dom.rs
+++ b/components/style/dom.rs
@@ -492,7 +492,7 @@ pub trait TElement : Eq + PartialEq + Debug + Hash + Sized + Copy + Clone +
return false;
}
- data.has_styles() && !data.restyle.hint.has_non_animation_hint()
+ data.has_styles() && !data.restyle.hint.has_non_animation_invalidations()
}
/// Flags an element and its ancestors with a given `DescendantsBit`.
diff --git a/components/style/invalidation/element/restyle_hints.rs b/components/style/invalidation/element/restyle_hints.rs
index c9171d368cc..d846afa5e51 100644
--- a/components/style/invalidation/element/restyle_hints.rs
+++ b/components/style/invalidation/element/restyle_hints.rs
@@ -65,8 +65,12 @@ impl RestyleHint {
}
/// Returns whether we need to restyle this element.
- pub fn has_self_invalidations(&self) -> bool {
- self.intersects(RESTYLE_SELF | RECASCADE_SELF | Self::replacements())
+ pub fn has_non_animation_invalidations(&self) -> bool {
+ self.intersects(
+ RESTYLE_SELF |
+ RECASCADE_SELF |
+ (Self::replacements() & !Self::for_animations())
+ )
}
/// Propagates this restyle hint to a child element.