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

Unified Diff: Source/core/animation/css/CSSAnimations.h

Issue 22123002: Web Animations: Implement CSS Animation events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address feedback. Created 7 years, 4 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 | « Source/core/animation/DocumentTimeline.cpp ('k') | Source/core/animation/css/CSSAnimations.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/css/CSSAnimations.h
diff --git a/Source/core/animation/css/CSSAnimations.h b/Source/core/animation/css/CSSAnimations.h
index e228dce232848a6b13a811a30895f473e53b88c3..feec5dc69292bc3eca523292b551d8311ee3db0b 100644
--- a/Source/core/animation/css/CSSAnimations.h
+++ b/Source/core/animation/css/CSSAnimations.h
@@ -35,6 +35,7 @@
#include "core/animation/Player.h"
#include "core/css/StylePropertySet.h"
+#include "core/dom/Document.h"
#include "core/platform/animation/CSSAnimationData.h"
#include "core/rendering/style/RenderStyleConstants.h"
#include "wtf/HashMap.h"
@@ -78,6 +79,19 @@ public:
private:
typedef HashMap<StringImpl*, Player*> AnimationMap;
AnimationMap m_animations;
+ class EventDelegate FINAL : public TimedItemEventDelegate {
+ public:
+ EventDelegate(Element* target, const AtomicString& name)
+ : m_target(target)
+ , m_name(name)
+ {
+ }
+ virtual void onEventCondition(bool wasInPlay, bool isInPlay, double previousIteration, double currentIteration) OVERRIDE;
+ private:
+ void maybeDispatch(Document::ListenerType, AtomicString& eventName, double elapsedTime);
+ Element* m_target;
+ const AtomicString m_name;
+ };
};
} // namespace WebCore
« no previous file with comments | « Source/core/animation/DocumentTimeline.cpp ('k') | Source/core/animation/css/CSSAnimations.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698