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

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: 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/platform/blink_platform.gypi ('k') | Source/platform/scroll/ProgrammaticScrollAnimator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsLayer.cpp
diff --git a/Source/platform/graphics/GraphicsLayer.cpp b/Source/platform/graphics/GraphicsLayer.cpp
index 0bd1c8d990a0c3f36aa18c470d29a5291f5642d0..9f0a8c0b50fdb559092fdf9cb8a6329f226b59bf 100644
--- a/Source/platform/graphics/GraphicsLayer.cpp
+++ b/Source/platform/graphics/GraphicsLayer.cpp
@@ -1105,15 +1105,22 @@ void GraphicsLayer::paint(GraphicsContext& context, const IntRect& clip)
}
-void GraphicsLayer::notifyAnimationStarted(double monotonicTime, WebAnimation::TargetProperty)
+void GraphicsLayer::notifyAnimationStarted(double monotonicTime, WebAnimation::TargetProperty targetProperty)
{
+ if (targetProperty == WebAnimation::TargetPropertyScrollOffset) {
+ if (m_scrollableArea)
+ m_scrollableArea->notifyAnimationStarted(monotonicTime);
+ return;
+ }
if (m_client)
m_client->notifyAnimationStarted(this, monotonicTime);
}
-void GraphicsLayer::notifyAnimationFinished(double, WebAnimation::TargetProperty)
+void GraphicsLayer::notifyAnimationFinished(double monotonicTime, WebAnimation::TargetProperty targetProperty)
{
- // Do nothing.
+ if (targetProperty == WebAnimation::TargetPropertyScrollOffset && m_scrollableArea) {
+ m_scrollableArea->notifyAnimationFinished(monotonicTime);
+ }
}
void GraphicsLayer::didScroll()
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/scroll/ProgrammaticScrollAnimator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698