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* currentValueBase() 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* currentValueBase() const override |
| 137 { |
| 138 return currentValue(); |
| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 // When animated: | 328 // When animated: |
323 // m_animValTearOff targets m_currentValue. | 329 // m_animValTearOff targets m_currentValue. |
324 // m_baseValTearOff targets m_baseValue. | 330 // m_baseValTearOff targets m_baseValue. |
325 RefPtrWillBeMember<TearOffType> m_baseValTearOff; | 331 RefPtrWillBeMember<TearOffType> m_baseValTearOff; |
326 RefPtrWillBeMember<TearOffType> m_animValTearOff; | 332 RefPtrWillBeMember<TearOffType> m_animValTearOff; |
327 }; | 333 }; |
328 | 334 |
329 } // namespace blink | 335 } // namespace blink |
330 | 336 |
331 #endif // SVGAnimatedProperty_h | 337 #endif // SVGAnimatedProperty_h |
OLD | NEW |