Add has_current_styles_for_traversal().

In animation-only restyle, we just need to check the element
has animation restyle hints or has recascade self which is a result
of animation-only restyle for ancestors.
has_current_styles() in Servo_ResolveStyle() is intentionally left there,
it will be changed in a subsequent patch.
This commit is contained in:
Hiroyuki Ikezoe 2017-07-18 19:13:48 +09:00
parent ae55e51aaf
commit f91126ba86
4 changed files with 37 additions and 7 deletions

View file

@ -131,6 +131,13 @@ impl RestyleHint {
self.intersects(Self::for_animations())
}
/// Returns whether the hint specifies that an animation cascade level must
/// be replaced.
#[inline]
pub fn has_animation_hint_or_recascade(&self) -> bool {
self.intersects(Self::for_animations() | RECASCADE_SELF)
}
/// Returns whether the hint specifies some restyle work other than an
/// animation cascade level replacement.
#[inline]