OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 27 matching lines...) Expand all Loading... |
38 RegularPropertyValue, | 38 RegularPropertyValue, |
39 CurrentColorValue, | 39 CurrentColorValue, |
40 InheritValue | 40 InheritValue |
41 }; | 41 }; |
42 | 42 |
43 class SVGAnimateElement : public SVGAnimationElement { | 43 class SVGAnimateElement : public SVGAnimationElement { |
44 public: | 44 public: |
45 static PassRefPtr<SVGAnimateElement> create(const QualifiedName&, Document*)
; | 45 static PassRefPtr<SVGAnimateElement> create(const QualifiedName&, Document*)
; |
46 | 46 |
47 virtual ~SVGAnimateElement(); | 47 virtual ~SVGAnimateElement(); |
48 | 48 |
49 static void adjustForCurrentColor(SVGElement* targetElement, Color&); | 49 static void adjustForCurrentColor(SVGElement* targetElement, Color&); |
50 void adjustForInheritance(SVGElement* targetElement, const QualifiedName&, S
tring& value); | 50 void adjustForInheritance(SVGElement* targetElement, const QualifiedName&, S
tring& value); |
51 | 51 |
52 AnimatedPropertyType determineAnimatedPropertyType(SVGElement*) const; | 52 AnimatedPropertyType determineAnimatedPropertyType(SVGElement*) const; |
53 void determinePropertyValueTypes(const String&, const String&); | 53 void determinePropertyValueTypes(const String&, const String&); |
54 | 54 |
55 AnimatedPropertyValueType fromPropertyValueType() { return m_fromPropertyVal
ueType; } | 55 AnimatedPropertyValueType fromPropertyValueType() { return m_fromPropertyVal
ueType; } |
56 AnimatedPropertyValueType toPropertyValueType() { return m_toPropertyValueTy
pe; } | 56 AnimatedPropertyValueType toPropertyValueType() { return m_toPropertyValueTy
pe; } |
57 | 57 |
58 protected: | 58 protected: |
59 SVGAnimateElement(const QualifiedName&, Document*); | 59 SVGAnimateElement(const QualifiedName&, Document*); |
60 | 60 |
61 virtual void resetToBaseValue(const String&); | 61 virtual void resetToBaseValue(const String&); |
62 virtual bool calculateFromAndToValues(const String& fromString, const String
& toString); | 62 virtual bool calculateFromAndToValues(const String& fromString, const String
& toString); |
63 virtual bool calculateFromAndByValues(const String& fromString, const String
& byString); | 63 virtual bool calculateFromAndByValues(const String& fromString, const String
& byString); |
64 virtual void calculateAnimatedValue(float percentage, unsigned repeat, SVGSM
ILElement* resultElement); | 64 virtual void calculateAnimatedValue(float percentage, unsigned repeat, SVGSM
ILElement* resultElement); |
65 virtual void applyResultsToTarget(); | 65 virtual void applyResultsToTarget(); |
66 virtual float calculateDistance(const String& fromString, const String& toSt
ring); | 66 virtual float calculateDistance(const String& fromString, const String& toSt
ring); |
67 | 67 |
| 68 virtual void targetElementDidChange(SVGElement* targetElement) OVERRIDE; |
| 69 |
68 private: | 70 private: |
69 SVGAnimatedTypeAnimator* ensureAnimator(); | 71 SVGAnimatedTypeAnimator* ensureAnimator(); |
70 | 72 |
71 virtual bool hasValidAttributeType(); | 73 virtual bool hasValidAttributeType(); |
72 AnimatedPropertyType m_animatedPropertyType; | 74 AnimatedPropertyType m_animatedPropertyType; |
73 | 75 |
74 AnimatedPropertyValueType m_fromPropertyValueType; | 76 AnimatedPropertyValueType m_fromPropertyValueType; |
75 AnimatedPropertyValueType m_toPropertyValueType; | 77 AnimatedPropertyValueType m_toPropertyValueType; |
76 | 78 |
77 OwnPtr<SVGAnimatedType> m_fromType; | 79 OwnPtr<SVGAnimatedType> m_fromType; |
78 OwnPtr<SVGAnimatedType> m_toType; | 80 OwnPtr<SVGAnimatedType> m_toType; |
79 OwnPtr<SVGAnimatedType> m_animatedType; | 81 OwnPtr<SVGAnimatedType> m_animatedType; |
80 | 82 |
81 OwnPtr<SVGAnimatedTypeAnimator> m_animator; | 83 OwnPtr<SVGAnimatedTypeAnimator> m_animator; |
82 }; | 84 }; |
83 | 85 |
84 } // namespace WebCore | 86 } // namespace WebCore |
85 | 87 |
86 #endif // ENABLE(SVG) | 88 #endif // ENABLE(SVG) |
87 #endif // SVGAnimateElement_h | 89 #endif // SVGAnimateElement_h |
OLD | NEW |