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

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

Issue 369793003: Make the web-animations engine use the passed in blink::WebFrameTime values. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing remaining usages of -1 in the code. Created 6 years, 5 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/dom/ScriptedAnimationController.h ('k') | Source/core/page/PageAnimator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ScriptedAnimationController.cpp
diff --git a/Source/core/dom/ScriptedAnimationController.cpp b/Source/core/dom/ScriptedAnimationController.cpp
index f8f6b3b9414a4367be2921e6966a2e2b382d8bdb..60f82b36e5a9ab34048bc5d52aa77e6d51c4d6bb 100644
--- a/Source/core/dom/ScriptedAnimationController.cpp
+++ b/Source/core/dom/ScriptedAnimationController.cpp
@@ -139,14 +139,14 @@ void ScriptedAnimationController::dispatchEvents()
}
}
-void ScriptedAnimationController::executeCallbacks(double monotonicTimeNow)
+void ScriptedAnimationController::executeCallbacks(blink::WebFrameTime frameTime)
{
// dispatchEvents() runs script which can cause the document to be destroyed.
if (!m_document)
return;
- double highResNowMs = 1000.0 * m_document->loader()->timing()->monotonicTimeToZeroBasedDocumentTime(monotonicTimeNow);
- double legacyHighResNowMs = 1000.0 * m_document->loader()->timing()->monotonicTimeToPseudoWallTime(monotonicTimeNow);
+ double highResNowMs = 1000.0 * m_document->loader()->timing()->monotonicTimeToZeroBasedDocumentTime(frameTime.lastFrameTime);
+ double legacyHighResNowMs = 1000.0 * m_document->loader()->timing()->monotonicTimeToPseudoWallTime(frameTime.lastFrameTime);
// First, generate a list of callbacks to consider. Callbacks registered from this point
// on are considered only for the "next" frame, not this one.
@@ -182,7 +182,7 @@ void ScriptedAnimationController::callMediaQueryListListeners()
}
}
-void ScriptedAnimationController::serviceScriptedAnimations(double monotonicTimeNow)
+void ScriptedAnimationController::serviceScriptedAnimations(blink::WebFrameTime frameTime)
{
if (!m_callbacks.size() && !m_eventQueue.size() && !m_mediaQueryListListeners.size())
return;
@@ -194,7 +194,7 @@ void ScriptedAnimationController::serviceScriptedAnimations(double monotonicTime
callMediaQueryListListeners();
dispatchEvents();
- executeCallbacks(monotonicTimeNow);
+ executeCallbacks(frameTime);
scheduleAnimationIfNeeded();
}
« no previous file with comments | « Source/core/dom/ScriptedAnimationController.h ('k') | Source/core/page/PageAnimator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698