Index: Source/core/svg/SVGAnimatedNewPropertyAnimator.cpp |
diff --git a/Source/core/svg/SVGAnimatedNewPropertyAnimator.cpp b/Source/core/svg/SVGAnimatedNewPropertyAnimator.cpp |
index ef497756bfe17eed479d22caa0729e69a75cb769..601f9c0d2a8bb6fa5ad092009d2b478672e5ea53 100644 |
--- a/Source/core/svg/SVGAnimatedNewPropertyAnimator.cpp |
+++ b/Source/core/svg/SVGAnimatedNewPropertyAnimator.cpp |
@@ -31,14 +31,17 @@ |
#include "config.h" |
#include "core/svg/SVGAnimatedNewPropertyAnimator.h" |
+#include "core/svg/SVGAnimateTransformElement.h" |
#include "core/svg/SVGAnimatedColor.h" |
#include "core/svg/SVGAnimationElement.h" |
+#include "core/svg/SVGColor.h" |
#include "core/svg/SVGElementInstance.h" |
#include "core/svg/SVGLength.h" |
#include "core/svg/SVGLengthList.h" |
#include "core/svg/SVGNumber.h" |
#include "core/svg/SVGPointList.h" |
#include "core/svg/SVGString.h" |
+#include "core/svg/SVGTransformList.h" |
namespace WebCore { |
@@ -61,9 +64,15 @@ SVGAnimatedNewPropertyAnimator::~SVGAnimatedNewPropertyAnimator() |
PassRefPtr<NewSVGPropertyBase> SVGAnimatedNewPropertyAnimator::createPropertyForAnimation(const String& value) |
{ |
if (isAnimatingSVGDom()) { |
- ASSERT(m_animatedProperty); |
- |
// SVG DOM animVal animation code-path. |
+ |
+ if (m_type == AnimatedTransformList) { |
haraken
2014/02/11 17:00:21
Would you add a comment about why we need to treat
kouhei (in TOK)
2014/02/12 01:57:49
Done.
|
+ ASSERT(m_animationElement); |
+ SVGTransformType transformType = toSVGAnimateTransformElement(m_animationElement)->transformType(); |
+ return SVGTransformList::create(transformType, value); |
+ } |
+ |
+ ASSERT(m_animatedProperty); |
return m_animatedProperty->currentValueBase()->cloneForAnimation(value); |
} |
@@ -99,11 +108,14 @@ PassRefPtr<NewSVGPropertyBase> SVGAnimatedNewPropertyAnimator::createPropertyFor |
// These types don't appear in the table in SVGElement::cssPropertyToTypeMap() and thus don't need support. |
case AnimatedBoolean: |
+ case AnimatedMatrix: |
case AnimatedNumberList: |
case AnimatedNumberOptionalNumber: |
case AnimatedPoint: |
case AnimatedPoints: |
case AnimatedRect: |
+ case AnimatedTransform: |
+ case AnimatedTransformList: |
ASSERT_NOT_REACHED(); |
// These properties are not yet migrated to NewProperty implementation. see http://crbug.com/308818 |
@@ -114,7 +126,6 @@ PassRefPtr<NewSVGPropertyBase> SVGAnimatedNewPropertyAnimator::createPropertyFor |
case AnimatedPath: |
case AnimatedPreserveAspectRatio: |
case AnimatedStringList: |
- case AnimatedTransformList: |
ASSERT_NOT_REACHED(); |
case AnimatedUnknown: |
@@ -160,8 +171,9 @@ void setAnimatedValueOnAllTargetProperties(const SVGElementAnimatedPropertyList& |
PassRefPtr<NewSVGPropertyBase> SVGAnimatedNewPropertyAnimator::resetAnimation(const SVGElementAnimatedPropertyList& list) |
{ |
+ ASSERT(m_animationElement); |
ASSERT(isAnimatingSVGDom()); |
- RefPtr<NewSVGPropertyBase> animatedValue = m_animatedProperty->createAnimatedValue(); |
+ RefPtr<NewSVGPropertyBase> animatedValue = m_animatedProperty->createAnimatedValue(m_animationElement); |
ASSERT(animatedValue->type() == m_type); |
setAnimatedValueOnAllTargetProperties(list, m_animatedProperty->attributeName(), animatedValue); |