Index: third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp |
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp b/third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp |
index ca1b9b643d46af86d17cfb8df99b4f256a51660c..36c385f2078736f150b95f586ed2665536de1d53 100644 |
--- a/third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp |
+++ b/third_party/WebKit/Source/core/svg/SVGAnimateElement.cpp |
@@ -129,11 +129,18 @@ AnimatedPropertyType SVGAnimateElement::animatedPropertyType() { |
return m_animator.type(); |
} |
+bool SVGAnimateElement::hasValidTarget() { |
+ return SVGAnimationElement::hasValidTarget() && hasValidAttributeName() && |
+ hasValidAttributeType(); |
+} |
+ |
+bool SVGAnimateElement::hasValidAttributeName() const { |
+ return attributeName() != anyQName(); |
+} |
+ |
bool SVGAnimateElement::hasValidAttributeType() { |
- SVGElement* targetElement = this->targetElement(); |
- if (!targetElement) |
+ if (!targetElement()) |
return false; |
- |
return animatedPropertyType() != AnimatedUnknown && |
!hasInvalidCSSAttributeType(); |
} |
@@ -141,9 +148,7 @@ bool SVGAnimateElement::hasValidAttributeType() { |
SVGAnimateElement::ShouldApplyAnimationType |
SVGAnimateElement::shouldApplyAnimation(SVGElement* targetElement, |
const QualifiedName& attributeName) { |
- if (!hasValidAttributeType() || attributeName == anyQName() || |
- !targetElement || !targetElement->inActiveDocument() || |
- !targetElement->parentNode()) |
+ if (!hasValidTarget() || !targetElement->parentNode()) |
return DontApplyAnimation; |
// Always animate CSS properties using the ApplyCSSAnimation code path, |