Index: Source/core/svg/animation/SVGSMILElement.cpp |
diff --git a/Source/core/svg/animation/SVGSMILElement.cpp b/Source/core/svg/animation/SVGSMILElement.cpp |
index b5fdb07a90989cedd5fdaa9f87670f30f427d0c1..b84205a95ed9eb8f7a5adc1f246e7e84a17ed50e 100644 |
--- a/Source/core/svg/animation/SVGSMILElement.cpp |
+++ b/Source/core/svg/animation/SVGSMILElement.cpp |
@@ -1001,7 +1001,9 @@ float SVGSMILElement::calculateAnimationPercentAndRepeat(SMILTime elapsed, unsig |
SMILTime activeTime = elapsed - m_intervalBegin; |
SMILTime repeatingDuration = this->repeatingDuration(); |
if (elapsed >= m_intervalEnd || activeTime > repeatingDuration) { |
- repeat = static_cast<unsigned>(repeatingDuration.value() / simpleDuration.value()) - 1; |
+ repeat = static_cast<unsigned>(repeatingDuration.value() / simpleDuration.value()); |
+ if (!fmod(repeatingDuration.value(), simpleDuration.value())) |
+ repeat--; |
double percent = (m_intervalEnd.value() - m_intervalBegin.value()) / simpleDuration.value(); |
percent = percent - floor(percent); |