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

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

Issue 863863004: Implemented additive animations for length (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed AnimationStackTest 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& fromCSSValue, CSSValue& toCSSValue) const;
55
56 RefPtrWillBeMember<CSSValue> m_value; 54 RefPtrWillBeMember<CSSValue> m_value;
57 mutable RefPtrWillBeMember<AnimatableValue> m_animatableValueCache; 55 mutable RefPtrWillBeMember<AnimatableValue> m_animatableValueCache;
58 }; 56 };
59 57
60 private: 58 private:
61 StringKeyframe() 59 StringKeyframe()
62 : m_propertySet(MutableStylePropertySet::create()) 60 : m_propertySet(MutableStylePropertySet::create())
63 { } 61 { }
64 62
65 StringKeyframe(const StringKeyframe& copyFrom); 63 StringKeyframe(const StringKeyframe& copyFrom);
66 64
67 virtual PassRefPtrWillBeRawPtr<Keyframe> clone() const override; 65 virtual PassRefPtrWillBeRawPtr<Keyframe> clone() const override;
68 virtual PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> createPro pertySpecificKeyframe(CSSPropertyID) const override; 66 virtual PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> createPro pertySpecificKeyframe(CSSPropertyID) const override;
69 67
70 virtual bool isStringKeyframe() const override { return true; } 68 virtual bool isStringKeyframe() const override { return true; }
71 69
72 RefPtrWillBeMember<MutableStylePropertySet> m_propertySet; 70 RefPtrWillBeMember<MutableStylePropertySet> m_propertySet;
73 }; 71 };
74 72
75 using StringPropertySpecificKeyframe = StringKeyframe::PropertySpecificKeyframe; 73 using StringPropertySpecificKeyframe = StringKeyframe::PropertySpecificKeyframe;
76 74
77 DEFINE_TYPE_CASTS(StringKeyframe, Keyframe, value, value->isStringKeyframe(), va lue.isStringKeyframe()); 75 DEFINE_TYPE_CASTS(StringKeyframe, Keyframe, value, value->isStringKeyframe(), va lue.isStringKeyframe());
78 DEFINE_TYPE_CASTS(StringPropertySpecificKeyframe, Keyframe::PropertySpecificKeyf rame, value, value->isStringPropertySpecificKeyframe(), value.isStringPropertySp ecificKeyframe()); 76 DEFINE_TYPE_CASTS(StringPropertySpecificKeyframe, Keyframe::PropertySpecificKeyf rame, value, value->isStringPropertySpecificKeyframe(), value.isStringPropertySp ecificKeyframe());
79 77
80 } 78 }
81 79
82 #endif 80 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698