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

Unified Diff: Source/core/rendering/shapes/BoxShape.cpp

Issue 200023002: Making LayoutUnit conversions to Float type explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase to trunk Created 6 years, 9 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 | « Source/core/rendering/RenderMultiColumnSet.cpp ('k') | Source/core/rendering/shapes/PolygonShape.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/shapes/BoxShape.cpp
diff --git a/Source/core/rendering/shapes/BoxShape.cpp b/Source/core/rendering/shapes/BoxShape.cpp
index 563814048bfcf1f563b1e4b1f3f7de09ce59a0da..5211a5756a087d01652244078369563102db2069 100644
--- a/Source/core/rendering/shapes/BoxShape.cpp
+++ b/Source/core/rendering/shapes/BoxShape.cpp
@@ -76,8 +76,8 @@ void BoxShape::getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHei
if (marginBounds.isEmpty() || !lineOverlapsShapeMarginBounds(logicalTop, logicalHeight))
return;
- float y1 = logicalTop;
- float y2 = logicalTop + logicalHeight;
+ float y1 = logicalTop.toFloat();
+ float y2 = (logicalTop + logicalHeight).toFloat();
const FloatRect& rect = marginBounds.rect();
if (!marginBounds.isRounded()) {
@@ -118,8 +118,8 @@ void BoxShape::getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logicalHei
if (paddingBounds.isEmpty())
return;
- float y1 = logicalTop;
- float y2 = logicalTop + logicalHeight;
+ float y1 = logicalTop.toFloat();
+ float y2 = (logicalTop + logicalHeight).toFloat();
const FloatRect& rect = paddingBounds.rect();
if (y1 < rect.y() || y2 > rect.maxY())
« no previous file with comments | « Source/core/rendering/RenderMultiColumnSet.cpp ('k') | Source/core/rendering/shapes/PolygonShape.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698