| Index: Source/core/animation/Player.cpp
|
| diff --git a/Source/core/animation/Player.cpp b/Source/core/animation/Player.cpp
|
| index 35d2ed0f64897830a8f405a392f7fef49229b9ac..1e5972605e74b0cefef22ae71c362d831c3adfca 100644
|
| --- a/Source/core/animation/Player.cpp
|
| +++ b/Source/core/animation/Player.cpp
|
| @@ -98,26 +98,31 @@ double Player::currentTimeWithLag() const
|
| void Player::updateTimingState(double newCurrentTime)
|
| {
|
| ASSERT(!isNull(newCurrentTime));
|
| + bool oldHeld = m_held;
|
| m_held = m_paused || !m_playbackRate || limited(newCurrentTime);
|
| if (m_held) {
|
| + if (!oldHeld || m_holdTime != newCurrentTime)
|
| + setOutdated();
|
| m_holdTime = newCurrentTime;
|
| m_storedTimeLag = nullValue();
|
| } else {
|
| m_holdTime = nullValue();
|
| m_storedTimeLag = currentTimeWithoutLag() - newCurrentTime;
|
| + setOutdated();
|
| }
|
| - setOutdated();
|
| }
|
|
|
| void Player::updateCurrentTimingState()
|
| {
|
| if (m_held) {
|
| updateTimingState(m_holdTime);
|
| - } else {
|
| - updateTimingState(currentTimeWithLag());
|
| - if (m_held && limited(m_holdTime))
|
| - m_holdTime = m_playbackRate < 0 ? 0 : sourceEnd();
|
| + return;
|
| }
|
| + if (!limited(currentTimeWithLag()))
|
| + return;
|
| + m_held = true;
|
| + m_holdTime = m_playbackRate < 0 ? 0 : sourceEnd();
|
| + m_storedTimeLag = nullValue();
|
| }
|
|
|
| double Player::currentTime()
|
| @@ -141,8 +146,10 @@ void Player::setStartTime(double newStartTime)
|
| return;
|
| updateCurrentTimingState(); // Update the value of held
|
| m_startTime = newStartTime;
|
| - if (!m_held)
|
| - updateCurrentTimingState();
|
| + if (m_held)
|
| + return;
|
| + updateCurrentTimingState();
|
| + setOutdated();
|
| }
|
|
|
| void Player::setSource(TimedItem* newSource)
|
| @@ -264,15 +271,12 @@ void Player::cancelAnimationOnCompositor()
|
|
|
| bool Player::update()
|
| {
|
| - if (!m_timeline)
|
| - return false;
|
| -
|
| - double inheritedTime = isNull(m_timeline->currentTime()) ? nullValue() : currentTime();
|
| m_outdated = false;
|
|
|
| - if (!m_content)
|
| + if (!m_timeline || !m_content)
|
| return false;
|
|
|
| + double inheritedTime = isNull(m_timeline->currentTime()) ? nullValue() : currentTime();
|
| m_content->updateInheritedTime(inheritedTime);
|
|
|
| ASSERT(!m_outdated);
|
|
|