| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 class SVGElement; | 47 class SVGElement; |
| 48 | 48 |
| 49 class SVGAnimatedPropertyBase : public RefCountedWillBeGarbageCollectedFinalized
<SVGAnimatedPropertyBase>, public ScriptWrappable { | 49 class SVGAnimatedPropertyBase : public RefCountedWillBeGarbageCollectedFinalized
<SVGAnimatedPropertyBase>, public ScriptWrappable { |
| 50 DEFINE_WRAPPERTYPEINFO_NOT_REACHED(); | 50 DEFINE_WRAPPERTYPEINFO_NOT_REACHED(); |
| 51 WTF_MAKE_NONCOPYABLE(SVGAnimatedPropertyBase); | 51 WTF_MAKE_NONCOPYABLE(SVGAnimatedPropertyBase); |
| 52 public: | 52 public: |
| 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 bool isAnimating() const = 0; | 57 virtual bool isAnimating() const = 0; |
| 57 | 58 |
| 58 virtual PassRefPtrWillBeRawPtr<SVGPropertyBase> createAnimatedValue() = 0; | 59 virtual PassRefPtrWillBeRawPtr<SVGPropertyBase> createAnimatedValue() = 0; |
| 59 virtual void setAnimatedValue(PassRefPtrWillBeRawPtr<SVGPropertyBase>) = 0; | 60 virtual void setAnimatedValue(PassRefPtrWillBeRawPtr<SVGPropertyBase>) = 0; |
| 60 virtual void animationEnded(); | 61 virtual void animationEnded(); |
| 61 | 62 |
| 62 virtual void setBaseValueAsString(const String& value, SVGParsingError& pars
eError) = 0; | 63 virtual void setBaseValueAsString(const String& value, SVGParsingError& pars
eError) = 0; |
| 63 virtual bool needsSynchronizeAttribute() = 0; | 64 virtual bool needsSynchronizeAttribute() = 0; |
| 64 virtual void synchronizeAttribute(); | 65 virtual void synchronizeAttribute(); |
| 65 | 66 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 const Property* currentValue() const | 126 const Property* currentValue() const |
| 126 { | 127 { |
| 127 return const_cast<SVGAnimatedPropertyCommon*>(this)->currentValue(); | 128 return const_cast<SVGAnimatedPropertyCommon*>(this)->currentValue(); |
| 128 } | 129 } |
| 129 | 130 |
| 130 SVGPropertyBase* currentValueBase() override | 131 SVGPropertyBase* currentValueBase() override |
| 131 { | 132 { |
| 132 return currentValue(); | 133 return currentValue(); |
| 133 } | 134 } |
| 134 | 135 |
| 136 const SVGPropertyBase& baseValueBase() const override |
| 137 { |
| 138 return *m_baseValue; |
| 139 } |
| 140 |
| 135 bool isAnimating() const override | 141 bool isAnimating() const override |
| 136 { | 142 { |
| 137 return m_currentValue; | 143 return m_currentValue; |
| 138 } | 144 } |
| 139 | 145 |
| 140 void setBaseValueAsString(const String& value, SVGParsingError& parseError)
override | 146 void setBaseValueAsString(const String& value, SVGParsingError& parseError)
override |
| 141 { | 147 { |
| 142 TrackExceptionState es; | 148 TrackExceptionState es; |
| 143 | 149 |
| 144 m_baseValue->setValueAsString(value, es); | 150 m_baseValue->setValueAsString(value, es); |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 protected: | 352 protected: |
| 347 SVGAnimatedProperty(SVGElement* contextElement, const QualifiedName& attribu
teName, PassRefPtrWillBeRawPtr<Property> initialValue) | 353 SVGAnimatedProperty(SVGElement* contextElement, const QualifiedName& attribu
teName, PassRefPtrWillBeRawPtr<Property> initialValue) |
| 348 : SVGAnimatedPropertyCommon<Property>(contextElement, attributeName, ini
tialValue) | 354 : SVGAnimatedPropertyCommon<Property>(contextElement, attributeName, ini
tialValue) |
| 349 { | 355 { |
| 350 } | 356 } |
| 351 }; | 357 }; |
| 352 | 358 |
| 353 } // namespace blink | 359 } // namespace blink |
| 354 | 360 |
| 355 #endif // SVGAnimatedProperty_h | 361 #endif // SVGAnimatedProperty_h |
| OLD | NEW |