| 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 11 matching lines...) Expand all Loading... |
| 22 * Boston, MA 02110-1301, USA. | 22 * Boston, MA 02110-1301, USA. |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #ifndef SVGAnimationElement_h | 25 #ifndef SVGAnimationElement_h |
| 26 #define SVGAnimationElement_h | 26 #define SVGAnimationElement_h |
| 27 | 27 |
| 28 #include "core/svg/SVGAnimatedBoolean.h" | 28 #include "core/svg/SVGAnimatedBoolean.h" |
| 29 #include "core/svg/animation/SVGSMILElement.h" | 29 #include "core/svg/animation/SVGSMILElement.h" |
| 30 #include "platform/animation/UnitBezier.h" | 30 #include "platform/animation/UnitBezier.h" |
| 31 #include "wtf/Functional.h" | 31 #include "wtf/Functional.h" |
| 32 #include "wtf/Vector.h" |
| 32 | 33 |
| 33 namespace blink { | 34 namespace blink { |
| 34 | 35 |
| 35 class ExceptionState; | 36 class ExceptionState; |
| 36 | 37 |
| 37 enum AnimationMode { | 38 enum AnimationMode { |
| 38 NoAnimation, | 39 NoAnimation, |
| 39 FromToAnimation, | 40 FromToAnimation, |
| 40 FromByAnimation, | 41 FromByAnimation, |
| 41 ToAnimation, | 42 ToAnimation, |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 162 |
| 162 virtual void setTargetElement(SVGElement*) override; | 163 virtual void setTargetElement(SVGElement*) override; |
| 163 virtual void setAttributeName(const QualifiedName&) override; | 164 virtual void setAttributeName(const QualifiedName&) override; |
| 164 | 165 |
| 165 bool hasInvalidCSSAttributeType() const { return m_hasInvalidCSSAttributeTyp
e; } | 166 bool hasInvalidCSSAttributeType() const { return m_hasInvalidCSSAttributeTyp
e; } |
| 166 | 167 |
| 167 virtual void updateAnimationMode(); | 168 virtual void updateAnimationMode(); |
| 168 void setAnimationMode(AnimationMode animationMode) { m_animationMode = anima
tionMode; } | 169 void setAnimationMode(AnimationMode animationMode) { m_animationMode = anima
tionMode; } |
| 169 void setCalcMode(CalcMode calcMode) { m_calcMode = calcMode; } | 170 void setCalcMode(CalcMode calcMode) { m_calcMode = calcMode; } |
| 170 | 171 |
| 172 // Parses a list of values as specified by SVG, stripping leading |
| 173 // and trailing whitespace, and places them in result. If the |
| 174 // format of the string is not valid, parseValues empties result |
| 175 // and returns false. See |
| 176 // http://www.w3.org/TR/SVG/animate.html#ValuesAttribute . |
| 177 static bool parseValues(const String&, Vector<String>& result); |
| 178 |
| 171 private: | 179 private: |
| 172 virtual bool isValid() const override final { return SVGTests::isValid(docum
ent()); } | 180 virtual bool isValid() const override final { return SVGTests::isValid(docum
ent()); } |
| 173 | 181 |
| 174 virtual void animationAttributeChanged() override; | 182 virtual void animationAttributeChanged() override; |
| 175 void setAttributeType(const AtomicString&); | 183 void setAttributeType(const AtomicString&); |
| 176 | 184 |
| 177 void checkInvalidCSSAttributeType(); | 185 void checkInvalidCSSAttributeType(); |
| 178 | 186 |
| 179 virtual bool calculateToAtEndOfDurationValue(const String& toAtEndOfDuration
String) = 0; | 187 virtual bool calculateToAtEndOfDurationValue(const String& toAtEndOfDuration
String) = 0; |
| 180 virtual bool calculateFromAndToValues(const String& fromString, const String
& toString) = 0; | 188 virtual bool calculateFromAndToValues(const String& fromString, const String
& toString) = 0; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 207 String m_lastValuesAnimationFrom; | 215 String m_lastValuesAnimationFrom; |
| 208 String m_lastValuesAnimationTo; | 216 String m_lastValuesAnimationTo; |
| 209 bool m_hasInvalidCSSAttributeType; | 217 bool m_hasInvalidCSSAttributeType; |
| 210 CalcMode m_calcMode; | 218 CalcMode m_calcMode; |
| 211 AnimationMode m_animationMode; | 219 AnimationMode m_animationMode; |
| 212 }; | 220 }; |
| 213 | 221 |
| 214 } // namespace blink | 222 } // namespace blink |
| 215 | 223 |
| 216 #endif // SVGAnimationElement_h | 224 #endif // SVGAnimationElement_h |
| OLD | NEW |