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

Side by Side Diff: Source/core/animation/css/CSSAnimationUpdate.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 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/Interpolation.h" 8 #include "core/animation/Interpolation.h"
9 #include "core/css/CSSKeyframesRule.h" 9 #include "core/css/CSSKeyframesRule.h"
10 #include "wtf/HashMap.h" 10 #include "wtf/HashMap.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 CSSPropertyID id; 139 CSSPropertyID id;
140 CSSPropertyID eventId; 140 CSSPropertyID eventId;
141 RawPtrWillBeMember<const AnimatableValue> from; 141 RawPtrWillBeMember<const AnimatableValue> from;
142 RawPtrWillBeMember<const AnimatableValue> to; 142 RawPtrWillBeMember<const AnimatableValue> to;
143 RefPtrWillBeMember<InertAnimation> animation; 143 RefPtrWillBeMember<InertAnimation> animation;
144 }; 144 };
145 using NewTransitionMap = WillBeHeapHashMap<CSSPropertyID, NewTransition>; 145 using NewTransitionMap = WillBeHeapHashMap<CSSPropertyID, NewTransition>;
146 const NewTransitionMap& newTransitions() const { return m_newTransitions; } 146 const NewTransitionMap& newTransitions() const { return m_newTransitions; }
147 const HashSet<CSSPropertyID>& cancelledTransitions() const { return m_cancel ledTransitions; } 147 const HashSet<CSSPropertyID>& cancelledTransitions() const { return m_cancel ledTransitions; }
148 148
149 void adoptActiveInterpolationsForAnimations(WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>>& newMap) { newMap.swap(m_activeInterpolation sForAnimations); } 149 void adoptActiveInterpolationsForAnimations(InterpolationPipelineMap& newMap ) { newMap.swap(m_activeInterpolationsForAnimations); }
150 void adoptActiveInterpolationsForTransitions(WillBeHeapHashMap<CSSPropertyID , RefPtrWillBeMember<Interpolation>>& newMap) { newMap.swap(m_activeInterpolatio nsForTransitions); } 150 void adoptActiveInterpolationsForTransitions(InterpolationPipelineMap& newMa p) { newMap.swap(m_activeInterpolationsForTransitions); }
151 const WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>>& a ctiveInterpolationsForAnimations() const { return m_activeInterpolationsForAnima tions; } 151 const InterpolationPipelineMap& activeInterpolationsForAnimations() const { return m_activeInterpolationsForAnimations; }
152 const WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>>& a ctiveInterpolationsForTransitions() const { return m_activeInterpolationsForTran sitions; } 152 const InterpolationPipelineMap& activeInterpolationsForTransitions() const { return m_activeInterpolationsForTransitions; }
153 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>>& activeI nterpolationsForAnimations() { return m_activeInterpolationsForAnimations; } 153 InterpolationPipelineMap& activeInterpolationsForAnimations() { return m_act iveInterpolationsForAnimations; }
154 154
155 bool isEmpty() const 155 bool isEmpty() const
156 { 156 {
157 return m_newAnimations.isEmpty() 157 return m_newAnimations.isEmpty()
158 && m_cancelledAnimationNames.isEmpty() 158 && m_cancelledAnimationNames.isEmpty()
159 && m_suppressedAnimationPlayers.isEmpty() 159 && m_suppressedAnimationPlayers.isEmpty()
160 && m_animationsWithPauseToggled.isEmpty() 160 && m_animationsWithPauseToggled.isEmpty()
161 && m_animationsWithUpdates.isEmpty() 161 && m_animationsWithUpdates.isEmpty()
162 && m_newTransitions.isEmpty() 162 && m_newTransitions.isEmpty()
163 && m_cancelledTransitions.isEmpty() 163 && m_cancelledTransitions.isEmpty()
(...skipping 10 matching lines...) Expand all
174 // incomplete keyframes. 174 // incomplete keyframes.
175 WillBeHeapVector<NewAnimation> m_newAnimations; 175 WillBeHeapVector<NewAnimation> m_newAnimations;
176 Vector<AtomicString> m_cancelledAnimationNames; 176 Vector<AtomicString> m_cancelledAnimationNames;
177 WillBeHeapHashSet<RawPtrWillBeMember<const AnimationPlayer>> m_suppressedAni mationPlayers; 177 WillBeHeapHashSet<RawPtrWillBeMember<const AnimationPlayer>> m_suppressedAni mationPlayers;
178 Vector<AtomicString> m_animationsWithPauseToggled; 178 Vector<AtomicString> m_animationsWithPauseToggled;
179 WillBeHeapVector<UpdatedAnimation> m_animationsWithUpdates; 179 WillBeHeapVector<UpdatedAnimation> m_animationsWithUpdates;
180 180
181 NewTransitionMap m_newTransitions; 181 NewTransitionMap m_newTransitions;
182 HashSet<CSSPropertyID> m_cancelledTransitions; 182 HashSet<CSSPropertyID> m_cancelledTransitions;
183 183
184 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>> m_active InterpolationsForAnimations; 184 InterpolationPipelineMap m_activeInterpolationsForAnimations;
185 WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<Interpolation>> m_active InterpolationsForTransitions; 185 InterpolationPipelineMap m_activeInterpolationsForTransitions;
186 }; 186 };
187 187
188 } // namespace blink 188 } // namespace blink
189 189
190 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::NewAnimation); 190 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::NewAnimation);
191 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::UpdatedAnimation); 191 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::CSSAnimationUpdate::UpdatedAnimation);
192 192
193 #endif 193 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698