mirror of
https://github.com/servo/servo.git
synced 2025-06-23 16:44:33 +01:00
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:
parent
9d21f9e6ce
commit
f2fe3facf3
2 changed files with 1 additions and 8 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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`.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue