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

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

Issue 2757543002: Ensure baseComputedStyle optimisation is cleared during registered custom property animations (Closed)
Patch Set: Rebased Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/AnimationClock.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 public: 50 public:
51 explicit AnimationClock(WTF::TimeFunction monotonicallyIncreasingTime = 51 explicit AnimationClock(WTF::TimeFunction monotonicallyIncreasingTime =
52 WTF::monotonicallyIncreasingTime) 52 WTF::monotonicallyIncreasingTime)
53 : m_monotonicallyIncreasingTime(monotonicallyIncreasingTime), 53 : m_monotonicallyIncreasingTime(monotonicallyIncreasingTime),
54 m_time(0), 54 m_time(0),
55 m_taskForWhichTimeWasCalculated(std::numeric_limits<unsigned>::max()) {} 55 m_taskForWhichTimeWasCalculated(std::numeric_limits<unsigned>::max()) {}
56 56
57 void updateTime(double time); 57 void updateTime(double time);
58 double currentTime(); 58 double currentTime();
59 void resetTimeForTesting(double time = 0); 59 void resetTimeForTesting(double time = 0);
60 void disableSyntheticTimeForTesting() {
61 m_monotonicallyIncreasingTime = nullptr;
62 }
60 63
61 // notifyTaskStart should be called right before the main message loop starts 64 // notifyTaskStart should be called right before the main message loop starts
62 // to run the next task from the message queue. 65 // to run the next task from the message queue.
63 static void notifyTaskStart() { ++s_currentlyRunningTask; } 66 static void notifyTaskStart() { ++s_currentlyRunningTask; }
64 67
65 private: 68 private:
66 WTF::TimeFunction m_monotonicallyIncreasingTime; 69 WTF::TimeFunction m_monotonicallyIncreasingTime;
67 double m_time; 70 double m_time;
68 unsigned m_taskForWhichTimeWasCalculated; 71 unsigned m_taskForWhichTimeWasCalculated;
69 static unsigned s_currentlyRunningTask; 72 static unsigned s_currentlyRunningTask;
70 }; 73 };
71 74
72 } // namespace blink 75 } // namespace blink
73 76
74 #endif // AnimationClock_h 77 #endif // AnimationClock_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/AnimationClock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698