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

Unified Diff: third_party/WebKit/Source/core/layout/shapes/RasterShape.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/layout/shapes/RasterShape.cpp
diff --git a/third_party/WebKit/Source/core/layout/shapes/RasterShape.cpp b/third_party/WebKit/Source/core/layout/shapes/RasterShape.cpp
index a4a1cc3beaec604c1c7a0bf4d057d05c79045160..c99355f452f685da7ba5c5e09271ca10fd08e692 100644
--- a/third_party/WebKit/Source/core/layout/shapes/RasterShape.cpp
+++ b/third_party/WebKit/Source/core/layout/shapes/RasterShape.cpp
@@ -157,8 +157,8 @@ LineSegment RasterShape::getExcludedInterval(LayoutUnit logicalTop, LayoutUnit l
if (intervals.isEmpty())
return LineSegment();
- int y1 = logicalTop;
- int y2 = logicalTop + logicalHeight;
+ int y1 = logicalTop.toInt();
+ int y2 = (logicalTop + logicalHeight).toInt();
ASSERT(y2 >= y1);
if (y2 < intervals.bounds().y() || y1 >= intervals.bounds().maxY())
return LineSegment();
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp ('k') | third_party/WebKit/Source/core/page/FocusController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698