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

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

Issue 2649103007: Make PropertyHandle instances const references where possible (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/core/animation/animatable/AnimatableValueKeyframe.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "core/animation/animatable/AnimatableValueKeyframe.h" 5 #include "core/animation/animatable/AnimatableValueKeyframe.h"
6 6
7 #include "core/animation/LegacyStyleInterpolation.h" 7 #include "core/animation/LegacyStyleInterpolation.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
(...skipping 15 matching lines...) Expand all
26 properties.add(PropertyHandle(*iter.keys())); 26 properties.add(PropertyHandle(*iter.keys()));
27 return properties; 27 return properties;
28 } 28 }
29 29
30 PassRefPtr<Keyframe> AnimatableValueKeyframe::clone() const { 30 PassRefPtr<Keyframe> AnimatableValueKeyframe::clone() const {
31 return adoptRef(new AnimatableValueKeyframe(*this)); 31 return adoptRef(new AnimatableValueKeyframe(*this));
32 } 32 }
33 33
34 PassRefPtr<Keyframe::PropertySpecificKeyframe> 34 PassRefPtr<Keyframe::PropertySpecificKeyframe>
35 AnimatableValueKeyframe::createPropertySpecificKeyframe( 35 AnimatableValueKeyframe::createPropertySpecificKeyframe(
36 PropertyHandle property) const { 36 const PropertyHandle& property) const {
37 return PropertySpecificKeyframe::create( 37 return PropertySpecificKeyframe::create(
38 offset(), &easing(), propertyValue(property.cssProperty()), composite()); 38 offset(), &easing(), propertyValue(property.cssProperty()), composite());
39 } 39 }
40 40
41 PassRefPtr<Keyframe::PropertySpecificKeyframe> 41 PassRefPtr<Keyframe::PropertySpecificKeyframe>
42 AnimatableValueKeyframe::PropertySpecificKeyframe::cloneWithOffset( 42 AnimatableValueKeyframe::PropertySpecificKeyframe::cloneWithOffset(
43 double offset) const { 43 double offset) const {
44 return create(offset, m_easing, m_value, m_composite); 44 return create(offset, m_easing, m_value, m_composite);
45 } 45 }
46 46
47 PassRefPtr<Interpolation> 47 PassRefPtr<Interpolation>
48 AnimatableValueKeyframe::PropertySpecificKeyframe::createInterpolation( 48 AnimatableValueKeyframe::PropertySpecificKeyframe::createInterpolation(
49 PropertyHandle property, 49 const PropertyHandle& property,
50 const Keyframe::PropertySpecificKeyframe& end) const { 50 const Keyframe::PropertySpecificKeyframe& end) const {
51 return LegacyStyleInterpolation::create( 51 return LegacyStyleInterpolation::create(
52 value(), toAnimatableValuePropertySpecificKeyframe(end).value(), 52 value(), toAnimatableValuePropertySpecificKeyframe(end).value(),
53 property.cssProperty()); 53 property.cssProperty());
54 } 54 }
55 55
56 PassRefPtr<Keyframe::PropertySpecificKeyframe> 56 PassRefPtr<Keyframe::PropertySpecificKeyframe>
57 AnimatableValueKeyframe::PropertySpecificKeyframe::neutralKeyframe( 57 AnimatableValueKeyframe::PropertySpecificKeyframe::neutralKeyframe(
58 double offset, 58 double offset,
59 PassRefPtr<TimingFunction> easing) const { 59 PassRefPtr<TimingFunction> easing) const {
60 return create(offset, std::move(easing), AnimatableValue::neutralValue(), 60 return create(offset, std::move(easing), AnimatableValue::neutralValue(),
61 EffectModel::CompositeAdd); 61 EffectModel::CompositeAdd);
62 } 62 }
63 63
64 } // namespace blink 64 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/animatable/AnimatableValueKeyframe.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698