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

Side by Side Diff: third_party/WebKit/WebCore/page/animation/AnimationBase.h

Issue 21165: Revert the merge. Mac build is mysteriously broken. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 double getElapsedTime() const; 164 double getElapsedTime() const;
165 165
166 AnimationBase* next() const { return m_next; } 166 AnimationBase* next() const { return m_next; }
167 void setNext(AnimationBase* animation) { m_next = animation; } 167 void setNext(AnimationBase* animation) { m_next = animation; }
168 168
169 void styleAvailable() 169 void styleAvailable()
170 { 170 {
171 ASSERT(waitingForStyleAvailable()); 171 ASSERT(waitingForStyleAvailable());
172 updateStateMachine(AnimationBase::AnimationStateInputStyleAvailable, -1) ; 172 updateStateMachine(AnimationBase::AnimationStateInputStyleAvailable, -1) ;
173 } 173 }
174 174
175 #if USE(ACCELERATED_COMPOSITING)
176 static bool animationOfPropertyIsAccelerated(int prop);
177 #endif
178
179 protected: 175 protected:
180 virtual void overrideAnimations() { } 176 virtual void overrideAnimations() { }
181 virtual void resumeOverriddenAnimations() { } 177 virtual void resumeOverriddenAnimations() { }
182 178
183 CompositeAnimation* compositeAnimation() { return m_compAnim; } 179 CompositeAnimation* compositeAnimation() { return m_compAnim; }
184 180
185 // These are called when the corresponding timer fires so subclasses can do any extra work 181 // These are called when the corresponding timer fires so subclasses can do any extra work
186 virtual void onAnimationStart(double /*elapsedTime*/) { } 182 virtual void onAnimationStart(double /*elapsedTime*/) { }
187 virtual void onAnimationIteration(double /*elapsedTime*/) { } 183 virtual void onAnimationIteration(double /*elapsedTime*/) { }
188 virtual void onAnimationEnd(double /*elapsedTime*/) { } 184 virtual void onAnimationEnd(double /*elapsedTime*/) { }
189 virtual bool startAnimation(double /*beginTime*/) { return false; } 185 virtual bool startAnimation(double /*beginTime*/) { return false; }
190 virtual void endAnimation(bool /*reset*/, double /*forcePauseTime*/ = -1) { } 186 virtual void endAnimation(bool /*reset*/, double /*forcePauseTime*/ = -1) { }
191 187
192 void goIntoEndingOrLoopingState(); 188 void goIntoEndingOrLoopingState();
193 189
194 bool isFallbackAnimating() const { return m_fallbackAnimating; } 190 bool isFallbackAnimating() const { return m_fallbackAnimating; }
195 191
196 static bool propertiesEqual(int prop, const RenderStyle* a, const RenderStyl e* b); 192 static bool propertiesEqual(int prop, const RenderStyle* a, const RenderStyl e* b);
197 static int getPropertyAtIndex(int, bool& isShorthand); 193 static int getPropertyAtIndex(int, bool& isShorthand);
198 static int getNumProperties(); 194 static int getNumProperties();
199 195
200 // Return true if we need to start software animation timers 196 // Return true if we need to start software animation timers
201 static bool blendProperties(const AnimationBase* anim, int prop, RenderStyle * dst, const RenderStyle* a, const RenderStyle* b, double progress); 197 static bool blendProperties(const AnimationBase* anim, int prop, RenderStyle * dst, const RenderStyle* a, const RenderStyle* b, double progress);
202 198
199 #if USE(ACCELERATED_COMPOSITING)
200 static bool animationOfPropertyIsAccelerated(int prop);
201 #endif
202
203 static void setChanged(Node*); 203 static void setChanged(Node*);
204 204
205 void getTimeToNextEvent(double& time, bool& isLooping) const; 205 void getTimeToNextEvent(double& time, bool& isLooping) const;
206 206
207 AnimState m_animState; 207 AnimState m_animState;
208 208
209 bool m_isAnimating; // transition/animation requires continual timer f iring 209 bool m_isAnimating; // transition/animation requires continual timer f iring
210 double m_startTime; 210 double m_startTime;
211 double m_pauseTime; 211 double m_pauseTime;
212 double m_requestedStartTime; 212 double m_requestedStartTime;
213 RenderObject* m_object; 213 RenderObject* m_object;
214 214
215 RefPtr<Animation> m_animation; 215 RefPtr<Animation> m_animation;
216 CompositeAnimation* m_compAnim; 216 CompositeAnimation* m_compAnim;
217 bool m_fallbackAnimating; // true if any animation returned false from startAnimation() 217 bool m_fallbackAnimating; // true if any animation returned false from startAnimation()
218 bool m_transformFunctionListValid; 218 bool m_transformFunctionListValid;
219 double m_totalDuration, m_nextIterationDuration; 219 double m_totalDuration, m_nextIterationDuration;
220 220
221 AnimationBase* m_next; 221 AnimationBase* m_next;
222 }; 222 };
223 223
224 } // namespace WebCore 224 } // namespace WebCore
225 225
226 #endif // AnimationBase_h 226 #endif // AnimationBase_h
227 227
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/page/SecurityOrigin.cpp ('k') | third_party/WebKit/WebCore/page/animation/AnimationBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698