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

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: Created 4 years, 8 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: 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..b9a35ff74c9cc833120dce163242a23ebe1d0891 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()
tkent 2016/05/05 23:10:56 We need to add borderLeft() for RTL. Also, we need
AdamB 2016/05/06 04:34:42 Done and added tests. Confirmed that we did have s
- : right - (arrowSize + arrowPadding) * box.styleRef().effectiveZoom();
+ : right - (arrowSize + arrowPadding) * box.styleRef().effectiveZoom() - box.borderRight();
extraParams.menuList.arrowSize = arrowSize * box.styleRef().effectiveZoom();
}
extraParams.menuList.arrowColor = box.resolveColor(CSSPropertyColor).rgb();

Powered by Google App Engine
This is Rietveld 408576698