Chromium Code Reviews| Index: third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.mm |
| diff --git a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.mm b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.mm |
| index 7b8c08cb22356b66ae2de29293c82575301d1fd0..88c92c377cb7d67cb53f5accb11b736f57d456b0 100644 |
| --- a/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.mm |
| +++ b/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.mm |
| @@ -293,7 +293,16 @@ void ScrollbarThemeMac::paintThumb(GraphicsContext& context, |
| ScrollbarPainter scrollbarPainter = painterForScrollbar(scrollbar); |
| [scrollbarPainter setEnabled:scrollbar.enabled()]; |
| - [scrollbarPainter setBoundsSize:NSSizeFromCGSize(rect.size())]; |
| + // drawKnob aligns the thumb to right side of the draw rect. |
| + // If the vertical overlay scrollbar is on the left, use trackWidth instead |
| + // of scrollbar width, to avoid the gap on the left side of the thumb. |
|
jbroman
2016/11/22 23:21:54
One question here: what happens if the Mac system
sahel
2016/11/23 18:22:07
I set the OS language to Farsi. The window scrollb
|
| + IntRect drawRect = IntRect(rect); |
| + if (usesOverlayScrollbars() && scrollbar.isLeftSideVerticalScrollbar()) { |
| + int thumbWidth = [scrollbarPainter trackWidth]; |
| + drawRect.setWidth(thumbWidth); |
| + } |
| + [scrollbarPainter setBoundsSize:NSSizeFromCGSize(drawRect.size())]; |
| + |
| [scrollbarPainter setDoubleValue:0]; |
| [scrollbarPainter setKnobProportion:1]; |