| Index: Source/core/animation/css/CSSAnimations.cpp
|
| diff --git a/Source/core/animation/css/CSSAnimations.cpp b/Source/core/animation/css/CSSAnimations.cpp
|
| index 1e94f60a44c42de2c4c5887afb0b5d5a05eb3101..64d235d1a53ea09de9950ece0ae83d7a08ab7671 100644
|
| --- a/Source/core/animation/css/CSSAnimations.cpp
|
| +++ b/Source/core/animation/css/CSSAnimations.cpp
|
| @@ -398,13 +398,22 @@ void CSSAnimations::maybeApplyPendingUpdate(Element* element)
|
| if (animation->hasActiveAnimationsOnCompositor(id) && update->newTransitions().find(id) != update->newTransitions().end() && !player->limited())
|
| retargetedCompositorTransitions.add(id, std::pair<RefPtrWillBeMember<Animation>, double>(animation, player->startTimeInternal()));
|
| player->cancel();
|
| + // after cancelation, transitions must be downgraded or they'll fail
|
| + // to be considered when retriggering themselves. This can happen if
|
| + // the transition is captured through getAnimationPlayers then played.
|
| + if (player->source() && player->source()->isAnimation())
|
| + toAnimation(player->source())->downgradeToNormalAnimation();
|
| player->update(TimingUpdateOnDemand);
|
| }
|
|
|
| for (CSSPropertyID id : update->finishedTransitions()) {
|
| // This transition can also be cancelled and finished at the same time
|
| - if (m_transitions.contains(id))
|
| - m_transitions.take(id);
|
| + if (m_transitions.contains(id)) {
|
| + RefPtrWillBeRawPtr<AnimationPlayer> player = m_transitions.take(id).player;
|
| + // Transition must be downgraded
|
| + if (player->source() && player->source()->isAnimation())
|
| + toAnimation(player->source())->downgradeToNormalAnimation();
|
| + }
|
| }
|
|
|
| for (const auto& entry : update->newTransitions()) {
|
|
|