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

Side by Side Diff: third_party/WebKit/Source/core/animation/css/CSSAnimationUpdate.h

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CSSAnimationUpdate_h 5 #ifndef CSSAnimationUpdate_h
6 #define CSSAnimationUpdate_h 6 #define CSSAnimationUpdate_h
7 7
8 #include "core/animation/AnimationStack.h" 8 #include "core/animation/AnimationStack.h"
9 #include "core/animation/InertEffect.h" 9 #include "core/animation/InertEffect.h"
10 #include "core/animation/Interpolation.h" 10 #include "core/animation/Interpolation.h"
(...skipping 13 matching lines...) Expand all
24 24
25 // This class stores the CSS Animations/Transitions information we use during a style recalc. 25 // This class stores the CSS Animations/Transitions information we use during a style recalc.
26 // This includes updates to animations/transitions as well as the Interpolations to be applied. 26 // This includes updates to animations/transitions as well as the Interpolations to be applied.
27 class CSSAnimationUpdate final { 27 class CSSAnimationUpdate final {
28 DISALLOW_NEW(); 28 DISALLOW_NEW();
29 WTF_MAKE_NONCOPYABLE(CSSAnimationUpdate); 29 WTF_MAKE_NONCOPYABLE(CSSAnimationUpdate);
30 public: 30 public:
31 class NewAnimation { 31 class NewAnimation {
32 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 32 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
33 public: 33 public:
34 NewAnimation(AtomicString name, size_t nameIndex, const InertEffect& eff ect, Timing timing, PassRefPtrWillBeRawPtr<StyleRuleKeyframes> styleRule) 34 NewAnimation(AtomicString name, size_t nameIndex, const InertEffect& eff ect, Timing timing, RawPtr<StyleRuleKeyframes> styleRule)
35 : name(name) 35 : name(name)
36 , nameIndex(nameIndex) 36 , nameIndex(nameIndex)
37 , effect(effect) 37 , effect(effect)
38 , timing(timing) 38 , timing(timing)
39 , styleRule(styleRule) 39 , styleRule(styleRule)
40 , styleRuleVersion(this->styleRule->version()) 40 , styleRuleVersion(this->styleRule->version())
41 { 41 {
42 } 42 }
43 43
44 DEFINE_INLINE_TRACE() 44 DEFINE_INLINE_TRACE()
45 { 45 {
46 visitor->trace(effect); 46 visitor->trace(effect);
47 visitor->trace(styleRule); 47 visitor->trace(styleRule);
48 } 48 }
49 49
50 AtomicString name; 50 AtomicString name;
51 size_t nameIndex; 51 size_t nameIndex;
52 Member<const InertEffect> effect; 52 Member<const InertEffect> effect;
53 Timing timing; 53 Timing timing;
54 RefPtrWillBeMember<StyleRuleKeyframes> styleRule; 54 Member<StyleRuleKeyframes> styleRule;
55 unsigned styleRuleVersion; 55 unsigned styleRuleVersion;
56 }; 56 };
57 57
58 class UpdatedAnimation { 58 class UpdatedAnimation {
59 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 59 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
60 public: 60 public:
61 UpdatedAnimation(size_t index, Animation* animation, const InertEffect& effect, Timing specifiedTiming, PassRefPtrWillBeRawPtr<StyleRuleKeyframes> style Rule) 61 UpdatedAnimation(size_t index, Animation* animation, const InertEffect& effect, Timing specifiedTiming, RawPtr<StyleRuleKeyframes> styleRule)
62 : index(index) 62 : index(index)
63 , animation(animation) 63 , animation(animation)
64 , effect(&effect) 64 , effect(&effect)
65 , specifiedTiming(specifiedTiming) 65 , specifiedTiming(specifiedTiming)
66 , styleRule(styleRule) 66 , styleRule(styleRule)
67 , styleRuleVersion(this->styleRule->version()) 67 , styleRuleVersion(this->styleRule->version())
68 { 68 {
69 } 69 }
70 70
71 DEFINE_INLINE_TRACE() 71 DEFINE_INLINE_TRACE()
72 { 72 {
73 visitor->trace(animation); 73 visitor->trace(animation);
74 visitor->trace(effect); 74 visitor->trace(effect);
75 visitor->trace(styleRule); 75 visitor->trace(styleRule);
76 } 76 }
77 77
78 size_t index; 78 size_t index;
79 Member<Animation> animation; 79 Member<Animation> animation;
80 Member<const InertEffect> effect; 80 Member<const InertEffect> effect;
81 Timing specifiedTiming; 81 Timing specifiedTiming;
82 RefPtrWillBeMember<StyleRuleKeyframes> styleRule; 82 Member<StyleRuleKeyframes> styleRule;
83 unsigned styleRuleVersion; 83 unsigned styleRuleVersion;
84 }; 84 };
85 85
86 CSSAnimationUpdate() 86 CSSAnimationUpdate()
87 { 87 {
88 } 88 }
89 89
90 ~CSSAnimationUpdate() 90 ~CSSAnimationUpdate()
91 { 91 {
92 // For performance reasons, explicitly clear HeapVectors and 92 // For performance reasons, explicitly clear HeapVectors and
(...skipping 23 matching lines...) Expand all
116 m_newTransitions.clear(); 116 m_newTransitions.clear();
117 m_activeInterpolationsForAnimations.clear(); 117 m_activeInterpolationsForAnimations.clear();
118 m_activeInterpolationsForTransitions.clear(); 118 m_activeInterpolationsForTransitions.clear();
119 m_cancelledAnimationIndices.clear(); 119 m_cancelledAnimationIndices.clear();
120 m_animationIndicesWithPauseToggled.clear(); 120 m_animationIndicesWithPauseToggled.clear();
121 m_cancelledTransitions.clear(); 121 m_cancelledTransitions.clear();
122 m_finishedTransitions.clear(); 122 m_finishedTransitions.clear();
123 m_updatedCompositorKeyframes.clear(); 123 m_updatedCompositorKeyframes.clear();
124 } 124 }
125 125
126 void startAnimation(const AtomicString& animationName, size_t nameIndex, con st InertEffect& effect, const Timing& timing, PassRefPtrWillBeRawPtr<StyleRuleKe yframes> styleRule) 126 void startAnimation(const AtomicString& animationName, size_t nameIndex, con st InertEffect& effect, const Timing& timing, RawPtr<StyleRuleKeyframes> styleRu le)
127 { 127 {
128 m_newAnimations.append(NewAnimation(animationName, nameIndex, effect, ti ming, styleRule)); 128 m_newAnimations.append(NewAnimation(animationName, nameIndex, effect, ti ming, styleRule));
129 } 129 }
130 // Returns whether animation has been suppressed and should be filtered duri ng style application. 130 // Returns whether animation has been suppressed and should be filtered duri ng style application.
131 bool isSuppressedAnimation(const Animation* animation) const { return m_supp ressedAnimations.contains(animation); } 131 bool isSuppressedAnimation(const Animation* animation) const { return m_supp ressedAnimations.contains(animation); }
132 void cancelAnimation(size_t index, const Animation& animation) 132 void cancelAnimation(size_t index, const Animation& animation)
133 { 133 {
134 m_cancelledAnimationIndices.append(index); 134 m_cancelledAnimationIndices.append(index);
135 m_suppressedAnimations.add(&animation); 135 m_suppressedAnimations.add(&animation);
136 } 136 }
137 void toggleAnimationIndexPaused(size_t index) 137 void toggleAnimationIndexPaused(size_t index)
138 { 138 {
139 m_animationIndicesWithPauseToggled.append(index); 139 m_animationIndicesWithPauseToggled.append(index);
140 } 140 }
141 void updateAnimation(size_t index, Animation* animation, const InertEffect& effect, const Timing& specifiedTiming, 141 void updateAnimation(size_t index, Animation* animation, const InertEffect& effect, const Timing& specifiedTiming,
142 PassRefPtrWillBeRawPtr<StyleRuleKeyframes> styleRule) 142 RawPtr<StyleRuleKeyframes> styleRule)
143 { 143 {
144 m_animationsWithUpdates.append(UpdatedAnimation(index, animation, effect , specifiedTiming, styleRule)); 144 m_animationsWithUpdates.append(UpdatedAnimation(index, animation, effect , specifiedTiming, styleRule));
145 m_suppressedAnimations.add(animation); 145 m_suppressedAnimations.add(animation);
146 } 146 }
147 void updateCompositorKeyframes(Animation* animation) 147 void updateCompositorKeyframes(Animation* animation)
148 { 148 {
149 m_updatedCompositorKeyframes.append(animation); 149 m_updatedCompositorKeyframes.append(animation);
150 } 150 }
151 151
152 void startTransition(CSSPropertyID id, const AnimatableValue* from, const An imatableValue* to, const InertEffect& effect) 152 void startTransition(CSSPropertyID id, const AnimatableValue* from, const An imatableValue* to, const InertEffect& effect)
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 238
239 friend class PendingAnimationUpdate; 239 friend class PendingAnimationUpdate;
240 }; 240 };
241 241
242 } // namespace blink 242 } // namespace blink
243 243
244 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::NewAnimation); 244 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::NewAnimation);
245 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::UpdatedAnimation); 245 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::UpdatedAnimation);
246 246
247 #endif 247 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698