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

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

Issue 194733002: Web Animations: Use StringKeyframes for element.animate() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More comments Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/animation/EffectInput.cpp ('k') | Source/core/animation/KeyframeEffectModel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Keyframe_h 5 #ifndef Keyframe_h
6 #define Keyframe_h 6 #define Keyframe_h
7 7
8 #include "CSSPropertyNames.h" 8 #include "CSSPropertyNames.h"
9 #include "core/animation/AnimationEffect.h" 9 #include "core/animation/AnimationEffect.h"
10 #include "core/animation/TimedItem.h" 10 #include "core/animation/TimedItem.h"
11 11
12 namespace WebCore { 12 namespace WebCore {
13 13
14 typedef HashSet<CSSPropertyID> PropertySet; 14 typedef HashSet<CSSPropertyID> PropertySet;
15 15
16 class Element;
17
16 // FIXME: Make Keyframe immutable 18 // FIXME: Make Keyframe immutable
17 class Keyframe : public RefCountedWillBeGarbageCollectedFinalized<Keyframe> { 19 class Keyframe : public RefCountedWillBeGarbageCollectedFinalized<Keyframe> {
18 public: 20 public:
19 virtual ~Keyframe() { } 21 virtual ~Keyframe() { }
20 22
21 void setOffset(double offset) { m_offset = offset; } 23 void setOffset(double offset) { m_offset = offset; }
22 double offset() const { return m_offset; } 24 double offset() const { return m_offset; }
23 25
24 void setComposite(AnimationEffect::CompositeOperation composite) { m_composi te = composite; } 26 void setComposite(AnimationEffect::CompositeOperation composite) { m_composi te = composite; }
25 AnimationEffect::CompositeOperation composite() const { return m_composite; } 27 AnimationEffect::CompositeOperation composite() const { return m_composite; }
(...skipping 22 matching lines...) Expand all
48 virtual ~PropertySpecificKeyframe() { } 50 virtual ~PropertySpecificKeyframe() { }
49 double offset() const { return m_offset; } 51 double offset() const { return m_offset; }
50 TimingFunction* easing() const { return m_easing.get(); } 52 TimingFunction* easing() const { return m_easing.get(); }
51 AnimationEffect::CompositeOperation composite() const { return m_composi te; } 53 AnimationEffect::CompositeOperation composite() const { return m_composi te; }
52 virtual PassOwnPtrWillBeRawPtr<PropertySpecificKeyframe> cloneWithOffset (double offset) const = 0; 54 virtual PassOwnPtrWillBeRawPtr<PropertySpecificKeyframe> cloneWithOffset (double offset) const = 0;
53 55
54 virtual bool isAnimatableValuePropertySpecificKeyframe() const { return false; } 56 virtual bool isAnimatableValuePropertySpecificKeyframe() const { return false; }
55 virtual bool isStringPropertySpecificKeyframe() const { return false; } 57 virtual bool isStringPropertySpecificKeyframe() const { return false; }
56 58
57 virtual PassOwnPtrWillBeRawPtr<PropertySpecificKeyframe> neutralKeyframe (double offset, PassRefPtr<TimingFunction> easing) const = 0; 59 virtual PassOwnPtrWillBeRawPtr<PropertySpecificKeyframe> neutralKeyframe (double offset, PassRefPtr<TimingFunction> easing) const = 0;
58 virtual PassRefPtrWillBeRawPtr<Interpolation> createInterpolation(CSSPro pertyID, WebCore::Keyframe::PropertySpecificKeyframe* end) const = 0; 60 virtual PassRefPtrWillBeRawPtr<Interpolation> createInterpolation(CSSPro pertyID, WebCore::Keyframe::PropertySpecificKeyframe* end, Element*) const = 0;
59 61
60 virtual void trace(Visitor*) = 0; 62 virtual void trace(Visitor*) = 0;
61 63
62 protected: 64 protected:
63 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin g, AnimationEffect::CompositeOperation); 65 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin g, AnimationEffect::CompositeOperation);
64 66
65 double m_offset; 67 double m_offset;
66 RefPtr<TimingFunction> m_easing; 68 RefPtr<TimingFunction> m_easing;
67 AnimationEffect::CompositeOperation m_composite; 69 AnimationEffect::CompositeOperation m_composite;
68 }; 70 };
(...skipping 15 matching lines...) Expand all
84 } 86 }
85 87
86 double m_offset; 88 double m_offset;
87 AnimationEffect::CompositeOperation m_composite; 89 AnimationEffect::CompositeOperation m_composite;
88 RefPtr<TimingFunction> m_easing; 90 RefPtr<TimingFunction> m_easing;
89 }; 91 };
90 92
91 } 93 }
92 94
93 #endif 95 #endif
OLDNEW
« no previous file with comments | « Source/core/animation/EffectInput.cpp ('k') | Source/core/animation/KeyframeEffectModel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698