| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 SVGParsingError setBaseValueAsString(const String& value) override { | 127 SVGParsingError setBaseValueAsString(const String& value) override { |
| 128 return m_baseValue->setValueAsString(value); | 128 return m_baseValue->setValueAsString(value); |
| 129 } | 129 } |
| 130 | 130 |
| 131 SVGPropertyBase* createAnimatedValue() override { | 131 SVGPropertyBase* createAnimatedValue() override { |
| 132 return m_baseValue->clone(); | 132 return m_baseValue->clone(); |
| 133 } | 133 } |
| 134 | 134 |
| 135 void setAnimatedValue(SVGPropertyBase* value) override { | 135 void setAnimatedValue(SVGPropertyBase* value) override { |
| 136 ASSERT(value->type() == Property::classType()); | 136 DCHECK_EQ(value->type(), Property::classType()); |
| 137 m_currentValue = static_cast<Property*>(value); | 137 m_currentValue = static_cast<Property*>(value); |
| 138 } | 138 } |
| 139 | 139 |
| 140 void animationEnded() override { | 140 void animationEnded() override { |
| 141 m_currentValue.clear(); | 141 m_currentValue.clear(); |
| 142 | 142 |
| 143 SVGAnimatedPropertyBase::animationEnded(); | 143 SVGAnimatedPropertyBase::animationEnded(); |
| 144 } | 144 } |
| 145 | 145 |
| 146 DEFINE_INLINE_VIRTUAL_TRACE() { | 146 DEFINE_INLINE_VIRTUAL_TRACE() { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 // SVGAnimated* DOM Spec implementations: | 188 // SVGAnimated* DOM Spec implementations: |
| 189 | 189 |
| 190 // baseVal()/setBaseVal()/animVal() are only to be used from SVG DOM | 190 // baseVal()/setBaseVal()/animVal() are only to be used from SVG DOM |
| 191 // implementation. Use currentValue() from C++ code. | 191 // implementation. Use currentValue() from C++ code. |
| 192 PrimitiveType baseVal() { return this->baseValue()->value(); } | 192 PrimitiveType baseVal() { return this->baseValue()->value(); } |
| 193 | 193 |
| 194 void setBaseVal(PrimitiveType value, ExceptionState&) { | 194 void setBaseVal(PrimitiveType value, ExceptionState&) { |
| 195 this->baseValue()->setValue(value); | 195 this->baseValue()->setValue(value); |
| 196 m_baseValueUpdated = true; | 196 m_baseValueUpdated = true; |
| 197 | 197 |
| 198 ASSERT(this->attributeName() != QualifiedName::null()); | 198 DCHECK(this->attributeName() != QualifiedName::null()); |
| 199 this->contextElement()->invalidateSVGAttributes(); | 199 this->contextElement()->invalidateSVGAttributes(); |
| 200 this->contextElement()->svgAttributeBaseValChanged(this->attributeName()); | 200 this->contextElement()->svgAttributeBaseValChanged(this->attributeName()); |
| 201 } | 201 } |
| 202 | 202 |
| 203 PrimitiveType animVal() { | 203 PrimitiveType animVal() { |
| 204 this->contextElement()->ensureAttributeAnimValUpdated(); | 204 this->contextElement()->ensureAttributeAnimValUpdated(); |
| 205 return this->currentValue()->value(); | 205 return this->currentValue()->value(); |
| 206 } | 206 } |
| 207 | 207 |
| 208 protected: | 208 protected: |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 CSSPropertyID cssPropertyId = CSSPropertyInvalid) | 335 CSSPropertyID cssPropertyId = CSSPropertyInvalid) |
| 336 : SVGAnimatedPropertyCommon<Property>(contextElement, | 336 : SVGAnimatedPropertyCommon<Property>(contextElement, |
| 337 attributeName, | 337 attributeName, |
| 338 initialValue, | 338 initialValue, |
| 339 cssPropertyId) {} | 339 cssPropertyId) {} |
| 340 }; | 340 }; |
| 341 | 341 |
| 342 } // namespace blink | 342 } // namespace blink |
| 343 | 343 |
| 344 #endif // SVGAnimatedProperty_h | 344 #endif // SVGAnimatedProperty_h |
| OLD | NEW |