Index: Source/core/svg/SVGStaticStringList.cpp |
diff --git a/Source/core/svg/SVGAnimatedLength.cpp b/Source/core/svg/SVGStaticStringList.cpp |
similarity index 56% |
copy from Source/core/svg/SVGAnimatedLength.cpp |
copy to Source/core/svg/SVGStaticStringList.cpp |
index bc447b07280ebfb8d410374e1bd403a14d4851cc..4e68b13a90e2279ca4f261cbe5f1dbacfc824e8c 100644 |
--- a/Source/core/svg/SVGAnimatedLength.cpp |
+++ b/Source/core/svg/SVGStaticStringList.cpp |
@@ -29,28 +29,71 @@ |
*/ |
#include "config.h" |
- |
-#include "core/svg/SVGAnimatedLength.h" |
+#include "core/svg/SVGStaticStringList.h" |
namespace WebCore { |
-void SVGAnimatedLength::setDefaultValueAsString(const String& value) |
+SVGStaticStringList::SVGStaticStringList(SVGElement* contextElement, const QualifiedName& attributeName) |
+ : NewSVGAnimatedPropertyBase(AnimatedStringList, contextElement, attributeName) |
+ , m_value(SVGStringList::create()) |
+ , m_tearOff(SVGStringListTearOff::create(m_value, contextElement, PropertyIsNotAnimVal, attributeName)) |
+{ |
+ ASSERT(contextElement); |
+} |
+ |
+SVGStaticStringList::~SVGStaticStringList() |
+{ |
+} |
+ |
+NewSVGPropertyBase* SVGStaticStringList::currentValueBase() |
+{ |
+ return m_value.get(); |
+} |
+ |
+void SVGStaticStringList::animationStarted() |
+{ |
+ ASSERT_NOT_REACHED(); |
+} |
+ |
+PassRefPtr<NewSVGPropertyBase> SVGStaticStringList::createAnimatedValue() |
+{ |
+ ASSERT_NOT_REACHED(); |
+ return 0; |
+} |
+ |
+void SVGStaticStringList::setAnimatedValue(PassRefPtr<NewSVGPropertyBase>) |
+{ |
+ ASSERT_NOT_REACHED(); |
+} |
+ |
+void SVGStaticStringList::animationEnded() |
+{ |
+ ASSERT_NOT_REACHED(); |
+} |
+ |
+void SVGStaticStringList::animValWillChange() |
+{ |
+ ASSERT_NOT_REACHED(); |
+} |
+ |
+void SVGStaticStringList::animValDidChange() |
+{ |
+ ASSERT_NOT_REACHED(); |
+} |
+ |
+bool SVGStaticStringList::needsSynchronizeAttribute() |
{ |
- baseValue()->setValueAsString(value, ASSERT_NO_EXCEPTION); |
+ return m_tearOff; |
} |
-void SVGAnimatedLength::setBaseValueAsString(const String& value, SVGLengthNegativeValuesMode mode, SVGParsingError& parseError) |
+void SVGStaticStringList::setBaseValueAsString(const String& value, SVGParsingError& parseError) |
{ |
TrackExceptionState es; |
- baseValue()->setValueAsString(value, es); |
+ m_value->setValueAsString(value, es); |
- if (es.hadException()) { |
+ if (es.hadException()) |
parseError = ParsingAttributeFailedError; |
- baseValue()->newValueSpecifiedUnits(LengthTypeNumber, 0); |
- } else if (mode == ForbidNegativeLengths && baseValue()->valueInSpecifiedUnits() < 0) { |
- parseError = NegativeValueForbiddenError; |
- } |
} |
} |