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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 void setTargetElement(SVGElement*) final; | 74 void setTargetElement(SVGElement*) final; |
75 void setAttributeName(const QualifiedName&) final; | 75 void setAttributeName(const QualifiedName&) final; |
76 | 76 |
77 FRIEND_TEST_ALL_PREFIXES(UnsafeSVGAttributeSanitizationTest, | 77 FRIEND_TEST_ALL_PREFIXES(UnsafeSVGAttributeSanitizationTest, |
78 stringsShouldNotSupportAddition); | 78 stringsShouldNotSupportAddition); |
79 | 79 |
80 private: | 80 private: |
81 void resetAnimatedPropertyType(); | 81 void resetAnimatedPropertyType(); |
82 | 82 |
| 83 enum ShouldApplyAnimationType { |
| 84 DontApplyAnimation, |
| 85 ApplyCSSAnimation, |
| 86 ApplyXMLAnimation, |
| 87 ApplyXMLandCSSAnimation |
| 88 }; |
| 89 |
| 90 ShouldApplyAnimationType shouldApplyAnimation( |
| 91 SVGElement* targetElement, |
| 92 const QualifiedName& attributeName); |
| 93 |
83 bool hasValidAttributeType() override; | 94 bool hasValidAttributeType() override; |
84 | 95 |
85 SVGPropertyBase* adjustForInheritance(SVGPropertyBase*, | 96 SVGPropertyBase* adjustForInheritance(SVGPropertyBase*, |
86 AnimatedPropertyValueType) const; | 97 AnimatedPropertyValueType) const; |
87 | 98 |
88 Member<SVGPropertyBase> m_fromProperty; | 99 Member<SVGPropertyBase> m_fromProperty; |
89 Member<SVGPropertyBase> m_toProperty; | 100 Member<SVGPropertyBase> m_toProperty; |
90 Member<SVGPropertyBase> m_toAtEndOfDurationProperty; | 101 Member<SVGPropertyBase> m_toAtEndOfDurationProperty; |
91 Member<SVGPropertyBase> m_animatedProperty; | 102 Member<SVGPropertyBase> m_animatedProperty; |
92 | 103 |
93 SVGAnimatedTypeAnimator m_animator; | 104 SVGAnimatedTypeAnimator m_animator; |
94 | 105 |
95 AnimatedPropertyValueType m_fromPropertyValueType; | 106 AnimatedPropertyValueType m_fromPropertyValueType; |
96 AnimatedPropertyValueType m_toPropertyValueType; | 107 AnimatedPropertyValueType m_toPropertyValueType; |
97 }; | 108 }; |
98 | 109 |
99 inline bool isSVGAnimateElement(const SVGElement& element) { | 110 inline bool isSVGAnimateElement(const SVGElement& element) { |
100 return element.hasTagName(SVGNames::animateTag) || | 111 return element.hasTagName(SVGNames::animateTag) || |
101 element.hasTagName(SVGNames::animateTransformTag) || | 112 element.hasTagName(SVGNames::animateTransformTag) || |
102 element.hasTagName(SVGNames::setTag); | 113 element.hasTagName(SVGNames::setTag); |
103 } | 114 } |
104 | 115 |
105 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGAnimateElement); | 116 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGAnimateElement); |
106 | 117 |
107 } // namespace blink | 118 } // namespace blink |
108 | 119 |
109 #endif // SVGAnimateElement_h | 120 #endif // SVGAnimateElement_h |
OLD | NEW |