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

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

Issue 2591863003: Use nine-patch resource for drawing Aura overlay scrollbar thumb. (Closed)
Patch Set: Move CheckGeometryLimitations back to where it used to be (AppendQuads) Created 3 years, 10 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 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;
}

Powered by Google App Engine
This is Rietveld 408576698