Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: Source/core/animation/AnimatableValueKeyframe.h

Issue 222893005: Oilpan: Fix oilpan builds after r170720 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef AnimatableValueKeyframe_h 5 #ifndef AnimatableValueKeyframe_h
6 #define AnimatableValueKeyframe_h 6 #define AnimatableValueKeyframe_h
7 7
8 #include "core/animation/AnimatableValue.h" 8 #include "core/animation/AnimatableValue.h"
9 #include "core/animation/Keyframe.h" 9 #include "core/animation/Keyframe.h"
10 10
11 namespace WebCore { 11 namespace WebCore {
12 12
13 class AnimatableValueKeyframe : public Keyframe { 13 class AnimatableValueKeyframe : public Keyframe {
14 public: 14 public:
15 static PassRefPtr<AnimatableValueKeyframe> create() { return adoptRef(new An imatableValueKeyframe); } 15 static PassRefPtrWillBeRawPtr<AnimatableValueKeyframe> create()
16 void setPropertyValue(CSSPropertyID property, PassRefPtr<AnimatableValue> va lue) 16 {
17 return adoptRefWillBeNoop(new AnimatableValueKeyframe);
18 }
19 void setPropertyValue(CSSPropertyID property, PassRefPtrWillBeRawPtr<Animata bleValue> value)
17 { 20 {
18 m_propertyValues.add(property, value); 21 m_propertyValues.add(property, value);
19 } 22 }
20 void clearPropertyValue(CSSPropertyID property) { m_propertyValues.remove(pr operty); } 23 void clearPropertyValue(CSSPropertyID property) { m_propertyValues.remove(pr operty); }
21 AnimatableValue* propertyValue(CSSPropertyID property) const 24 AnimatableValue* propertyValue(CSSPropertyID property) const
22 { 25 {
23 ASSERT(m_propertyValues.contains(property)); 26 ASSERT(m_propertyValues.contains(property));
24 return m_propertyValues.get(property); 27 return m_propertyValues.get(property);
25 } 28 }
26 virtual PropertySet properties() const OVERRIDE; 29 virtual PropertySet properties() const OVERRIDE;
27 30
31 virtual void trace(Visitor*) OVERRIDE;
32
28 class PropertySpecificKeyframe : public Keyframe::PropertySpecificKeyframe { 33 class PropertySpecificKeyframe : public Keyframe::PropertySpecificKeyframe {
29 public: 34 public:
30 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin g, const AnimatableValue*, AnimationEffect::CompositeOperation); 35 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin g, const AnimatableValue*, AnimationEffect::CompositeOperation);
31 36
32 AnimatableValue* value() const { return m_value.get(); } 37 AnimatableValue* value() const { return m_value.get(); }
33 38
34 virtual PassOwnPtr<Keyframe::PropertySpecificKeyframe> neutralKeyframe(d ouble offset, PassRefPtr<TimingFunction> easing) const OVERRIDE FINAL; 39 virtual PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> neutr alKeyframe(double offset, PassRefPtr<TimingFunction> easing) const OVERRIDE FINA L;
35 virtual PassRefPtr<Interpolation> createInterpolation(CSSPropertyID, Web Core::Keyframe::PropertySpecificKeyframe* end) const OVERRIDE FINAL; 40 virtual PassRefPtrWillBeRawPtr<Interpolation> createInterpolation(CSSPro pertyID, WebCore::Keyframe::PropertySpecificKeyframe* end) const OVERRIDE FINAL;
41
42 virtual void trace(Visitor*) OVERRIDE;
36 43
37 private: 44 private:
38 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin g, PassRefPtr<AnimatableValue>); 45 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin g, PassRefPtrWillBeRawPtr<AnimatableValue>);
39 46
40 virtual PassOwnPtr<Keyframe::PropertySpecificKeyframe> cloneWithOffset(d ouble offset) const OVERRIDE; 47 virtual PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> clone WithOffset(double offset) const OVERRIDE;
41 virtual bool isAnimatableValuePropertySpecificKeyframe() const OVERRIDE { return true; } 48 virtual bool isAnimatableValuePropertySpecificKeyframe() const OVERRIDE { return true; }
42 49
43 RefPtr<AnimatableValue> m_value; 50 RefPtrWillBeMember<AnimatableValue> m_value;
44 }; 51 };
45 52
46 private: 53 private:
47 AnimatableValueKeyframe() 54 AnimatableValueKeyframe() { }
48 { }
49 55
50 AnimatableValueKeyframe(const AnimatableValueKeyframe& copyFrom); 56 AnimatableValueKeyframe(const AnimatableValueKeyframe& copyFrom);
51 57
52 virtual PassRefPtrWillBeRawPtr<Keyframe> clone() const OVERRIDE; 58 virtual PassRefPtrWillBeRawPtr<Keyframe> clone() const OVERRIDE;
53 virtual PassOwnPtr<Keyframe::PropertySpecificKeyframe> createPropertySpecifi cKeyframe(CSSPropertyID) const OVERRIDE; 59 virtual PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> createPro pertySpecificKeyframe(CSSPropertyID) const OVERRIDE;
54 60
55 virtual bool isAnimatableValueKeyframe() const OVERRIDE { return true; } 61 virtual bool isAnimatableValueKeyframe() const OVERRIDE { return true; }
56 62
57 typedef HashMap<CSSPropertyID, RefPtr<AnimatableValue> > PropertyValueMap; 63 typedef HashMap<CSSPropertyID, RefPtrWillBeMember<AnimatableValue> > Propert yValueMap;
58 PropertyValueMap m_propertyValues; 64 PropertyValueMap m_propertyValues;
59 }; 65 };
60 66
61 typedef AnimatableValueKeyframe::PropertySpecificKeyframe AnimatableValuePropert ySpecificKeyframe; 67 typedef AnimatableValueKeyframe::PropertySpecificKeyframe AnimatableValuePropert ySpecificKeyframe;
62 68
63 DEFINE_TYPE_CASTS(AnimatableValueKeyframe, Keyframe, value, value->isAnimatableV alueKeyframe(), value.isAnimatableValueKeyframe()); 69 DEFINE_TYPE_CASTS(AnimatableValueKeyframe, Keyframe, value, value->isAnimatableV alueKeyframe(), value.isAnimatableValueKeyframe());
64 DEFINE_TYPE_CASTS(AnimatableValuePropertySpecificKeyframe, PropertySpecificKeyfr ame, value, value->isAnimatableValuePropertySpecificKeyframe(), value.isAnimatab leValuePropertySpecificKeyframe()); 70 DEFINE_TYPE_CASTS(AnimatableValuePropertySpecificKeyframe, Keyframe::PropertySpe cificKeyframe, value, value->isAnimatableValuePropertySpecificKeyframe(), value. isAnimatableValuePropertySpecificKeyframe());
65 71
66 } 72 }
67 73
68 #endif 74 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/AnimatableValueKeyframe.cpp » ('j') | Source/core/animation/KeyframeEffectModel.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698