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

Unified Diff: Source/core/dom/Document.cpp

Issue 73643004: Web Animations: Extract an API for servicing animations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 11fb670e5de0b8bdd1eeadaf2329cea515e435b5..f28257896fdd44c7c8032637f2c167df7d23e630 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -43,6 +43,7 @@
#include "bindings/v8/ScriptController.h"
#include "core/accessibility/AXObjectCache.h"
#include "core/animation/AnimationClock.h"
+#include "core/animation/DocumentAnimations.h"
#include "core/animation/DocumentTimeline.h"
#include "core/animation/css/TransitionTimeline.h"
#include "core/css/CSSDefaultStyleSheets.h"
@@ -1508,27 +1509,6 @@ PassRefPtr<TreeWalker> Document::createTreeWalker(Node* root, unsigned whatToSho
return TreeWalker::create(root, whatToShow, filter);
}
-void Document::serviceAnimations(double monotonicAnimationStartTime)
-{
- if (!RuntimeEnabledFeatures::webAnimationsEnabled())
- return;
-
- animationClock().updateTime(monotonicAnimationStartTime);
- bool didTriggerStyleRecalc = timeline()->serviceAnimations();
- didTriggerStyleRecalc |= transitionTimeline()->serviceAnimations();
- if (!didTriggerStyleRecalc)
- animationClock().unfreeze();
-}
-
-void Document::dispatchAnimationEvents()
-{
- if (!RuntimeEnabledFeatures::webAnimationsEnabled())
- return;
-
- timeline()->dispatchEvents();
- transitionTimeline()->dispatchEvents();
-}
-
void Document::scheduleStyleRecalc()
{
if (shouldDisplaySeamlesslyWithParent()) {
@@ -1772,9 +1752,7 @@ void Document::updateStyleIfNeeded()
AnimationUpdateBlock animationUpdateBlock(m_frame ? &m_frame->animation() : 0);
recalcStyle(NoChange);
- if (RuntimeEnabledFeatures::webAnimationsEnabled())
- cssPendingAnimations().startPendingAnimations();
- m_animationClock->unfreeze();
+ DocumentAnimations::serviceAfterStyleRecalc(*this);
}
void Document::updateStyleForNodeIfNeeded(Node* node)
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698