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

Unified Diff: Source/core/animation/DocumentTimeline.cpp

Issue 22123002: Web Animations: Implement CSS Animation events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
Index: Source/core/animation/DocumentTimeline.cpp
diff --git a/Source/core/animation/DocumentTimeline.cpp b/Source/core/animation/DocumentTimeline.cpp
index 0c91f0eb64ec9b7653b92390a4b2cf2afb8a1d26..63ce0b325db16235ec8df9e51cb4cba7e1316036 100644
--- a/Source/core/animation/DocumentTimeline.cpp
+++ b/Source/core/animation/DocumentTimeline.cpp
@@ -71,6 +71,8 @@ void DocumentTimeline::serviceAnimations(double monotonicAnimationStartTime)
if (m_document->view() && !m_players.isEmpty())
m_document->view()->scheduleAnimation();
+
+ dispatchEvents();
}
void DocumentTimeline::pauseAnimationsForTesting(double pauseTime)
@@ -81,4 +83,11 @@ void DocumentTimeline::pauseAnimationsForTesting(double pauseTime)
}
}
+void DocumentTimeline::dispatchEvents()
+{
+ for (size_t i = 0; i < m_events.size(); i++)
+ m_events[i].target->dispatchEvent(m_events[i].event.release());
+ m_events.clear();
+}
+
} // namespace

Powered by Google App Engine
This is Rietveld 408576698