Chromium Code Reviews| Index: Source/core/animation/AnimatableValueKeyframe.cpp |
| diff --git a/Source/core/animation/AnimatableValueKeyframe.cpp b/Source/core/animation/AnimatableValueKeyframe.cpp |
| index 48f0d551884fd35ba7736037e8c433b3a575d02e..4ec200369ed7c6183b4d1fe53fa315bd1d179461 100644 |
| --- a/Source/core/animation/AnimatableValueKeyframe.cpp |
| +++ b/Source/core/animation/AnimatableValueKeyframe.cpp |
| @@ -31,38 +31,50 @@ PassRefPtrWillBeRawPtr<Keyframe> AnimatableValueKeyframe::clone() const |
| return adoptRefWillBeNoop(new AnimatableValueKeyframe(*this)); |
| } |
| -PassOwnPtr<Keyframe::PropertySpecificKeyframe> AnimatableValueKeyframe::createPropertySpecificKeyframe(CSSPropertyID property) const |
| +PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> AnimatableValueKeyframe::createPropertySpecificKeyframe(CSSPropertyID property) const |
| { |
| - return adoptPtr(new PropertySpecificKeyframe(offset(), easing(), propertyValue(property), composite())); |
| + return adoptPtrWillBeNoop(new PropertySpecificKeyframe(offset(), easing(), propertyValue(property), composite())); |
| +} |
| + |
| +void AnimatableValueKeyframe::trace(Visitor* visitor) |
| +{ |
| + visitor->trace(m_propertyValues); |
| + Keyframe::trace(visitor); |
| } |
| AnimatableValueKeyframe::PropertySpecificKeyframe::PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easing, const AnimatableValue* value, AnimationEffect::CompositeOperation op) |
| : Keyframe::PropertySpecificKeyframe(offset, easing, op) |
| - , m_value(PassRefPtr<AnimatableValue>(const_cast<AnimatableValue*>(value))) |
| + , m_value(const_cast<AnimatableValue*>(value)) |
| { } |
| -AnimatableValueKeyframe::PropertySpecificKeyframe::PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easing, PassRefPtr<AnimatableValue> value) |
| +AnimatableValueKeyframe::PropertySpecificKeyframe::PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easing, PassRefPtrWillBeRawPtr<AnimatableValue> value) |
| : Keyframe::PropertySpecificKeyframe(offset, easing, AnimationEffect::CompositeReplace) |
| , m_value(value) |
| { |
| ASSERT(!isNull(m_offset)); |
| } |
| -PassOwnPtr<Keyframe::PropertySpecificKeyframe> AnimatableValueKeyframe::PropertySpecificKeyframe::cloneWithOffset(double offset) const |
| +PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> AnimatableValueKeyframe::PropertySpecificKeyframe::cloneWithOffset(double offset) const |
| { |
| Keyframe::PropertySpecificKeyframe* theClone = new PropertySpecificKeyframe(offset, m_easing, m_value); |
| - return adoptPtr(theClone); |
| + return adoptPtrWillBeNoop(theClone); |
| } |
| -PassRefPtr<Interpolation> AnimatableValueKeyframe::PropertySpecificKeyframe::createInterpolation(CSSPropertyID property, Keyframe::PropertySpecificKeyframe* end) const |
| +PassRefPtrWillBeRawPtr<Interpolation> AnimatableValueKeyframe::PropertySpecificKeyframe::createInterpolation(CSSPropertyID property, Keyframe::PropertySpecificKeyframe* end) const |
| { |
| AnimatableValuePropertySpecificKeyframe* to = toAnimatableValuePropertySpecificKeyframe(end); |
| return LegacyStyleInterpolation::create(value(), to->value(), property); |
| } |
| -PassOwnPtr<Keyframe::PropertySpecificKeyframe> AnimatableValueKeyframe::PropertySpecificKeyframe::neutralKeyframe(double offset, PassRefPtr<TimingFunction> easing) const |
| +PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> AnimatableValueKeyframe::PropertySpecificKeyframe::neutralKeyframe(double offset, PassRefPtr<TimingFunction> easing) const |
| +{ |
| + return adoptPtrWillBeNoop(new AnimatableValueKeyframe::PropertySpecificKeyframe(offset, easing, AnimatableValue::neutralValue(), AnimationEffect::CompositeAdd)); |
| +} |
| + |
| +void AnimatableValueKeyframe::PropertySpecificKeyframe::trace(Visitor* visitor) |
| { |
| - return adoptPtr(new AnimatableValueKeyframe::PropertySpecificKeyframe(offset, easing, AnimatableValue::neutralValue(), AnimationEffect::CompositeAdd)); |
| + visitor->trace(m_value); |
| + PropertySpecificKeyframe::trace(visitor); |
|
haraken
2014/04/03 03:56:12
Removed this line, because this causes an infinite
|
| } |
| } |