| Index: Source/core/svg/SVGAnimatedTypeAnimator.cpp
|
| diff --git a/Source/core/svg/SVGAnimatedTypeAnimator.cpp b/Source/core/svg/SVGAnimatedTypeAnimator.cpp
|
| index e1ab094d7f8374abfbe30ff12f836fe521be09ad..c981f53617e2a86243b523936834db13cf1a912c 100644
|
| --- a/Source/core/svg/SVGAnimatedTypeAnimator.cpp
|
| +++ b/Source/core/svg/SVGAnimatedTypeAnimator.cpp
|
| @@ -35,22 +35,26 @@
|
|
|
| namespace WebCore {
|
|
|
| -SVGAnimatedTypeAnimator::SVGAnimatedTypeAnimator(AnimatedPropertyType type, SVGAnimationElement* animationElement, SVGElement* contextElement)
|
| - : m_type(type)
|
| - , m_animationElement(animationElement)
|
| +SVGAnimatedTypeAnimator::SVGAnimatedTypeAnimator(SVGAnimationElement* animationElement, SVGElement* contextElement)
|
| + : m_animationElement(animationElement)
|
| , m_contextElement(contextElement)
|
| {
|
| ASSERT(m_animationElement);
|
| ASSERT(m_contextElement);
|
| - ASSERT(m_type != AnimatedPoint
|
| - && m_type != AnimatedStringList
|
| - && m_type != AnimatedTransform
|
| - && m_type != AnimatedUnknown);
|
|
|
| const QualifiedName& attributeName = m_animationElement->attributeName();
|
| m_animatedProperty = m_contextElement->propertyFromAttribute(attributeName);
|
| - if (m_animatedProperty)
|
| - ASSERT(m_animatedProperty->type() == m_type);
|
| + m_type = m_animatedProperty ? m_animatedProperty->type()
|
| + : SVGElement::animatedPropertyTypeForCSSAttribute(attributeName);
|
| +
|
| + // Only <animateTransform> is allowed to animate AnimatedTransformList.
|
| + // http://www.w3.org/TR/SVG/animate.html#AnimationAttributesAndProperties
|
| + if (m_type == AnimatedTransformList && !isSVGAnimateTransformElement(*animationElement))
|
| + m_type = AnimatedUnknown;
|
| +
|
| + ASSERT(m_type != AnimatedPoint
|
| + && m_type != AnimatedStringList
|
| + && m_type != AnimatedTransform);
|
| }
|
|
|
| SVGAnimatedTypeAnimator::~SVGAnimatedTypeAnimator()
|
| @@ -105,27 +109,24 @@ PassRefPtr<SVGPropertyBase> SVGAnimatedTypeAnimator::createPropertyForAnimation(
|
| return property.release();
|
| }
|
|
|
| - // These types don't appear in the table in SVGElement::cssPropertyToTypeMap() and thus don't need support.
|
| + // These types don't appear in the table in SVGElement::animatedPropertyTypeForCSSAttribute() and thus don't need support.
|
| + case AnimatedAngle:
|
| case AnimatedBoolean:
|
| + case AnimatedEnumeration:
|
| + case AnimatedInteger:
|
| + case AnimatedIntegerOptionalInteger:
|
| case AnimatedNumberList:
|
| case AnimatedNumberOptionalNumber:
|
| + case AnimatedPath:
|
| case AnimatedPoint:
|
| case AnimatedPoints:
|
| + case AnimatedPreserveAspectRatio:
|
| case AnimatedRect:
|
| + case AnimatedStringList:
|
| case AnimatedTransform:
|
| case AnimatedTransformList:
|
| ASSERT_NOT_REACHED();
|
|
|
| - // These properties are not yet migrated to NewProperty implementation. see http://crbug.com/308818
|
| - case AnimatedAngle:
|
| - case AnimatedEnumeration:
|
| - case AnimatedInteger:
|
| - case AnimatedIntegerOptionalInteger:
|
| - case AnimatedPath:
|
| - case AnimatedPreserveAspectRatio:
|
| - case AnimatedStringList:
|
| - ASSERT_NOT_REACHED();
|
| -
|
| case AnimatedUnknown:
|
| ASSERT_NOT_REACHED();
|
| };
|
|
|