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

Unified Diff: Source/core/rendering/shapes/PolygonShape.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/shapes/BoxShape.cpp ('k') | Source/core/rendering/shapes/Shape.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/shapes/PolygonShape.cpp
diff --git a/Source/core/rendering/shapes/PolygonShape.cpp b/Source/core/rendering/shapes/PolygonShape.cpp
index 512ae142cd5531051120b82cb4c3204d5396087a..2e69638aae57da2f1f77297ccdd23a3af8ef6264 100644
--- a/Source/core/rendering/shapes/PolygonShape.cpp
+++ b/Source/core/rendering/shapes/PolygonShape.cpp
@@ -368,8 +368,8 @@ void PolygonShape::getExcludedIntervals(LayoutUnit logicalTop, LayoutUnit logica
if (polygon.isEmpty())
return;
- float y1 = logicalTop;
- float y2 = logicalTop + logicalHeight;
+ float y1 = logicalTop.toFloat();
+ float y2 = (logicalTop + logicalHeight).toFloat();
FloatShapeIntervals y1XIntervals, y2XIntervals;
computeXIntersections(polygon, y1, true, y1XIntervals);
@@ -396,8 +396,8 @@ void PolygonShape::getIncludedIntervals(LayoutUnit logicalTop, LayoutUnit logica
if (polygon.isEmpty())
return;
- float y1 = logicalTop;
- float y2 = logicalTop + logicalHeight;
+ float y1 = logicalTop.toFloat();
+ float y2 = (logicalTop + logicalHeight).toFloat();
FloatShapeIntervals y1XIntervals, y2XIntervals;
computeXIntersections(polygon, y1, true, y1XIntervals);
@@ -444,7 +444,7 @@ static inline bool aboveOrToTheLeft(const FloatRect& r1, const FloatRect& r2)
bool PolygonShape::firstIncludedIntervalLogicalTop(LayoutUnit minLogicalIntervalTop, const FloatSize& minLogicalIntervalSize, LayoutUnit& result) const
{
- float minIntervalTop = minLogicalIntervalTop;
+ float minIntervalTop = minLogicalIntervalTop.toFloat();
float minIntervalHeight = minLogicalIntervalSize.height();
float minIntervalWidth = minLogicalIntervalSize.width();
« no previous file with comments | « Source/core/rendering/shapes/BoxShape.cpp ('k') | Source/core/rendering/shapes/Shape.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698