Index: Source/core/svg/SVGStaticStringList.h |
diff --git a/Source/core/svg/SVGAnimatedNumberOptionalNumber.h b/Source/core/svg/SVGStaticStringList.h |
similarity index 57% |
copy from Source/core/svg/SVGAnimatedNumberOptionalNumber.h |
copy to Source/core/svg/SVGStaticStringList.h |
index b9ff6018de0d99a67d1c2cfcf3186711f015e9fb..70d674f1f2fd8f0fd31eb25e80ab4f46dfdd64cf 100644 |
--- a/Source/core/svg/SVGAnimatedNumberOptionalNumber.h |
+++ b/Source/core/svg/SVGStaticStringList.h |
@@ -28,43 +28,49 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef SVGAnimatedNumberOptionalNumber_h |
-#define SVGAnimatedNumberOptionalNumber_h |
+#ifndef SVGStaticStringList_h |
+#define SVGStaticStringList_h |
-#include "core/svg/SVGAnimatedNumber.h" |
-#include "core/svg/SVGNumberOptionalNumber.h" |
+#include "core/svg/SVGStringListTearOff.h" |
+#include "core/svg/properties/NewSVGAnimatedProperty.h" |
namespace WebCore { |
-// SVG Spec: http://www.w3.org/TR/SVG11/types.html <number-optional-number> |
-// Unlike other SVGAnimated* class, this class is not exposed to Javascript directly, |
-// while DOM attribute and SMIL animations operate on this class. |
-// From Javascript, the two SVGAnimatedNumbers |firstNumber| and |secondNumber| are used. |
-// For example, see SVGFEDropShadowElement::stdDeviation{X,Y}() |
-class SVGAnimatedNumberOptionalNumber : public NewSVGAnimatedPropertyCommon<SVGNumberOptionalNumber> { |
+class SVGElement; |
+ |
+// SVGStringList property implementations for SVGTests properties. |
+// Inherits SVGAnimatedPropertyBase to enable XML attribute synchronization, but this is never animated. |
+class SVGStaticStringList FINAL : public NewSVGAnimatedPropertyBase { |
public: |
- static PassRefPtr<SVGAnimatedNumberOptionalNumber> create(SVGElement* contextElement, const QualifiedName& attributeName, float initialFirstValue = 0, float initialSecondValue = 0) |
+ static PassRefPtr<SVGStaticStringList> create(SVGElement* contextElement, const QualifiedName& attributeName) |
{ |
- return adoptRef(new SVGAnimatedNumberOptionalNumber(contextElement, attributeName, initialFirstValue, initialSecondValue)); |
+ return adoptRef(new SVGStaticStringList(contextElement, attributeName)); |
} |
+ virtual ~SVGStaticStringList(); |
+ |
+ // NewSVGAnimatedPropertyBase: |
+ virtual NewSVGPropertyBase* currentValueBase() OVERRIDE; |
virtual void animationStarted() OVERRIDE; |
+ virtual PassRefPtr<NewSVGPropertyBase> createAnimatedValue() OVERRIDE; |
virtual void setAnimatedValue(PassRefPtr<NewSVGPropertyBase>) OVERRIDE; |
- virtual bool needsSynchronizeAttribute() OVERRIDE; |
virtual void animationEnded() OVERRIDE; |
virtual void animValWillChange() OVERRIDE; |
virtual void animValDidChange() OVERRIDE; |
+ virtual bool needsSynchronizeAttribute() OVERRIDE; |
+ |
+ void setBaseValueAsString(const String& value, SVGParsingError& parseError); |
- SVGAnimatedNumber* firstNumber() { return m_firstNumber.get(); } |
- SVGAnimatedNumber* secondNumber() { return m_secondNumber.get(); } |
+ SVGStringList* value() { return m_value.get(); } |
+ SVGStringListTearOff* tearOff() { return m_tearOff.get(); } |
-protected: |
- SVGAnimatedNumberOptionalNumber(SVGElement* contextElement, const QualifiedName& attributeName, float initialFirstValue, float initialSecondValue); |
+private: |
+ SVGStaticStringList(SVGElement*, const QualifiedName&); |
- RefPtr<SVGAnimatedNumber> m_firstNumber; |
- RefPtr<SVGAnimatedNumber> m_secondNumber; |
+ RefPtr<SVGStringList> m_value; |
+ RefPtr<SVGStringListTearOff> m_tearOff; |
}; |
-} // namespace WebCore |
+} |
-#endif // SVGAnimatedNumberOptionalNumber_h |
+#endif |