style: Update has_current_styles_for_this_traversal to not look at animation hints in non-animation traversals.

MozReview-Commit-ID: 4bwwIGcoXqA
This commit is contained in:
Emilio Cobos Álvarez 2017-07-22 14:58:07 +02:00
parent 9d21f9e6ce
commit f2fe3facf3
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 1 additions and 8 deletions

View file

@ -298,11 +298,6 @@ impl ElementData {
self.styles.primary.is_some() 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 /// Returns the kind of restyling that we're going to need to do on this
/// element, based of the stored restyle hint. /// element, based of the stored restyle hint.
pub fn restyle_kind( pub fn restyle_kind(
@ -313,8 +308,6 @@ impl ElementData {
return self.restyle_kind_for_animation(shared_context); return self.restyle_kind_for_animation(shared_context);
} }
debug_assert!(!self.has_styles() || self.has_invalidations(),
"Should've stopped earlier");
if !self.has_styles() { if !self.has_styles() {
return RestyleKind::MatchAndCascade; return RestyleKind::MatchAndCascade;
} }

View file

@ -492,7 +492,7 @@ pub trait TElement : Eq + PartialEq + Debug + Hash + Sized + Copy + Clone +
return false; 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`. /// Flags an element and its ancestors with a given `DescendantsBit`.