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

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

Issue 2326643002: Use monotonic time instead of current time in autoscroll controller (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/AutoscrollController.cpp
diff --git a/third_party/WebKit/Source/core/page/AutoscrollController.cpp b/third_party/WebKit/Source/core/page/AutoscrollController.cpp
index 0934143858f7592725af5e51b1c6fdde30aaa720..8acd36cb410057bfbf3ed01cc2219fe4e09718e6 100644
--- a/third_party/WebKit/Source/core/page/AutoscrollController.cpp
+++ b/third_party/WebKit/Source/core/page/AutoscrollController.cpp
@@ -233,8 +233,6 @@ bool AutoscrollController::panScrollInProgress() const
}
#endif
-// FIXME: This would get get better animation fidelity if it used the monotonicFrameBeginTime instead
-// of WTF::currentTime().
void AutoscrollController::animate(double)
{
if (!m_autoscrollLayoutObject) {
@@ -244,7 +242,7 @@ void AutoscrollController::animate(double)
switch (m_autoscrollType) {
case AutoscrollForDragAndDrop:
- if (WTF::currentTime() - m_dragAndDropAutoscrollStartTime > autoscrollDelay)
+ if (WTF::monotonicallyIncreasingTime() - m_dragAndDropAutoscrollStartTime > autoscrollDelay)
dtapuska 2016/09/08 18:09:51 You are going to have to adjust the initialization
dtapuska 2016/09/08 18:16:27 Nevermind it appears that the m_dragAndDropAutoscr
m_autoscrollLayoutObject->autoscroll(m_dragAndDropAutoscrollReferencePosition);
break;
case AutoscrollForSelection:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698