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

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

Issue 2261663002: Disallow cast/implicit conversion from LayoutUnit to int/unsigned (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 4 years, 4 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 952f28a9d4e6aa49792821fe584484f30bf219a9..528b37d4ad0bf4be33b521b87596fb571609f2cd 100644
--- a/third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp
+++ b/third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp
@@ -262,9 +262,9 @@ void ThemePainterDefault::setupMenuListArrow(const LayoutBox& box, const IntRect
if (useMockTheme()) {
// The size and position of the drop-down button is different between
// the mock theme and the regular aura theme.
- int spacingTop = box.borderTop() + box.paddingTop();
- int spacingBottom = box.borderBottom() + box.paddingBottom();
- int spacingRight = box.borderRight() + box.paddingRight();
+ int spacingTop = (box.borderTop() + box.paddingTop()).toInt();
+ int spacingBottom = (box.borderBottom() + box.paddingBottom()).toInt();
+ int spacingRight = (box.borderRight() + box.paddingRight()).toInt();
extraParams.menuList.arrowX = (box.styleRef().direction() == RTL) ? rect.x() + 4 + spacingRight: right - 10 - spacingRight;
extraParams.menuList.arrowSize = rect.height() - spacingBottom - spacingTop;
} else {

Powered by Google App Engine
This is Rietveld 408576698