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

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

Issue 2144303002: Made layout viewport scroll updates from compositor work like ordinary layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rootScrollerOnCompositor
Patch Set: Initialize ScrollUpdateInfo's layer id in constructor Created 4 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
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 9a5c80ba78dbabdc2bf721bf4208001c30c0bcae..3f17def74ed5ab02653896f7bb29a4e86d5b3893 100644
--- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -386,8 +386,11 @@ bool ScrollingCoordinator::scrollableAreaScrollLayerDidChange(ScrollableArea* sc
GraphicsLayer* scrollLayer = scrollableArea->layerForScrolling();
- if (scrollLayer)
- scrollLayer->setScrollableArea(scrollableArea, isForViewport(scrollableArea));
+ if (scrollLayer) {
+ bool isForVisualViewport =
+ scrollableArea == &m_page->frameHost().visualViewport();
+ scrollLayer->setScrollableArea(scrollableArea, isForVisualViewport);
+ }
WebLayer* webLayer = toWebLayer(scrollableArea->layerForScrolling());
WebLayer* containerLayer = toWebLayer(scrollableArea->layerForContainer());
@@ -934,15 +937,6 @@ bool ScrollingCoordinator::isForMainFrame(ScrollableArea* scrollableArea) const
return scrollableArea == m_page->deprecatedLocalMainFrame()->view();
}
-bool ScrollingCoordinator::isForViewport(ScrollableArea* scrollableArea) const
-{
- bool isForOuterViewport = m_page->settings().rootLayerScrolls() ?
- isForRootLayer(scrollableArea) :
- isForMainFrame(scrollableArea);
-
- return isForOuterViewport || scrollableArea == &m_page->frameHost().visualViewport();
-}
-
void ScrollingCoordinator::frameViewRootLayerDidChange(FrameView* frameView)
{
ASSERT(isMainThread());

Powered by Google App Engine
This is Rietveld 408576698