OLD | NEW |
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 unsigned styleRuleVersion; | 80 unsigned styleRuleVersion; |
81 }; | 81 }; |
82 | 82 |
83 } // namespace blink | 83 } // namespace blink |
84 | 84 |
85 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::NewCSSAnimation); | 85 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::NewCSSAnimation); |
86 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::UpdatedCSSAnimation); | 86 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::UpdatedCSSAnimation); |
87 | 87 |
88 namespace blink { | 88 namespace blink { |
89 | 89 |
90 // This class stores the CSS Animations/Transitions information we use during a
style recalc. | 90 // This class stores the CSS Animations/Transitions information we use during a |
91 // This includes updates to animations/transitions as well as the Interpolations
to be applied. | 91 // style recalc. This includes updates to animations/transitions as well as the |
| 92 // Interpolations to be applied. |
92 class CSSAnimationUpdate final { | 93 class CSSAnimationUpdate final { |
93 DISALLOW_NEW(); | 94 DISALLOW_NEW(); |
94 WTF_MAKE_NONCOPYABLE(CSSAnimationUpdate); | 95 WTF_MAKE_NONCOPYABLE(CSSAnimationUpdate); |
95 | 96 |
96 public: | 97 public: |
97 CSSAnimationUpdate() {} | 98 CSSAnimationUpdate() {} |
98 | 99 |
99 ~CSSAnimationUpdate() {} | 100 ~CSSAnimationUpdate() {} |
100 | 101 |
101 void copy(const CSSAnimationUpdate& update) { | 102 void copy(const CSSAnimationUpdate& update) { |
(...skipping 27 matching lines...) Expand all Loading... |
129 } | 130 } |
130 | 131 |
131 void startAnimation(const AtomicString& animationName, | 132 void startAnimation(const AtomicString& animationName, |
132 size_t nameIndex, | 133 size_t nameIndex, |
133 const InertEffect& effect, | 134 const InertEffect& effect, |
134 const Timing& timing, | 135 const Timing& timing, |
135 StyleRuleKeyframes* styleRule) { | 136 StyleRuleKeyframes* styleRule) { |
136 m_newAnimations.append( | 137 m_newAnimations.append( |
137 NewCSSAnimation(animationName, nameIndex, effect, timing, styleRule)); | 138 NewCSSAnimation(animationName, nameIndex, effect, timing, styleRule)); |
138 } | 139 } |
139 // Returns whether animation has been suppressed and should be filtered during
style application. | 140 // Returns whether animation has been suppressed and should be filtered during |
| 141 // style application. |
140 bool isSuppressedAnimation(const Animation* animation) const { | 142 bool isSuppressedAnimation(const Animation* animation) const { |
141 return m_suppressedAnimations.contains(animation); | 143 return m_suppressedAnimations.contains(animation); |
142 } | 144 } |
143 void cancelAnimation(size_t index, const Animation& animation) { | 145 void cancelAnimation(size_t index, const Animation& animation) { |
144 m_cancelledAnimationIndices.append(index); | 146 m_cancelledAnimationIndices.append(index); |
145 m_suppressedAnimations.add(&animation); | 147 m_suppressedAnimations.add(&animation); |
146 } | 148 } |
147 void toggleAnimationIndexPaused(size_t index) { | 149 void toggleAnimationIndexPaused(size_t index) { |
148 m_animationIndicesWithPauseToggled.append(index); | 150 m_animationIndicesWithPauseToggled.append(index); |
149 } | 151 } |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 | 279 |
278 ActiveInterpolationsMap m_activeInterpolationsForAnimations; | 280 ActiveInterpolationsMap m_activeInterpolationsForAnimations; |
279 ActiveInterpolationsMap m_activeInterpolationsForTransitions; | 281 ActiveInterpolationsMap m_activeInterpolationsForTransitions; |
280 | 282 |
281 friend class PendingAnimationUpdate; | 283 friend class PendingAnimationUpdate; |
282 }; | 284 }; |
283 | 285 |
284 } // namespace blink | 286 } // namespace blink |
285 | 287 |
286 #endif | 288 #endif |
OLD | NEW |