| OLD | NEW |
| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/animation/AnimatableValueKeyframe.h" | 6 #include "core/animation/AnimatableValueKeyframe.h" |
| 7 | 7 |
| 8 #include "core/animation/Interpolation.h" | 8 #include "core/animation/Interpolation.h" |
| 9 | 9 |
| 10 namespace WebCore { | 10 namespace WebCore { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 for (PropertyValueMap::const_iterator iter = m_propertyValues.begin(); iter
!= m_propertyValues.end(); ++iter) | 24 for (PropertyValueMap::const_iterator iter = m_propertyValues.begin(); iter
!= m_propertyValues.end(); ++iter) |
| 25 properties.add(*iter.keys()); | 25 properties.add(*iter.keys()); |
| 26 return properties; | 26 return properties; |
| 27 } | 27 } |
| 28 | 28 |
| 29 PassRefPtrWillBeRawPtr<Keyframe> AnimatableValueKeyframe::clone() const | 29 PassRefPtrWillBeRawPtr<Keyframe> AnimatableValueKeyframe::clone() const |
| 30 { | 30 { |
| 31 return adoptRefWillBeNoop(new AnimatableValueKeyframe(*this)); | 31 return adoptRefWillBeNoop(new AnimatableValueKeyframe(*this)); |
| 32 } | 32 } |
| 33 | 33 |
| 34 PassOwnPtr<Keyframe::PropertySpecificKeyframe> AnimatableValueKeyframe::createPr
opertySpecificKeyframe(CSSPropertyID property) const | 34 PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> AnimatableValueKeyfra
me::createPropertySpecificKeyframe(CSSPropertyID property) const |
| 35 { | 35 { |
| 36 return adoptPtr(new PropertySpecificKeyframe(offset(), easing(), propertyVal
ue(property), composite())); | 36 return adoptPtrWillBeNoop(new PropertySpecificKeyframe(offset(), easing(), p
ropertyValue(property), composite())); |
| 37 } |
| 38 |
| 39 void AnimatableValueKeyframe::trace(Visitor* visitor) |
| 40 { |
| 41 visitor->trace(m_propertyValues); |
| 42 Keyframe::trace(visitor); |
| 37 } | 43 } |
| 38 | 44 |
| 39 AnimatableValueKeyframe::PropertySpecificKeyframe::PropertySpecificKeyframe(doub
le offset, PassRefPtr<TimingFunction> easing, const AnimatableValue* value, Anim
ationEffect::CompositeOperation op) | 45 AnimatableValueKeyframe::PropertySpecificKeyframe::PropertySpecificKeyframe(doub
le offset, PassRefPtr<TimingFunction> easing, const AnimatableValue* value, Anim
ationEffect::CompositeOperation op) |
| 40 : Keyframe::PropertySpecificKeyframe(offset, easing, op) | 46 : Keyframe::PropertySpecificKeyframe(offset, easing, op) |
| 41 , m_value(PassRefPtr<AnimatableValue>(const_cast<AnimatableValue*>(value))) | 47 , m_value(const_cast<AnimatableValue*>(value)) |
| 42 { } | 48 { } |
| 43 | 49 |
| 44 AnimatableValueKeyframe::PropertySpecificKeyframe::PropertySpecificKeyframe(doub
le offset, PassRefPtr<TimingFunction> easing, PassRefPtr<AnimatableValue> value) | 50 AnimatableValueKeyframe::PropertySpecificKeyframe::PropertySpecificKeyframe(doub
le offset, PassRefPtr<TimingFunction> easing, PassRefPtrWillBeRawPtr<AnimatableV
alue> value) |
| 45 : Keyframe::PropertySpecificKeyframe(offset, easing, AnimationEffect::Compos
iteReplace) | 51 : Keyframe::PropertySpecificKeyframe(offset, easing, AnimationEffect::Compos
iteReplace) |
| 46 , m_value(value) | 52 , m_value(value) |
| 47 { | 53 { |
| 48 ASSERT(!isNull(m_offset)); | 54 ASSERT(!isNull(m_offset)); |
| 49 } | 55 } |
| 50 | 56 |
| 51 PassOwnPtr<Keyframe::PropertySpecificKeyframe> AnimatableValueKeyframe::Property
SpecificKeyframe::cloneWithOffset(double offset) const | 57 PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> AnimatableValueKeyfra
me::PropertySpecificKeyframe::cloneWithOffset(double offset) const |
| 52 { | 58 { |
| 53 Keyframe::PropertySpecificKeyframe* theClone = new PropertySpecificKeyframe(
offset, m_easing, m_value); | 59 Keyframe::PropertySpecificKeyframe* theClone = new PropertySpecificKeyframe(
offset, m_easing, m_value); |
| 54 return adoptPtr(theClone); | 60 return adoptPtrWillBeNoop(theClone); |
| 55 } | 61 } |
| 56 | 62 |
| 57 PassRefPtr<Interpolation> AnimatableValueKeyframe::PropertySpecificKeyframe::cre
ateInterpolation(CSSPropertyID property, Keyframe::PropertySpecificKeyframe* end
) const | 63 PassRefPtrWillBeRawPtr<Interpolation> AnimatableValueKeyframe::PropertySpecificK
eyframe::createInterpolation(CSSPropertyID property, Keyframe::PropertySpecificK
eyframe* end) const |
| 58 { | 64 { |
| 59 AnimatableValuePropertySpecificKeyframe* to = toAnimatableValuePropertySpeci
ficKeyframe(end); | 65 AnimatableValuePropertySpecificKeyframe* to = toAnimatableValuePropertySpeci
ficKeyframe(end); |
| 60 return LegacyStyleInterpolation::create(value(), to->value(), property); | 66 return LegacyStyleInterpolation::create(value(), to->value(), property); |
| 61 } | 67 } |
| 62 | 68 |
| 63 PassOwnPtr<Keyframe::PropertySpecificKeyframe> AnimatableValueKeyframe::Property
SpecificKeyframe::neutralKeyframe(double offset, PassRefPtr<TimingFunction> easi
ng) const | 69 PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> AnimatableValueKeyfra
me::PropertySpecificKeyframe::neutralKeyframe(double offset, PassRefPtr<TimingFu
nction> easing) const |
| 64 { | 70 { |
| 65 return adoptPtr(new AnimatableValueKeyframe::PropertySpecificKeyframe(offset
, easing, AnimatableValue::neutralValue(), AnimationEffect::CompositeAdd)); | 71 return adoptPtrWillBeNoop(new AnimatableValueKeyframe::PropertySpecificKeyfr
ame(offset, easing, AnimatableValue::neutralValue(), AnimationEffect::CompositeA
dd)); |
| 72 } |
| 73 |
| 74 void AnimatableValueKeyframe::PropertySpecificKeyframe::trace(Visitor* visitor) |
| 75 { |
| 76 visitor->trace(m_value); |
| 66 } | 77 } |
| 67 | 78 |
| 68 } | 79 } |
| OLD | NEW |