Index: Source/core/animation/AnimationPlayer.cpp |
diff --git a/Source/core/animation/AnimationPlayer.cpp b/Source/core/animation/AnimationPlayer.cpp |
index eb84cab28fe6ac38003280cd0d4c1e6e09a85b8a..5dcf433e06e2ecf1820bf9c4091573fdfb6e90ff 100644 |
--- a/Source/core/animation/AnimationPlayer.cpp |
+++ b/Source/core/animation/AnimationPlayer.cpp |
@@ -340,11 +340,13 @@ bool AnimationPlayer::update(UpdateReason reason) |
double AnimationPlayer::timeToEffectChange() |
{ |
ASSERT(!m_outdated); |
- if (!m_content || m_held) |
+ if (m_held || !hasStartTime()) |
return std::numeric_limits<double>::infinity(); |
+ if (!m_content) |
+ return -currentTime() / m_playbackRate; |
if (m_playbackRate > 0) |
return m_content->timeToForwardsEffectChange() / m_playbackRate; |
- return m_content->timeToReverseEffectChange() / std::abs(m_playbackRate); |
+ return m_content->timeToReverseEffectChange() / -m_playbackRate; |
} |
void AnimationPlayer::cancel() |