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

Unified Diff: Source/platform/scroll/ScrollAnimatorNone.cpp

Issue 246293006: Blink Support for Overlay Scrollbar Animation Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix try server compile error 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/platform/scroll/ScrollAnimatorNone.cpp
diff --git a/Source/platform/scroll/ScrollAnimatorNone.cpp b/Source/platform/scroll/ScrollAnimatorNone.cpp
index 3a4e7ed612ec125298409c4e4f983f0f837d8ffb..883e2c7c62cd1d748fa882dfd3b1151b2ab5d2e9 100644
--- a/Source/platform/scroll/ScrollAnimatorNone.cpp
+++ b/Source/platform/scroll/ScrollAnimatorNone.cpp
@@ -32,21 +32,24 @@
#include "platform/scroll/ScrollAnimatorNone.h"
-#include <algorithm>
+#include "platform/TraceEvent.h"
#include "platform/scroll/ScrollableArea.h"
#include "wtf/CurrentTime.h"
#include "wtf/PassOwnPtr.h"
-
-#include "platform/TraceEvent.h"
+#include <algorithm>
using namespace std;
-namespace WebCore {
+namespace {
const double kFrameRate = 60;
const double kTickTime = 1 / kFrameRate;
const double kMinimumTimerInterval = .001;
+} // namespace
+
+namespace WebCore {
+
PassOwnPtr<ScrollAnimator> ScrollAnimator::create(ScrollableArea* scrollableArea)
{
if (scrollableArea && scrollableArea->scrollAnimatorEnabled())
@@ -490,6 +493,7 @@ void ScrollAnimatorNone::animationTimerFired()
double currentTime = WTF::monotonicallyIncreasingTime();
bool continueAnimation = false;
+
if (m_horizontalData.m_startTime && m_horizontalData.animateScroll(currentTime))
continueAnimation = true;
if (m_verticalData.m_startTime && m_verticalData.animateScroll(currentTime))

Powered by Google App Engine
This is Rietveld 408576698