OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 G* * Redistributions in binary form must reproduce the above | 10 G* * Redistributions in binary form must reproduce the above |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 virtual ~SVGAnimatedPropertyBase(); | 53 virtual ~SVGAnimatedPropertyBase(); |
54 | 54 |
55 virtual SVGPropertyBase* currentValueBase() = 0; | 55 virtual SVGPropertyBase* currentValueBase() = 0; |
56 virtual const SVGPropertyBase& baseValueBase() const = 0; | 56 virtual const SVGPropertyBase& baseValueBase() const = 0; |
57 virtual bool isAnimating() const = 0; | 57 virtual bool isAnimating() const = 0; |
58 | 58 |
59 virtual PassRefPtrWillBeRawPtr<SVGPropertyBase> createAnimatedValue() = 0; | 59 virtual PassRefPtrWillBeRawPtr<SVGPropertyBase> createAnimatedValue() = 0; |
60 virtual void setAnimatedValue(PassRefPtrWillBeRawPtr<SVGPropertyBase>) = 0; | 60 virtual void setAnimatedValue(PassRefPtrWillBeRawPtr<SVGPropertyBase>) = 0; |
61 virtual void animationEnded(); | 61 virtual void animationEnded(); |
62 | 62 |
63 virtual void setBaseValueAsString(const String& value, SVGParsingError& pars
eError) = 0; | 63 virtual SVGParsingError setBaseValueAsString(const String&) = 0; |
64 virtual bool needsSynchronizeAttribute() = 0; | 64 virtual bool needsSynchronizeAttribute() = 0; |
65 virtual void synchronizeAttribute(); | 65 virtual void synchronizeAttribute(); |
66 | 66 |
67 AnimatedPropertyType type() const | 67 AnimatedPropertyType type() const |
68 { | 68 { |
69 return m_type; | 69 return m_type; |
70 } | 70 } |
71 | 71 |
72 SVGElement* contextElement() const | 72 SVGElement* contextElement() const |
73 { | 73 { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 const SVGPropertyBase& baseValueBase() const override | 136 const SVGPropertyBase& baseValueBase() const override |
137 { | 137 { |
138 return *m_baseValue; | 138 return *m_baseValue; |
139 } | 139 } |
140 | 140 |
141 bool isAnimating() const override | 141 bool isAnimating() const override |
142 { | 142 { |
143 return m_currentValue; | 143 return m_currentValue; |
144 } | 144 } |
145 | 145 |
146 void setBaseValueAsString(const String& value, SVGParsingError& parseError)
override | 146 SVGParsingError setBaseValueAsString(const String& value) override |
147 { | 147 { |
148 TrackExceptionState es; | 148 return m_baseValue->setValueAsString(value); |
149 | |
150 m_baseValue->setValueAsString(value, es); | |
151 | |
152 if (es.hadException()) | |
153 parseError = ParsingAttributeFailedError; | |
154 } | 149 } |
155 | 150 |
156 PassRefPtrWillBeRawPtr<SVGPropertyBase> createAnimatedValue() override | 151 PassRefPtrWillBeRawPtr<SVGPropertyBase> createAnimatedValue() override |
157 { | 152 { |
158 return m_baseValue->clone(); | 153 return m_baseValue->clone(); |
159 } | 154 } |
160 | 155 |
161 void setAnimatedValue(PassRefPtrWillBeRawPtr<SVGPropertyBase> passValue) ove
rride | 156 void setAnimatedValue(PassRefPtrWillBeRawPtr<SVGPropertyBase> passValue) ove
rride |
162 { | 157 { |
163 RefPtrWillBeRawPtr<SVGPropertyBase> value = passValue; | 158 RefPtrWillBeRawPtr<SVGPropertyBase> value = passValue; |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 protected: | 348 protected: |
354 SVGAnimatedProperty(SVGElement* contextElement, const QualifiedName& attribu
teName, PassRefPtrWillBeRawPtr<Property> initialValue) | 349 SVGAnimatedProperty(SVGElement* contextElement, const QualifiedName& attribu
teName, PassRefPtrWillBeRawPtr<Property> initialValue) |
355 : SVGAnimatedPropertyCommon<Property>(contextElement, attributeName, ini
tialValue) | 350 : SVGAnimatedPropertyCommon<Property>(contextElement, attributeName, ini
tialValue) |
356 { | 351 { |
357 } | 352 } |
358 }; | 353 }; |
359 | 354 |
360 } // namespace blink | 355 } // namespace blink |
361 | 356 |
362 #endif // SVGAnimatedProperty_h | 357 #endif // SVGAnimatedProperty_h |
OLD | NEW |