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 0c721230e8ad8fef061e7e26d93750e25edbb607..970e26a12dd3a76062c2a489a7c45ecbf0bbde5c 100644 |
--- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp |
+++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp |
@@ -345,9 +345,16 @@ static std::unique_ptr<WebScrollbarLayer> createScrollbarLayer( |
std::unique_ptr<WebScrollbarThemeGeometry> geometry( |
WebScrollbarThemeGeometryNative::create(theme)); |
- std::unique_ptr<WebScrollbarLayer> scrollbarLayer = |
- Platform::current()->compositorSupport()->createScrollbarLayer( |
- WebScrollbarImpl::create(&scrollbar), painter, std::move(geometry)); |
+ std::unique_ptr<WebScrollbarLayer> scrollbarLayer; |
+ if (theme.usesOverlayScrollbars() && theme.usesNinePatchThumbResource()) { |
+ scrollbarLayer = |
+ Platform::current()->compositorSupport()->createOverlayScrollbarLayer( |
+ WebScrollbarImpl::create(&scrollbar), painter, std::move(geometry)); |
+ } else { |
+ scrollbarLayer = |
+ Platform::current()->compositorSupport()->createScrollbarLayer( |
+ WebScrollbarImpl::create(&scrollbar), painter, std::move(geometry)); |
+ } |
GraphicsLayer::registerContentsLayer(scrollbarLayer->layer()); |
return scrollbarLayer; |
} |