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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp

Issue 2763373002: Overlay scrollbars flush with window edge (Closed)
Patch Set: evan and bokan comments addressed Created 3 years, 9 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
« no previous file with comments | « no previous file | ui/native_theme/native_theme_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp
index 30ba2b9554699d95115ee07d6d3ed8f1506b2dd7..b7a3838cf7313d5f5c382bb9fb4857971bdff0cc 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp
@@ -205,8 +205,18 @@ void ScrollbarThemeOverlay::paintThumb(GraphicsContext& context,
static_cast<WebScrollbarOverlayColorTheme>(
scrollbar.getScrollbarOverlayColorTheme());
+ // Horizontally flip the canvas if it is left vertical scrollbar.
jbroman 2017/03/29 20:51:35 Is the scrollbar guaranteed to be horizontally sym
+ if (scrollbar.isLeftSideVerticalScrollbar()) {
+ canvas->save();
+ canvas->translate(canvas->getBaseLayerSize().width(), 0);
+ canvas->scale(-1, 1);
+ }
+
Platform::current()->themeEngine()->paint(canvas, part, state, WebRect(rect),
&params);
+
+ if (scrollbar.isLeftSideVerticalScrollbar())
+ canvas->restore();
}
ScrollbarPart ScrollbarThemeOverlay::hitTest(
« no previous file with comments | « no previous file | ui/native_theme/native_theme_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698