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

Unified Diff: Source/core/animation/AnimationPlayer.h

Issue 534193002: Web-Animations: Implement idle state for AnimationPlayers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/animation/AnimationPlayer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimationPlayer.h
diff --git a/Source/core/animation/AnimationPlayer.h b/Source/core/animation/AnimationPlayer.h
index 98b6af0bc7175930cb23dc1ab1a86c4acba1b440..8cdfc587e056eb663721cb245f08012bb29f1e1b 100644
--- a/Source/core/animation/AnimationPlayer.h
+++ b/Source/core/animation/AnimationPlayer.h
@@ -85,8 +85,8 @@ public:
void play();
void reverse();
void finish(ExceptionState&);
- bool finished() { return limited(currentTimeInternal()); }
- bool playing() { return !(finished() || m_paused || m_isPausedForTesting); }
+ bool finished() { return !m_idle && limited(currentTimeInternal()); }
+ bool playing() { return !(finished() || m_paused || m_isPausedForTesting || m_idle); }
// FIXME: Resolve whether finished() should just return the flag, and
// remove this method.
bool finishedInternal() const { return m_finished; }
@@ -210,12 +210,23 @@ private:
CompositorAction pendingAction;
};
+ void uncancel()
+ {
+ if (m_idle) {
+ m_idle = false;
+ m_finished = false;
+ m_held = true;
+ m_holdTime = 0;
+ }
+ }
+
// This mirrors the known compositor state. It is created when a compositor
// animation is started. Updated once the start time is known and each time
// modifications are pushed to the compositor.
OwnPtr<CompositorState> m_compositorState;
bool m_compositorPending;
bool m_currentTimePending;
+ bool m_idle;
};
} // namespace blink
« no previous file with comments | « no previous file | Source/core/animation/AnimationPlayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698