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

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

Issue 1648293003: Fix smooth scroll jump when switching scroll handling between MT and CC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: finish animations on main Created 4 years, 11 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 3a64da20ff27cc8540beb7a5f16fa4fe72774714..20161f39fc8c9278990600bbb224cbb67e9e34bb 100644
--- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -344,8 +344,7 @@ void ScrollingCoordinator::scrollableAreaScrollbarLayerDidChange(ScrollableArea*
if (!platformSupportsCoordinatedScrollbar) {
if (scrollbarGraphicsLayer) {
- WebLayer* scrollbarLayer = toWebLayer(scrollbarGraphicsLayer);
- scrollbarLayer->addMainThreadScrollingReasons(MainThreadScrollingReason::kScrollbarScrolling);
+ scrollbarGraphicsLayer->setMainThreadScrollingReasons(MainThreadScrollingReason::kScrollbarScrolling);
ajuma 2016/02/04 15:05:48 Is changing this from adding a reason to replacing
}
return;
}
@@ -684,12 +683,9 @@ void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(MainTh
{
if (!m_page->mainFrame()->isLocalFrame() || !m_page->deprecatedLocalMainFrame()->view())
return;
- if (WebLayer* scrollLayer = toWebLayer(m_page->deprecatedLocalMainFrame()->view()->layerForScrolling())) {
+ if (GraphicsLayer* scrollLayer = m_page->deprecatedLocalMainFrame()->view()->layerForScrolling()) {
m_lastMainThreadScrollingReasons = mainThreadScrollingReasons;
- if (mainThreadScrollingReasons)
- scrollLayer->addMainThreadScrollingReasons(mainThreadScrollingReasons);
- else
- scrollLayer->clearMainThreadScrollingReasons();
+ scrollLayer->setMainThreadScrollingReasons(mainThreadScrollingReasons);
}
}

Powered by Google App Engine
This is Rietveld 408576698