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

Side by Side Diff: Source/core/animation/StringKeyframe.h

Issue 811993002: Animation: Implement DoubleStyleInterpolation in StringKeyframe (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created more layout tests Created 5 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 #ifndef StringKeyframe_h 5 #ifndef StringKeyframe_h
6 #define StringKeyframe_h 6 #define StringKeyframe_h
7 7
8 #include "core/animation/Keyframe.h" 8 #include "core/animation/Keyframe.h"
9 #include "core/css/StylePropertySet.h" 9 #include "core/css/StylePropertySet.h"
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 virtual void trace(Visitor*) override; 44 virtual void trace(Visitor*) override;
45 45
46 private: 46 private:
47 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin g, CSSValue*); 47 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin g, CSSValue*);
48 48
49 virtual PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> clone WithOffset(double offset) const; 49 virtual PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> clone WithOffset(double offset) const;
50 virtual bool isStringPropertySpecificKeyframe() const override { return true; } 50 virtual bool isStringPropertySpecificKeyframe() const override { return true; }
51 51
52 static bool createInterpolationsFromCSSValues(CSSPropertyID, CSSValue* f romCSSValue, CSSValue* toCSSValue, Element*, OwnPtrWillBeRawPtr<WillBeHeapVector <RefPtrWillBeMember<Interpolation>>>& interpolations); 52 static bool createInterpolationsFromCSSValues(CSSPropertyID, CSSValue* f romCSSValue, CSSValue* toCSSValue, Element*, OwnPtrWillBeRawPtr<WillBeHeapVector <RefPtrWillBeMember<Interpolation>>>& interpolations);
53 53
54 void ensureAnimatableValueCaches(CSSPropertyID, Keyframe::PropertySpecif icKeyframe&, Element*, CSSValue*, CSSValue*) const;
alancutter (OOO until 2018) 2015/02/04 20:24:37 Include parameter names here: end, from, to.
jadeg 2015/02/05 23:37:03 Done.
55
54 RefPtrWillBeMember<CSSValue> m_value; 56 RefPtrWillBeMember<CSSValue> m_value;
55 mutable RefPtrWillBeMember<AnimatableValue> m_animatableValueCache; 57 mutable RefPtrWillBeMember<AnimatableValue> m_animatableValueCache;
56 }; 58 };
57 59
58 private: 60 private:
59 StringKeyframe() 61 StringKeyframe()
60 : m_propertySet(MutableStylePropertySet::create()) 62 : m_propertySet(MutableStylePropertySet::create())
61 { } 63 { }
62 64
63 StringKeyframe(const StringKeyframe& copyFrom); 65 StringKeyframe(const StringKeyframe& copyFrom);
64 66
65 virtual PassRefPtrWillBeRawPtr<Keyframe> clone() const override; 67 virtual PassRefPtrWillBeRawPtr<Keyframe> clone() const override;
66 virtual PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> createPro pertySpecificKeyframe(CSSPropertyID) const override; 68 virtual PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> createPro pertySpecificKeyframe(CSSPropertyID) const override;
67 69
68 virtual bool isStringKeyframe() const override { return true; } 70 virtual bool isStringKeyframe() const override { return true; }
69 71
70 RefPtrWillBeMember<MutableStylePropertySet> m_propertySet; 72 RefPtrWillBeMember<MutableStylePropertySet> m_propertySet;
71 }; 73 };
72 74
73 using StringPropertySpecificKeyframe = StringKeyframe::PropertySpecificKeyframe; 75 using StringPropertySpecificKeyframe = StringKeyframe::PropertySpecificKeyframe;
74 76
75 DEFINE_TYPE_CASTS(StringKeyframe, Keyframe, value, value->isStringKeyframe(), va lue.isStringKeyframe()); 77 DEFINE_TYPE_CASTS(StringKeyframe, Keyframe, value, value->isStringKeyframe(), va lue.isStringKeyframe());
76 DEFINE_TYPE_CASTS(StringPropertySpecificKeyframe, Keyframe::PropertySpecificKeyf rame, value, value->isStringPropertySpecificKeyframe(), value.isStringPropertySp ecificKeyframe()); 78 DEFINE_TYPE_CASTS(StringPropertySpecificKeyframe, Keyframe::PropertySpecificKeyf rame, value, value->isStringPropertySpecificKeyframe(), value.isStringPropertySp ecificKeyframe());
77 79
78 } 80 }
79 81
80 #endif 82 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698