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

Unified Diff: Source/platform/graphics/GraphicsLayer.cpp

Issue 134443003: Implement CSSOM Smooth Scroll API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 10 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/graphics/GraphicsLayer.cpp
diff --git a/Source/platform/graphics/GraphicsLayer.cpp b/Source/platform/graphics/GraphicsLayer.cpp
index bbaf60a139151ff3397c7544d5bf0d699e8c255c..1ae5f2a95cd570fffe847bdf643b8e8bea88eda2 100644
--- a/Source/platform/graphics/GraphicsLayer.cpp
+++ b/Source/platform/graphics/GraphicsLayer.cpp
@@ -1213,15 +1213,22 @@ void GraphicsLayer::paint(GraphicsContext& context, const IntRect& clip)
}
-void GraphicsLayer::notifyAnimationStarted(double wallClockTime, double monotonicTime, WebAnimation::TargetProperty)
+void GraphicsLayer::notifyAnimationStarted(double wallClockTime, double monotonicTime, WebAnimation::TargetProperty targetProperty)
{
+ if (targetProperty == WebAnimation::TargetPropertyScrollOffset) {
+ if (m_scrollableArea)
+ m_scrollableArea->notifyAnimationStarted(monotonicTime);
+ return;
+ }
+
if (m_client)
m_client->notifyAnimationStarted(this, wallClockTime, monotonicTime);
}
-void GraphicsLayer::notifyAnimationFinished(double, double, WebAnimation::TargetProperty)
+void GraphicsLayer::notifyAnimationFinished(double wallClockTime, double monotonicTime, WebAnimation::TargetProperty targetProperty)
{
- // Do nothing.
+ if (targetProperty == WebAnimation::TargetPropertyScrollOffset && m_scrollableArea)
+ m_scrollableArea->notifyAnimationStarted(monotonicTime);
Ian Vollick 2014/02/06 16:02:31 Hmm. This is confusing at a glance. Could you add
}
void GraphicsLayer::didScroll()

Powered by Google App Engine
This is Rietveld 408576698