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

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

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (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
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
11 AnimatableValueKeyframe::AnimatableValueKeyframe( 11 AnimatableValueKeyframe::AnimatableValueKeyframe(
12 const AnimatableValueKeyframe& copyFrom) 12 const AnimatableValueKeyframe& copyFrom)
13 : Keyframe(copyFrom.m_offset, copyFrom.m_composite, copyFrom.m_easing) { 13 : Keyframe(copyFrom.m_offset, copyFrom.m_composite, copyFrom.m_easing) {
14 for (PropertyValueMap::const_iterator iter = 14 for (PropertyValueMap::const_iterator iter =
15 copyFrom.m_propertyValues.begin(); 15 copyFrom.m_propertyValues.begin();
16 iter != copyFrom.m_propertyValues.end(); ++iter) 16 iter != copyFrom.m_propertyValues.end(); ++iter)
17 setPropertyValue(iter->key, iter->value.get()); 17 setPropertyValue(iter->key, iter->value.get());
18 } 18 }
19 19
20 PropertyHandleSet AnimatableValueKeyframe::properties() const { 20 PropertyHandleSet AnimatableValueKeyframe::properties() const {
21 // This is not used in time-critical code, so we probably don't need to 21 // This is not used in time-critical code, so we probably don't need to
22 // worry about caching this result. 22 // worry about caching this result.
23 PropertyHandleSet properties; 23 PropertyHandleSet properties;
24 for (PropertyValueMap::const_iterator iter = m_propertyValues.begin(); 24 for (PropertyValueMap::const_iterator iter = m_propertyValues.begin();
25 iter != m_propertyValues.end(); ++iter) 25 iter != m_propertyValues.end(); ++iter)
26 properties.add(PropertyHandle(*iter.keys())); 26 properties.insert(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 const PropertyHandle& property) const { 36 const PropertyHandle& property) const {
(...skipping 18 matching lines...) Expand all
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

Powered by Google App Engine
This is Rietveld 408576698