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 de68c2a83cc0d2c6f0c380423af48cfda5970320..9b70d9ee8d9070976af25ddfc8021a21c96ed689 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; |
} |