#include "config.h"
#include "core/svg/SVGAnimatedNewPropertyAnimator.h"
+#include "core/svg/SVGAnimatedColor.h"
#include "core/svg/SVGAnimationElement.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"
namespace WebCore {
// The instance will not have full context info. (e.g. SVGLengthMode)
switch (m_type) {
+ case AnimatedColor:
+ return SVGColorProperty::create(value.isEmpty() ? StyleColor::currentColor() : SVGColor::colorFromRGBColorString(value));
case AnimatedNumber: {
RefPtr<SVGNumber> property = SVGNumber::create();
property->setValueAsString(value, IGNORE_EXCEPTION);
property->setValueAsString(value, IGNORE_EXCEPTION);
return property.release();
}
+ case AnimatedString: {
+ RefPtr<SVGString> property = SVGString::create();
+ property->setValueAsString(value, IGNORE_EXCEPTION);
+ return property.release();
+ }
// These types don't appear in the table in SVGElement::cssPropertyToTypeMap() and thus don't need support.
case AnimatedBoolean:
// These properties are not yet migrated to NewProperty implementation. see http://crbug.com/308818
case AnimatedAngle:
- case AnimatedColor:
case AnimatedEnumeration:
case AnimatedInteger:
case AnimatedIntegerOptionalInteger:
case AnimatedPath:
case AnimatedPreserveAspectRatio:
- case AnimatedString:
+ case AnimatedStringList:
case AnimatedTransformList:
ASSERT_NOT_REACHED();
SVGElementAnimatedPropertyList::const_iterator itEnd = list.end();
for (; it != itEnd; ++it) {
RefPtr<NewSVGAnimatedPropertyBase> animatedProperty = it->element->propertyFromAttribute(attributeName);
- (animatedProperty.get()->*method)();
+ if (animatedProperty)
+ (animatedProperty.get()->*method)();
}
}
SVGElementAnimatedPropertyList::const_iterator itEnd = list.end();
for (; it != itEnd; ++it) {
RefPtr<NewSVGAnimatedPropertyBase> animatedProperty = it->element->propertyFromAttribute(attributeName);
- animatedProperty->setAnimatedValue(value);
+ if (animatedProperty)
+ animatedProperty->setAnimatedValue(value);
}
}