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 26 matching lines...) Expand all Loading... | |
37 #include "core/svg/SVGParsingError.h" | 37 #include "core/svg/SVGParsingError.h" |
38 #include "core/svg/properties/NewSVGPropertyTearOff.h" | 38 #include "core/svg/properties/NewSVGPropertyTearOff.h" |
39 #include "core/svg/properties/SVGPropertyInfo.h" | 39 #include "core/svg/properties/SVGPropertyInfo.h" |
40 #include "wtf/Noncopyable.h" | 40 #include "wtf/Noncopyable.h" |
41 #include "wtf/PassRefPtr.h" | 41 #include "wtf/PassRefPtr.h" |
42 #include "wtf/RefCounted.h" | 42 #include "wtf/RefCounted.h" |
43 | 43 |
44 namespace WebCore { | 44 namespace WebCore { |
45 | 45 |
46 class SVGElement; | 46 class SVGElement; |
47 class SVGAnimationElement; | |
47 | 48 |
48 class NewSVGAnimatedPropertyBase : public RefCounted<NewSVGAnimatedPropertyBase> { | 49 class NewSVGAnimatedPropertyBase : public RefCounted<NewSVGAnimatedPropertyBase> { |
49 public: | 50 public: |
50 virtual ~NewSVGAnimatedPropertyBase(); | 51 virtual ~NewSVGAnimatedPropertyBase(); |
51 | 52 |
52 virtual NewSVGPropertyBase* currentValueBase() = 0; | 53 virtual NewSVGPropertyBase* currentValueBase() = 0; |
53 | 54 |
54 virtual void animationStarted(); | 55 virtual void animationStarted(); |
55 virtual PassRefPtr<NewSVGPropertyBase> createAnimatedValue() = 0; | 56 virtual PassRefPtr<NewSVGPropertyBase> createAnimatedValue(SVGAnimationEleme nt*) = 0; |
kouhei (in TOK)
2014/02/10 12:37:21
I will revert this interface change. This approach
kouhei (in TOK)
2014/02/12 01:57:49
Done.
| |
56 virtual void setAnimatedValue(PassRefPtr<NewSVGPropertyBase>) = 0; | 57 virtual void setAnimatedValue(PassRefPtr<NewSVGPropertyBase>) = 0; |
57 virtual void animationEnded(); | 58 virtual void animationEnded(); |
58 virtual void animValWillChange(); | 59 virtual void animValWillChange(); |
59 virtual void animValDidChange(); | 60 virtual void animValDidChange(); |
60 | 61 |
61 virtual bool needsSynchronizeAttribute() = 0; | 62 virtual bool needsSynchronizeAttribute() = 0; |
62 virtual void synchronizeAttribute(); | 63 virtual void synchronizeAttribute(); |
63 | 64 |
64 AnimatedPropertyType type() const | 65 AnimatedPropertyType type() const |
65 { | 66 { |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
136 void setBaseValueAsString(const String& value, SVGParsingError& parseError) | 137 void setBaseValueAsString(const String& value, SVGParsingError& parseError) |
137 { | 138 { |
138 TrackExceptionState es; | 139 TrackExceptionState es; |
139 | 140 |
140 m_baseValue->setValueAsString(value, es); | 141 m_baseValue->setValueAsString(value, es); |
141 | 142 |
142 if (es.hadException()) | 143 if (es.hadException()) |
143 parseError = ParsingAttributeFailedError; | 144 parseError = ParsingAttributeFailedError; |
144 } | 145 } |
145 | 146 |
146 virtual PassRefPtr<NewSVGPropertyBase> createAnimatedValue() OVERRIDE | 147 virtual PassRefPtr<NewSVGPropertyBase> createAnimatedValue(SVGAnimationEleme nt*) OVERRIDE |
147 { | 148 { |
148 return m_baseValue->clone(); | 149 return m_baseValue->clone(); |
149 } | 150 } |
150 | 151 |
151 virtual void setAnimatedValue(PassRefPtr<NewSVGPropertyBase> passValue) OVER RIDE | 152 virtual void setAnimatedValue(PassRefPtr<NewSVGPropertyBase> passValue) OVER RIDE |
152 { | 153 { |
153 ASSERT(isAnimating()); | 154 ASSERT(isAnimating()); |
154 | 155 |
155 RefPtr<NewSVGPropertyBase> value = passValue; | 156 RefPtr<NewSVGPropertyBase> value = passValue; |
156 ASSERT(value->type() == Property::classType()); | 157 ASSERT(value->type() == Property::classType()); |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
312 // When animated: | 313 // When animated: |
313 // m_animValTearOff targets m_currentValue. | 314 // m_animValTearOff targets m_currentValue. |
314 // m_baseValTearOff targets m_baseValue. | 315 // m_baseValTearOff targets m_baseValue. |
315 RefPtr<TearOffType> m_baseValTearOff; | 316 RefPtr<TearOffType> m_baseValTearOff; |
316 RefPtr<TearOffType> m_animValTearOff; | 317 RefPtr<TearOffType> m_animValTearOff; |
317 }; | 318 }; |
318 | 319 |
319 } | 320 } |
320 | 321 |
321 #endif // NewSVGAnimatedProperty_h | 322 #endif // NewSVGAnimatedProperty_h |
OLD | NEW |