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, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
5 * Copyright (C) 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2008 Apple Inc. All rights reserved. |
6 * Copyright (C) 2008 Cameron McCormack <cam@mcc.id.au> | 6 * Copyright (C) 2008 Cameron McCormack <cam@mcc.id.au> |
7 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 176 |
177 bool isSupportedAttribute(const QualifiedName&); | 177 bool isSupportedAttribute(const QualifiedName&); |
178 virtual void parseAttribute(const Attribute&) OVERRIDE; | 178 virtual void parseAttribute(const Attribute&) OVERRIDE; |
179 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; | 179 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; |
180 | 180 |
181 enum AttributeType { | 181 enum AttributeType { |
182 AttributeTypeCSS, | 182 AttributeTypeCSS, |
183 AttributeTypeXML, | 183 AttributeTypeXML, |
184 AttributeTypeAuto | 184 AttributeTypeAuto |
185 }; | 185 }; |
186 AttributeType attributeType() const { return m_attributeType; } | 186 AttributeType attributeType() const; |
187 | 187 |
188 String toValue() const; | 188 String toValue() const; |
189 String byValue() const; | 189 String byValue() const; |
190 String fromValue() const; | 190 String fromValue() const; |
191 | 191 |
192 String targetAttributeBaseValue(); | 192 String targetAttributeBaseValue(); |
193 | 193 |
194 // from SVGSMILElement | 194 // from SVGSMILElement |
195 virtual void startedActiveInterval() OVERRIDE; | 195 virtual void startedActiveInterval() OVERRIDE; |
196 virtual void updateAnimation(float percent, unsigned repeat, SVGSMILElement*
resultElement) OVERRIDE; | 196 virtual void updateAnimation(float percent, unsigned repeat, SVGSMILElement*
resultElement) OVERRIDE; |
197 | 197 |
198 AnimatedPropertyValueType m_fromPropertyValueType; | 198 AnimatedPropertyValueType m_fromPropertyValueType; |
199 AnimatedPropertyValueType m_toPropertyValueType; | 199 AnimatedPropertyValueType m_toPropertyValueType; |
200 | 200 |
201 virtual void targetElementWillChange(SVGElement* currentTarget, SVGElement*
oldTarget) OVERRIDE; | |
202 bool hasInvalidCSSAttributeType() const { return m_hasInvalidCSSAttributeTyp
e; } | |
203 | |
204 private: | 201 private: |
205 virtual void animationAttributeChanged() OVERRIDE; | 202 virtual void animationAttributeChanged() OVERRIDE; |
206 virtual void setAttributeName(const QualifiedName&) OVERRIDE; | |
207 void setAttributeType(const AtomicString&); | |
208 | |
209 void checkInvalidCSSAttributeType(SVGElement*); | |
210 | 203 |
211 virtual bool calculateToAtEndOfDurationValue(const String& toAtEndOfDuration
String) = 0; | 204 virtual bool calculateToAtEndOfDurationValue(const String& toAtEndOfDuration
String) = 0; |
212 virtual bool calculateFromAndToValues(const String& fromString, const String
& toString) = 0; | 205 virtual bool calculateFromAndToValues(const String& fromString, const String
& toString) = 0; |
213 virtual bool calculateFromAndByValues(const String& fromString, const String
& byString) = 0; | 206 virtual bool calculateFromAndByValues(const String& fromString, const String
& byString) = 0; |
214 virtual void calculateAnimatedValue(float percent, unsigned repeatCount, SVG
SMILElement* resultElement) = 0; | 207 virtual void calculateAnimatedValue(float percent, unsigned repeatCount, SVG
SMILElement* resultElement) = 0; |
215 virtual float calculateDistance(const String& /*fromString*/, const String&
/*toString*/) { return -1.f; } | 208 virtual float calculateDistance(const String& /*fromString*/, const String&
/*toString*/) { return -1.f; } |
216 virtual Path animationPath() const { return Path(); } | 209 virtual Path animationPath() const { return Path(); } |
217 | 210 |
218 void currentValuesForValuesAnimation(float percent, float& effectivePercent,
String& from, String& to); | 211 void currentValuesForValuesAnimation(float percent, float& effectivePercent,
String& from, String& to); |
219 void calculateKeyTimesForCalcModePaced(); | 212 void calculateKeyTimesForCalcModePaced(); |
(...skipping 10 matching lines...) Expand all Loading... |
230 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesReq
uired) | 223 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesReq
uired) |
231 END_DECLARE_ANIMATED_PROPERTIES | 224 END_DECLARE_ANIMATED_PROPERTIES |
232 | 225 |
233 // SVGTests | 226 // SVGTests |
234 virtual void synchronizeRequiredFeatures() { SVGTests::synchronizeRequiredFe
atures(this); } | 227 virtual void synchronizeRequiredFeatures() { SVGTests::synchronizeRequiredFe
atures(this); } |
235 virtual void synchronizeRequiredExtensions() { SVGTests::synchronizeRequired
Extensions(this); } | 228 virtual void synchronizeRequiredExtensions() { SVGTests::synchronizeRequired
Extensions(this); } |
236 virtual void synchronizeSystemLanguage() { SVGTests::synchronizeSystemLangua
ge(this); } | 229 virtual void synchronizeSystemLanguage() { SVGTests::synchronizeSystemLangua
ge(this); } |
237 | 230 |
238 bool m_animationValid; | 231 bool m_animationValid; |
239 | 232 |
240 AttributeType m_attributeType; | |
241 Vector<String> m_values; | 233 Vector<String> m_values; |
242 Vector<float> m_keyTimes; | 234 Vector<float> m_keyTimes; |
243 Vector<float> m_keyPoints; | 235 Vector<float> m_keyPoints; |
244 Vector<UnitBezier> m_keySplines; | 236 Vector<UnitBezier> m_keySplines; |
245 String m_lastValuesAnimationFrom; | 237 String m_lastValuesAnimationFrom; |
246 String m_lastValuesAnimationTo; | 238 String m_lastValuesAnimationTo; |
247 bool m_hasInvalidCSSAttributeType; | |
248 }; | 239 }; |
249 | 240 |
250 } // namespace WebCore | 241 } // namespace WebCore |
251 | 242 |
252 #endif // ENABLE(SVG) | 243 #endif // ENABLE(SVG) |
253 #endif // SVGAnimationElement_h | 244 #endif // SVGAnimationElement_h |
OLD | NEW |