Index: Source/core/svg/animation/SVGSMILElement.cpp |
diff --git a/Source/core/svg/animation/SVGSMILElement.cpp b/Source/core/svg/animation/SVGSMILElement.cpp |
index 1142df3d684c3433ba5e37b6294c1681ec998fab..11286db7836e00eea565e6789d61beba01645b29 100644 |
--- a/Source/core/svg/animation/SVGSMILElement.cpp |
+++ b/Source/core/svg/animation/SVGSMILElement.cpp |
@@ -745,16 +745,21 @@ SMILTime SVGSMILElement::repeatCount() const |
{ |
if (m_cachedRepeatCount != invalidCachedTime) |
return m_cachedRepeatCount; |
+ SMILTime computedRepeatCount = SMILTime::unresolved(); |
const AtomicString& value = fastGetAttribute(SVGNames::repeatCountAttr); |
- if (value.isNull()) |
- return SMILTime::unresolved(); |
- |
- DEFINE_STATIC_LOCAL(const AtomicString, indefiniteValue, ("indefinite", AtomicString::ConstructFromLiteral)); |
- if (value == indefiniteValue) |
- return SMILTime::indefinite(); |
- bool ok; |
- double result = value.string().toDouble(&ok); |
- return m_cachedRepeatCount = ok && result > 0 ? result : SMILTime::unresolved(); |
+ if (!value.isNull()) { |
+ DEFINE_STATIC_LOCAL(const AtomicString, indefiniteValue, ("indefinite", AtomicString::ConstructFromLiteral)); |
+ if (value == indefiniteValue) { |
+ computedRepeatCount = SMILTime::indefinite(); |
+ } else { |
+ bool ok; |
+ double result = value.string().toDouble(&ok); |
+ if (ok && result > 0) |
+ computedRepeatCount = result; |
+ } |
+ } |
+ m_cachedRepeatCount = computedRepeatCount; |
+ return m_cachedRepeatCount; |
} |
SMILTime SVGSMILElement::maxValue() const |