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

Unified Diff: third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp

Issue 1931273003: Fix arrow placement on menulist with padding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed RTL and added tests Created 4 years, 7 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 | « third_party/WebKit/LayoutTests/fast/forms/select/menulist-appearance-basic.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp
diff --git a/third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp b/third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp
index 7191690bf02b5491a83dfc4a43c5fde14f43c4bd..2bde7848091374972321d5ff258f185c13388efb 100644
--- a/third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp
+++ b/third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp
@@ -269,10 +269,10 @@ void ThemePainterDefault::setupMenuListArrow(const LayoutBox& box, const IntRect
extraParams.menuList.arrowSize = rect.height() - spacingBottom - spacingTop;
} else {
const int arrowSize = 6;
- const int arrowPadding = 7;
+ const int arrowPadding = 6;
extraParams.menuList.arrowX = (box.styleRef().direction() == RTL)
- ? rect.x() + arrowPadding * box.styleRef().effectiveZoom()
- : right - (arrowSize + arrowPadding) * box.styleRef().effectiveZoom();
+ ? rect.x() + arrowPadding * box.styleRef().effectiveZoom() + box.borderLeft()
+ : right - (arrowSize + arrowPadding) * box.styleRef().effectiveZoom() - box.borderRight();
extraParams.menuList.arrowSize = arrowSize * box.styleRef().effectiveZoom();
}
extraParams.menuList.arrowColor = box.resolveColor(CSSPropertyColor).rgb();
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/select/menulist-appearance-basic.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698