aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-07-22 14:58:07 +0200
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-07-24 10:05:48 +0200
commitf2fe3facf338404b58ce5f505890c1d171b53e77 (patch)
tree769db88def15bbc3ae77df2026ce3565a0f36452
parent9d21f9e6cebb932e973b5813a138bb96528b562d (diff)
downloadservo-f2fe3facf338404b58ce5f505890c1d171b53e77.tar.gz
servo-f2fe3facf338404b58ce5f505890c1d171b53e77.zip
style: Update has_current_styles_for_this_traversal to not look at animation hints in non-animation traversals.
MozReview-Commit-ID: 4bwwIGcoXqA
-rw-r--r--components/style/data.rs7
-rw-r--r--components/style/dom.rs2
2 files changed, 1 insertions, 8 deletions
diff --git a/components/style/data.rs b/components/style/data.rs
index faf4b0fc15f..21d35252304 100644
--- a/components/style/data.rs
+++ b/components/style/data.rs
@@ -298,11 +298,6 @@ impl ElementData {
self.styles.primary.is_some()
}
- /// Returns whether we have any outstanding style invalidation.
- pub fn has_invalidations(&self) -> bool {
- self.restyle.hint.has_self_invalidations()
- }
-
/// Returns the kind of restyling that we're going to need to do on this
/// element, based of the stored restyle hint.
pub fn restyle_kind(
@@ -313,8 +308,6 @@ impl ElementData {
return self.restyle_kind_for_animation(shared_context);
}
- debug_assert!(!self.has_styles() || self.has_invalidations(),
- "Should've stopped earlier");
if !self.has_styles() {
return RestyleKind::MatchAndCascade;
}
diff --git a/components/style/dom.rs b/components/style/dom.rs
index 1dc01d8ee99..4b69a8e2c8a 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.has_invalidations()
+ data.has_styles() && !data.restyle.hint.has_non_animation_hint()
}
/// Flags an element and its ancestors with a given `DescendantsBit`.