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

Unified Diff: third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 2118773002: Respect main thread scrolling reasons for fallback to root layer scrolling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gclient sync to fix compile issue. Created 4 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: 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);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698