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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 } | 211 } |
212 | 212 |
213 void setBaseVal(PrimitiveType value, WebCore::ExceptionState& exceptionState
) | 213 void setBaseVal(PrimitiveType value, WebCore::ExceptionState& exceptionState
) |
214 { | 214 { |
215 if (this->isReadOnly()) { | 215 if (this->isReadOnly()) { |
216 exceptionState.throwDOMException(NoModificationAllowedError, "The at
tribute is read-only."); | 216 exceptionState.throwDOMException(NoModificationAllowedError, "The at
tribute is read-only."); |
217 return; | 217 return; |
218 } | 218 } |
219 | 219 |
220 this->baseValue()->setValue(value); | 220 this->baseValue()->setValue(value); |
| 221 m_baseValueUpdated = true; |
221 | 222 |
222 ASSERT(this->attributeName() != nullQName()); | 223 ASSERT(this->attributeName() != nullQName()); |
223 this->contextElement()->invalidateSVGAttributes(); | 224 this->contextElement()->invalidateSVGAttributes(); |
224 this->contextElement()->svgAttributeChanged(this->attributeName()); | 225 this->contextElement()->svgAttributeChanged(this->attributeName()); |
225 | |
226 m_baseValueUpdated = true; | |
227 } | 226 } |
228 | 227 |
229 PrimitiveType animVal() | 228 PrimitiveType animVal() |
230 { | 229 { |
231 return this->currentValue()->value(); | 230 return this->currentValue()->value(); |
232 } | 231 } |
233 | 232 |
234 protected: | 233 protected: |
235 NewSVGAnimatedProperty(SVGElement* contextElement, const QualifiedName& attr
ibuteName, PassRefPtr<Property> initialValue) | 234 NewSVGAnimatedProperty(SVGElement* contextElement, const QualifiedName& attr
ibuteName, PassRefPtr<Property> initialValue) |
236 : NewSVGAnimatedPropertyCommon<Property>(contextElement, attributeName,
initialValue) | 235 : NewSVGAnimatedPropertyCommon<Property>(contextElement, attributeName,
initialValue) |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 // When animated: | 312 // When animated: |
314 // m_animValTearOff targets m_currentValue. | 313 // m_animValTearOff targets m_currentValue. |
315 // m_baseValTearOff targets m_baseValue. | 314 // m_baseValTearOff targets m_baseValue. |
316 RefPtr<TearOffType> m_baseValTearOff; | 315 RefPtr<TearOffType> m_baseValTearOff; |
317 RefPtr<TearOffType> m_animValTearOff; | 316 RefPtr<TearOffType> m_animValTearOff; |
318 }; | 317 }; |
319 | 318 |
320 } | 319 } |
321 | 320 |
322 #endif // NewSVGAnimatedProperty_h | 321 #endif // NewSVGAnimatedProperty_h |
OLD | NEW |