Chromium Code Reviews| 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 4b444f9b9237fa328f1dcbec4003f9b4d6c1f077..98788a98b0c73df40eaa0ba0f384a2d9d5be4d19 100644 |
| --- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp |
| +++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp |
| @@ -671,6 +671,7 @@ void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(MainTh |
| if (!m_page->mainFrame()->isLocalFrame() || !m_page->deprecatedLocalMainFrame()->view()) |
| return; |
| + WebLayer* visualViewportScrollLayer = toWebLayer(m_page->frameHost().visualViewport().scrollLayer()); |
| GraphicsLayer* layer = m_page->deprecatedLocalMainFrame()->view()->layerForScrolling(); |
| if (WebLayer* scrollLayer = toWebLayer(layer)) { |
| m_lastMainThreadScrollingReasons = mainThreadScrollingReasons; |
| @@ -680,12 +681,16 @@ void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(MainTh |
| scrollAnimator->takeOverCompositorAnimation(); |
| } |
| scrollLayer->addMainThreadScrollingReasons(mainThreadScrollingReasons); |
| + if (visualViewportScrollLayer) |
| + visualViewportScrollLayer->addMainThreadScrollingReasons(mainThreadScrollingReasons); |
|
bokan
2016/07/01 19:02:28
I think we need to do the above animation takeover
Eric Seckler
2016/07/04 08:33:26
Seems like you're right. Added the take-over, but
ymalik
2016/07/04 13:52:07
Yes, the takeover for the visual viewport will ens
|
| } else { |
| // Clear all main thread scrolling reasons except the one that's set |
| // if there is a running scroll animation. |
| uint32_t mainThreadScrollingReasonsToClear = ~0u; |
| mainThreadScrollingReasonsToClear &= ~MainThreadScrollingReason::kAnimatingScrollOnMainThread; |
| scrollLayer->clearMainThreadScrollingReasons(mainThreadScrollingReasonsToClear); |
| + if (visualViewportScrollLayer) |
| + visualViewportScrollLayer->clearMainThreadScrollingReasons(mainThreadScrollingReasonsToClear); |
| } |
| } |
| } |