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

Unified Diff: third_party/WebKit/Source/core/frame/VisualViewport.cpp

Issue 2728253002: Remove indirection: setup scrollbar scroll layers in the scrollbar constructor (Closed)
Patch Set: Really fix reivewer comment Created 3 years, 9 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/frame/VisualViewport.cpp
diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
index 577f983bd17f77e613d0310fbb297e86793411fe..c14a23d716f2697cb07e40e05586b09a857e2854 100644
--- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
+++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
@@ -453,8 +453,10 @@ void VisualViewport::setupScrollbar(WebScrollbar::Orientation orientation) {
ASSERT(coordinator);
ScrollbarOrientation webcoreOrientation =
isHorizontal ? HorizontalScrollbar : VerticalScrollbar;
+ WebLayer* scrollLayer = layerForScrolling()->platformLayer();
webScrollbarLayer = coordinator->createSolidColorScrollbarLayer(
- webcoreOrientation, thumbThickness, scrollbarMargin, false);
+ webcoreOrientation, thumbThickness, scrollbarMargin, false,
+ scrollLayer);
// The compositor will control the scrollbar's visibility. Set to invisible
// by default so scrollbars don't show up in layout tests.
@@ -485,14 +487,6 @@ void VisualViewport::setupScrollbar(WebScrollbar::Orientation orientation) {
scrollbarGraphicsLayer->setContentsRect(IntRect(0, 0, width, height));
}
-void VisualViewport::setScrollLayerOnScrollbars(WebLayer* scrollLayer) const {
- // TODO(bokan): This is currently done while registering viewport layers
- // with the compositor but could it actually be done earlier, like in
- // setupScrollbars? Then we wouldn't need this method.
- m_webOverlayScrollbarHorizontal->setScrollLayer(scrollLayer);
- m_webOverlayScrollbarVertical->setScrollLayer(scrollLayer);
-}
-
bool VisualViewport::visualViewportSuppliesScrollbars() const {
return frameHost().page().settings().getViewportEnabled();
}

Powered by Google App Engine
This is Rietveld 408576698