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

Unified Diff: third_party/WebKit/Source/core/paint/BoxPainter.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/BoxPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/BoxPainter.cpp b/third_party/WebKit/Source/core/paint/BoxPainter.cpp
index d5283b61c3b706ed723fee26a349873dd6775d51..5e677c920e09b98bb7f6c2b5faab987c19a8ae9b 100644
--- a/third_party/WebKit/Source/core/paint/BoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/BoxPainter.cpp
@@ -278,7 +278,8 @@ FloatRoundedRect getBackgroundRoundedRect(const LayoutObject& obj, const LayoutR
{
FloatRoundedRect border = obj.style()->getRoundedBorderFor(borderRect, includeLogicalLeftEdge, includeLogicalRightEdge);
if (box && (box->nextLineBox() || box->prevLineBox())) {
- FloatRoundedRect segmentBorder = obj.style()->getRoundedBorderFor(LayoutRect(0, 0, inlineBoxWidth, inlineBoxHeight),
+ // TODO(crbug.com/638981): Are the conversions to int (in LayoutRect(0, 0, ...)) intentional?
Stephen Chennney 2016/08/22 17:46:10 Yes, in this case I believe they are.
Xianzhu 2016/08/22 18:14:37 Done.
+ FloatRoundedRect segmentBorder = obj.style()->getRoundedBorderFor(LayoutRect(0, 0, inlineBoxWidth.toInt(), inlineBoxHeight.toInt()),
includeLogicalLeftEdge, includeLogicalRightEdge);
border.setRadii(segmentBorder.getRadii());
}

Powered by Google App Engine
This is Rietveld 408576698