summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/svg/animation/SMILTimeContainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/svg/animation/SMILTimeContainer.cpp')
-rw-r--r--Source/WebCore/svg/animation/SMILTimeContainer.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/WebCore/svg/animation/SMILTimeContainer.cpp b/Source/WebCore/svg/animation/SMILTimeContainer.cpp
index 57d9c7f7f..cbf3b7ba5 100644
--- a/Source/WebCore/svg/animation/SMILTimeContainer.cpp
+++ b/Source/WebCore/svg/animation/SMILTimeContainer.cpp
@@ -35,8 +35,6 @@
namespace WebCore {
-static const double animationFrameDelay = 0.025;
-
SMILTimeContainer::SMILTimeContainer(SVGSVGElement* owner)
: m_beginTime(0)
, m_pauseTime(0)
@@ -100,7 +98,7 @@ void SMILTimeContainer::notifyIntervalsChanged()
{
// Schedule updateAnimations() to be called asynchronously so multiple intervals
// can change with updateAnimations() only called once at the end.
- startTimer(0);
+ startTimer(elapsed(), 0);
}
SMILTime SMILTimeContainer::elapsed() const
@@ -161,7 +159,7 @@ void SMILTimeContainer::resume()
m_resumeTime = monotonicallyIncreasingTime();
m_pauseTime = 0;
- startTimer(0);
+ startTimer(elapsed(), 0);
}
void SMILTimeContainer::setElapsed(SMILTime time)
@@ -198,7 +196,7 @@ void SMILTimeContainer::setElapsed(SMILTime time)
updateAnimations(time, true);
}
-void SMILTimeContainer::startTimer(SMILTime fireTime, SMILTime minimumDelay)
+void SMILTimeContainer::startTimer(SMILTime elapsed, SMILTime fireTime, SMILTime minimumDelay)
{
if (!m_beginTime || isPaused())
return;
@@ -206,7 +204,7 @@ void SMILTimeContainer::startTimer(SMILTime fireTime, SMILTime minimumDelay)
if (!fireTime.isFinite())
return;
- SMILTime delay = std::max(fireTime - elapsed(), minimumDelay);
+ SMILTime delay = std::max(fireTime - elapsed, minimumDelay);
m_timer.startOneShot(delay.value());
}
@@ -309,7 +307,7 @@ void SMILTimeContainer::updateAnimations(SMILTime elapsed, bool seekToTime)
#ifndef NDEBUG
m_preventScheduledAnimationsChanges = false;
#endif
- startTimer(earliestFireTime, animationFrameDelay);
+ startTimer(elapsed, earliestFireTime, SMILAnimationFrameDelay);
return;
}
@@ -321,7 +319,7 @@ void SMILTimeContainer::updateAnimations(SMILTime elapsed, bool seekToTime)
m_preventScheduledAnimationsChanges = false;
#endif
- startTimer(earliestFireTime, animationFrameDelay);
+ startTimer(elapsed, earliestFireTime, SMILAnimationFrameDelay);
}
}