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

Side by Side Diff: third_party/WebKit/Source/core/animation/animatable/AnimatableValueKeyframe.h

Issue 2359553003: Replaced PassRefPtr copies with moves. (Closed)
Patch Set: Created 4 years, 3 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
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/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/animation/Keyframe.h" 9 #include "core/animation/Keyframe.h"
10 #include "core/animation/animatable/AnimatableValue.h" 10 #include "core/animation/animatable/AnimatableValue.h"
11 #include "core/css/CSSPropertyIDTemplates.h" 11 #include "core/css/CSSPropertyIDTemplates.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class CORE_EXPORT AnimatableValueKeyframe : public Keyframe { 15 class CORE_EXPORT AnimatableValueKeyframe : public Keyframe {
16 public: 16 public:
17 static PassRefPtr<AnimatableValueKeyframe> create() 17 static PassRefPtr<AnimatableValueKeyframe> create()
18 { 18 {
19 return adoptRef(new AnimatableValueKeyframe); 19 return adoptRef(new AnimatableValueKeyframe);
20 } 20 }
21 void setPropertyValue(CSSPropertyID property, PassRefPtr<AnimatableValue> va lue) 21 void setPropertyValue(CSSPropertyID property, PassRefPtr<AnimatableValue> va lue)
22 { 22 {
23 m_propertyValues.set(property, value); 23 m_propertyValues.set(property, std::move(value));
24 } 24 }
25 void clearPropertyValue(CSSPropertyID property) { m_propertyValues.remove(pr operty); } 25 void clearPropertyValue(CSSPropertyID property) { m_propertyValues.remove(pr operty); }
26 AnimatableValue* propertyValue(CSSPropertyID property) const 26 AnimatableValue* propertyValue(CSSPropertyID property) const
27 { 27 {
28 DCHECK(m_propertyValues.contains(property)); 28 DCHECK(m_propertyValues.contains(property));
29 return m_propertyValues.get(property); 29 return m_propertyValues.get(property);
30 } 30 }
31 PropertyHandleSet properties() const override; 31 PropertyHandleSet properties() const override;
32 32
33 class PropertySpecificKeyframe : public Keyframe::PropertySpecificKeyframe { 33 class PropertySpecificKeyframe : public Keyframe::PropertySpecificKeyframe {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 }; 70 };
71 71
72 using AnimatableValuePropertySpecificKeyframe = AnimatableValueKeyframe::Propert ySpecificKeyframe; 72 using AnimatableValuePropertySpecificKeyframe = AnimatableValueKeyframe::Propert ySpecificKeyframe;
73 73
74 DEFINE_TYPE_CASTS(AnimatableValueKeyframe, Keyframe, value, value->isAnimatableV alueKeyframe(), value.isAnimatableValueKeyframe()); 74 DEFINE_TYPE_CASTS(AnimatableValueKeyframe, Keyframe, value, value->isAnimatableV alueKeyframe(), value.isAnimatableValueKeyframe());
75 DEFINE_TYPE_CASTS(AnimatableValuePropertySpecificKeyframe, Keyframe::PropertySpe cificKeyframe, value, value->isAnimatableValuePropertySpecificKeyframe(), value. isAnimatableValuePropertySpecificKeyframe()); 75 DEFINE_TYPE_CASTS(AnimatableValuePropertySpecificKeyframe, Keyframe::PropertySpe cificKeyframe, value, value->isAnimatableValuePropertySpecificKeyframe(), value. isAnimatableValuePropertySpecificKeyframe());
76 76
77 } // namespace blink 77 } // namespace blink
78 78
79 #endif 79 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698