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

Side by Side Diff: Source/core/animation/css/CSSAnimations.h

Issue 73643004: Web Animations: Extract an API for servicing animations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Switch to references for non-null params. Created 7 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 static const StylePropertyShorthand& animatableProperties(); 158 static const StylePropertyShorthand& animatableProperties();
159 // FIXME: This should take a const ScopedStyleTree instead of a StyleResolve r. 159 // FIXME: This should take a const ScopedStyleTree instead of a StyleResolve r.
160 // We should also change the Element* to a const Element* 160 // We should also change the Element* to a const Element*
161 static PassOwnPtr<CSSAnimationUpdate> calculateUpdate(Element*, const Render Style&, StyleResolver*); 161 static PassOwnPtr<CSSAnimationUpdate> calculateUpdate(Element*, const Render Style&, StyleResolver*);
162 162
163 void setPendingUpdate(PassOwnPtr<CSSAnimationUpdate> update) { m_pendingUpda te = update; } 163 void setPendingUpdate(PassOwnPtr<CSSAnimationUpdate> update) { m_pendingUpda te = update; }
164 void maybeApplyPendingUpdate(Element*); 164 void maybeApplyPendingUpdate(Element*);
165 bool isEmpty() const { return m_animations.isEmpty() && m_transitions.isEmpt y() && !m_pendingUpdate; } 165 bool isEmpty() const { return m_animations.isEmpty() && m_transitions.isEmpt y() && !m_pendingUpdate; }
166 void cancel(); 166 void cancel();
167 167
168 bool shouldCompositeForPendingAnimations(bool renderViewInCompositingMode) c onst;
169
170 private: 168 private:
171 // Note that a single animation name may map to multiple players due to 169 // Note that a single animation name may map to multiple players due to
172 // the way in which we split up animations with incomplete keyframes. 170 // the way in which we split up animations with incomplete keyframes.
173 // FIXME: Once the Web Animations model supports groups, we could use a 171 // FIXME: Once the Web Animations model supports groups, we could use a
174 // ParGroup to drive multiple animations from a single Player. 172 // ParGroup to drive multiple animations from a single Player.
175 typedef HashMap<AtomicString, HashSet<RefPtr<Player> > > AnimationMap; 173 typedef HashMap<AtomicString, HashSet<RefPtr<Player> > > AnimationMap;
176 struct RunningTransition { 174 struct RunningTransition {
177 Animation* transition; // The TransitionTimeline keeps the Players alive 175 Animation* transition; // The TransitionTimeline keeps the Players alive
178 const AnimatableValue* from; 176 const AnimatableValue* from;
179 const AnimatableValue* to; 177 const AnimatableValue* to;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 virtual void onEventCondition(const TimedItem*, bool isFirstSample, Time dItem::Phase previousPhase, double previousIteration) OVERRIDE; 214 virtual void onEventCondition(const TimedItem*, bool isFirstSample, Time dItem::Phase previousPhase, double previousIteration) OVERRIDE;
217 private: 215 private:
218 Element* m_target; 216 Element* m_target;
219 const CSSPropertyID m_property; 217 const CSSPropertyID m_property;
220 }; 218 };
221 }; 219 };
222 220
223 } // namespace WebCore 221 } // namespace WebCore
224 222
225 #endif 223 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698