Index: third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp |
diff --git a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp |
index 5b625b88bcb94c5507a30e9b1a6f1ce8709eeb48..81519c92079a31e70fb273201e4882bd74ef222b 100644 |
--- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp |
+++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp |
@@ -685,9 +685,12 @@ void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(MainTh |
{ |
if (!m_page->mainFrame()->isLocalFrame() || !m_page->deprecatedLocalMainFrame()->view()) |
return; |
- if (WebLayer* scrollLayer = toWebLayer(m_page->deprecatedLocalMainFrame()->view()->layerForScrolling())) { |
+ GraphicsLayer* layer = m_page->deprecatedLocalMainFrame()->view()->layerForScrolling(); |
+ if (WebLayer* scrollLayer = toWebLayer(layer)) { |
m_lastMainThreadScrollingReasons = mainThreadScrollingReasons; |
if (mainThreadScrollingReasons) { |
+ if (ScrollAnimatorBase* scrollAnimator = layer->scrollableArea()->existingScrollAnimator()) |
+ scrollAnimator->takeoverCompositorAnimation(); |
scrollLayer->addMainThreadScrollingReasons(mainThreadScrollingReasons); |
} else { |
// Clear all main thread scrolling reasons except the one that's set |