Index: ui/native_theme/native_theme_aura.cc |
diff --git a/ui/native_theme/native_theme_aura.cc b/ui/native_theme/native_theme_aura.cc |
index 76283878e06a13f8cb77b8adbc90799dfea2aa28..688f821d888f5ef59a6e46b0ca30403ffb118284 100644 |
--- a/ui/native_theme/native_theme_aura.cc |
+++ b/ui/native_theme/native_theme_aura.cc |
@@ -17,6 +17,7 @@ |
#include "ui/gfx/animation/tween.h" |
#include "ui/gfx/canvas.h" |
#include "ui/gfx/color_palette.h" |
+#include "ui/gfx/geometry/insets.h" |
#include "ui/gfx/geometry/rect.h" |
#include "ui/gfx/geometry/size.h" |
#include "ui/gfx/image/image_skia.h" |
@@ -251,7 +252,16 @@ void NativeThemeAura::PaintScrollbarThumb( |
canvas->drawRect(gfx::RectFToSkRect(stroke_rect), flags); |
// Inset the all the edges edges so we fill-in the stroke below. |
- thumb_rect.Inset(kStrokeWidth, kStrokeWidth); |
+ // The edge to which the scrollbar is attached shouldn't have a border. |
+ // For left vertical scrollbar, we will horizontally flip the canvas in |
+ // ScrollbarThemeOverlay::paintThumb. |
+ gfx::Insets insets(kStrokeWidth); |
+ if (part == NativeTheme::kScrollbarHorizontalThumb) |
+ insets -= gfx::Insets(0, 0, kStrokeWidth, 0); |
+ else |
+ insets -= gfx::Insets(0, 0, 0, kStrokeWidth); |
+ |
+ thumb_rect.Inset(insets); |
} else { |
switch (state) { |
case NativeTheme::kDisabled: |