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

Side by Side Diff: Source/core/animation/AnimationClock.h

Issue 46043014: Web Animations CSS: Unfreeze AnimationClock if sampling timelines does not trigger style recalc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Really fix unit tests 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 27 matching lines...) Expand all
38 38
39 class AnimationClock { 39 class AnimationClock {
40 public: 40 public:
41 static PassOwnPtr<AnimationClock> create(WTF::TimeFunction monotonicallyIncr easingTime = WTF::monotonicallyIncreasingTime) 41 static PassOwnPtr<AnimationClock> create(WTF::TimeFunction monotonicallyIncr easingTime = WTF::monotonicallyIncreasingTime)
42 { 42 {
43 return adoptPtr(new AnimationClock(monotonicallyIncreasingTime)); 43 return adoptPtr(new AnimationClock(monotonicallyIncreasingTime));
44 } 44 }
45 45
46 void updateTime(double time) 46 void updateTime(double time)
47 { 47 {
48 ASSERT(m_time <= time);
Timothy Loh 2013/10/30 03:55:07 Could you mention why we're removing this asserti
Steve Block 2013/11/01 03:04:59 I removed it because we were hitting it in some un
49 m_time = time; 48 m_time = time;
50 m_frozen = true; 49 m_frozen = true;
51 } 50 }
52 51
53 double currentTime() 52 double currentTime()
54 { 53 {
55 if (!m_frozen) 54 if (!m_frozen)
56 updateTime(m_monotonicallyIncreasingTime()); 55 updateTime(m_monotonicallyIncreasingTime());
57 return m_time; 56 return m_time;
58 } 57 }
(...skipping 10 matching lines...) Expand all
69 { 68 {
70 } 69 }
71 WTF::TimeFunction m_monotonicallyIncreasingTime; 70 WTF::TimeFunction m_monotonicallyIncreasingTime;
72 double m_time; 71 double m_time;
73 bool m_frozen; 72 bool m_frozen;
74 }; 73 };
75 74
76 } // namespace WebCore 75 } // namespace WebCore
77 76
78 #endif // AnimationClock_h 77 #endif // AnimationClock_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698