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

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: Address aelias@'s review 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 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;
}

Powered by Google App Engine
This is Rietveld 408576698