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(); |
} |