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

Unified Diff: Source/core/page/AutoscrollController.cpp

Issue 321373003: Changing animate to beginFrame and use struct rather than naked double to allow extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing Adam+Shane's feedback. Created 6 years, 6 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/page/AutoscrollController.cpp
diff --git a/Source/core/page/AutoscrollController.cpp b/Source/core/page/AutoscrollController.cpp
index b168e004358d3900383afe94cb11b03e3400d767..0a45e1e756ca3f4fc53a46577920aba94f3563fa 100644
--- a/Source/core/page/AutoscrollController.cpp
+++ b/Source/core/page/AutoscrollController.cpp
@@ -215,7 +215,7 @@ bool AutoscrollController::panScrollInProgress() const
// FIXME: This would get get better animation fidelity if it used the monotonicFrameBeginTime instead
// of WTF::currentTime().
-void AutoscrollController::animate(double)
+void AutoscrollController::animate(blink::WebFrameTime frameTime)
{
if (!m_autoscrollRenderer) {
stopAutoscroll();
@@ -225,7 +225,7 @@ void AutoscrollController::animate(double)
EventHandler& eventHandler = m_autoscrollRenderer->frame()->eventHandler();
switch (m_autoscrollType) {
case AutoscrollForDragAndDrop:
- if (WTF::currentTime() - m_dragAndDropAutoscrollStartTime > autoscrollDelay)
+ if (frameTime.displayFrameTime - m_dragAndDropAutoscrollStartTime > autoscrollDelay)
picksi 2014/06/24 10:10:26 Not sure on the rules as to why WebFrametime is a
mithro-old 2014/07/01 06:04:41 See my previous comments.
m_autoscrollRenderer->autoscroll(m_dragAndDropAutoscrollReferencePosition);
break;
case AutoscrollForSelection:

Powered by Google App Engine
This is Rietveld 408576698