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

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

Issue 1701813002: Make Keyframe::PropertySpecificKeyframes RefCounted (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: InvalidatableInterpolation RefPtrs Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/animation/animatable/AnimatableValueKeyframe.h
diff --git a/third_party/WebKit/Source/core/animation/animatable/AnimatableValueKeyframe.h b/third_party/WebKit/Source/core/animation/animatable/AnimatableValueKeyframe.h
index aec6f160f2a4f4b67762592133e76a0aa52112b5..454101de8c5e323a427520746b349e779ad53210 100644
--- a/third_party/WebKit/Source/core/animation/animatable/AnimatableValueKeyframe.h
+++ b/third_party/WebKit/Source/core/animation/animatable/AnimatableValueKeyframe.h
@@ -31,18 +31,24 @@ public:
class PropertySpecificKeyframe : public Keyframe::PropertySpecificKeyframe {
public:
- PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easing, const AnimatableValue*, EffectModel::CompositeOperation);
+ static PassRefPtr<PropertySpecificKeyframe> create(double offset, PassRefPtr<TimingFunction> easing, PassRefPtr<AnimatableValue> value, EffectModel::CompositeOperation composite)
+ {
+ return adoptRef(new PropertySpecificKeyframe(offset, easing, value, composite));
+ }
AnimatableValue* value() const { return m_value.get(); }
const PassRefPtr<AnimatableValue> getAnimatableValue() const final { return m_value; }
- PassOwnPtr<Keyframe::PropertySpecificKeyframe> neutralKeyframe(double offset, PassRefPtr<TimingFunction> easing) const final;
+ PassRefPtr<Keyframe::PropertySpecificKeyframe> neutralKeyframe(double offset, PassRefPtr<TimingFunction> easing) const final;
PassRefPtr<Interpolation> maybeCreateInterpolation(PropertyHandle, Keyframe::PropertySpecificKeyframe& end, Element*, const ComputedStyle*) const final;
private:
- PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easing, PassRefPtr<AnimatableValue>);
+ PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easing, PassRefPtr<AnimatableValue> value, EffectModel::CompositeOperation composite)
+ : Keyframe::PropertySpecificKeyframe(offset, easing, composite)
+ , m_value(value)
+ { }
- PassOwnPtr<Keyframe::PropertySpecificKeyframe> cloneWithOffset(double offset) const override;
+ PassRefPtr<Keyframe::PropertySpecificKeyframe> cloneWithOffset(double offset) const override;
bool isAnimatableValuePropertySpecificKeyframe() const override { return true; }
RefPtr<AnimatableValue> m_value;
@@ -54,7 +60,7 @@ private:
AnimatableValueKeyframe(const AnimatableValueKeyframe& copyFrom);
PassRefPtr<Keyframe> clone() const override;
- PassOwnPtr<Keyframe::PropertySpecificKeyframe> createPropertySpecificKeyframe(PropertyHandle) const override;
+ PassRefPtr<Keyframe::PropertySpecificKeyframe> createPropertySpecificKeyframe(PropertyHandle) const override;
bool isAnimatableValueKeyframe() const override { return true; }

Powered by Google App Engine
This is Rietveld 408576698