diff options
Diffstat (limited to 'Source/WebCore/svg/animation/SMILTimeContainer.cpp')
| -rw-r--r-- | Source/WebCore/svg/animation/SMILTimeContainer.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/Source/WebCore/svg/animation/SMILTimeContainer.cpp b/Source/WebCore/svg/animation/SMILTimeContainer.cpp index 3251d5b..0bacdb3 100644 --- a/Source/WebCore/svg/animation/SMILTimeContainer.cpp +++ b/Source/WebCore/svg/animation/SMILTimeContainer.cpp @@ -196,15 +196,15 @@ String SMILTimeContainer::baseValueFor(ElementAttributePair key) if (it != m_savedBaseValues.end()) return it->second; - SVGElement* target = key.first; - String attributeName = key.second; - ASSERT(target); - ASSERT(!attributeName.isEmpty()); + SVGElement* targetElement = key.first; + QualifiedName attributeName = key.second; + ASSERT(targetElement); + ASSERT(attributeName != anyQName()); String baseValue; - if (SVGAnimationElement::attributeIsCSS(attributeName)) - baseValue = computedStyle(target)->getPropertyValue(cssPropertyID(attributeName)); + if (SVGAnimationElement::isTargetAttributeCSSProperty(targetElement, attributeName)) + baseValue = computedStyle(targetElement)->getPropertyValue(cssPropertyID(attributeName.localName())); else - baseValue = target->getAttribute(attributeName); + baseValue = targetElement->getAttribute(attributeName); m_savedBaseValues.add(key, baseValue); return baseValue; } @@ -264,10 +264,11 @@ void SMILTimeContainer::updateAnimations(SMILTime elapsed) SVGElement* targetElement = animation->targetElement(); if (!targetElement) continue; - String attributeName = animation->attributeName(); - if (attributeName.isEmpty()) { + + QualifiedName attributeName = animation->attributeName(); + if (attributeName == anyQName()) { if (animation->hasTagName(SVGNames::animateMotionTag)) - attributeName = SVGNames::animateMotionTag.localName(); + attributeName = SVGNames::animateMotionTag; else continue; } @@ -276,6 +277,8 @@ void SMILTimeContainer::updateAnimations(SMILTime elapsed) ElementAttributePair key(targetElement, attributeName); SVGSMILElement* resultElement = resultsElements.get(key).get(); if (!resultElement) { + if (!animation->hasValidAttributeType()) + continue; resultElement = animation; resultElement->resetToBaseValue(baseValueFor(key)); resultsElements.add(key, resultElement); |
