Bug 1073336 part 7 - Move style flushing to CSSAnimationPlayer and CSSTransitionPlayer; r=dbaron
Previously AnimationPlayer::Play() and AnimationPlayer::PlayState() would flush styles as part of their operation. This, however, is only needed when the player corresponds to a CSS Animation or CSS Transition. Now that we have concrete subclasses for each of these cases we can move style flushing to the subclasses and remove it from the base class (which is expected to be shared with animations that are not dependent on style).
This commit is contained in:
@@ -41,6 +41,24 @@ CSSAnimationPlayer::Pause(UpdateFlags aUpdateFlags)
|
||||
AnimationPlayer::Pause(aUpdateFlags);
|
||||
}
|
||||
|
||||
mozilla::dom::AnimationPlayState
|
||||
CSSAnimationPlayer::PlayStateFromJS() const
|
||||
{
|
||||
// Flush style to ensure that any properties controlling animation state
|
||||
// (e.g. animation-play-state) are fully updated.
|
||||
FlushStyle();
|
||||
return AnimationPlayer::PlayStateFromJS();
|
||||
}
|
||||
|
||||
void
|
||||
CSSAnimationPlayer::PlayFromJS()
|
||||
{
|
||||
// Note that flushing style below might trigger calls to
|
||||
// PlayFromStyle()/PauseFromStyle() on this object.
|
||||
FlushStyle();
|
||||
AnimationPlayer::PlayFromJS();
|
||||
}
|
||||
|
||||
void
|
||||
CSSAnimationPlayer::PlayFromStyle()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user