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

Unified Diff: Source/core/platform/ScrollbarThemeOverlay.cpp

Issue 23480037: Fix RTL scroll bars being misrendered on Android. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: isLeftSideVerticalScrollbar Created 7 years, 3 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: Source/core/platform/ScrollbarThemeOverlay.cpp
diff --git a/Source/core/platform/ScrollbarThemeOverlay.cpp b/Source/core/platform/ScrollbarThemeOverlay.cpp
index b1869343acb6b453a5806ca89b66656b6b71d39f..97151de64a3f143f79b6d396b1d74dc73d11bb99 100644
--- a/Source/core/platform/ScrollbarThemeOverlay.cpp
+++ b/Source/core/platform/ScrollbarThemeOverlay.cpp
@@ -107,10 +107,13 @@ IntRect ScrollbarThemeOverlay::trackRect(ScrollbarThemeClient* scrollbar, bool)
void ScrollbarThemeOverlay::paintThumb(GraphicsContext* context, ScrollbarThemeClient* scrollbar, const IntRect& rect)
{
IntRect thumbRect = rect;
- if (scrollbar->orientation() == HorizontalScrollbar)
+ if (scrollbar->orientation() == HorizontalScrollbar) {
thumbRect.setHeight(thumbRect.height() - m_scrollbarMargin);
- else
+ } else {
thumbRect.setWidth(thumbRect.width() - m_scrollbarMargin);
+ if (scrollbar->isLeftSideVerticalScrollbar())
+ thumbRect.setX(thumbRect.x() + m_scrollbarMargin);
+ }
context->fillRect(thumbRect, m_color);
}

Powered by Google App Engine
This is Rietveld 408576698