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

Unified Diff: Source/core/rendering/RenderMultiColumnSet.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.h ('k') | Source/core/rendering/shapes/BoxShape.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderMultiColumnSet.cpp
diff --git a/Source/core/rendering/RenderMultiColumnSet.cpp b/Source/core/rendering/RenderMultiColumnSet.cpp
index 9b1394b9a7bb75a0432de1763afe9e4483e9ec9c..697fab41b7bd649f87d22d5df26b1f92912edf59 100644
--- a/Source/core/rendering/RenderMultiColumnSet.cpp
+++ b/Source/core/rendering/RenderMultiColumnSet.cpp
@@ -292,7 +292,7 @@ unsigned RenderMultiColumnSet::columnCount() const
if (!logicalHeightInColumns)
return 1;
- unsigned count = ceil(static_cast<float>(logicalHeightInColumns) / computedColumnHeight());
+ unsigned count = ceil(logicalHeightInColumns.toFloat() / computedColumnHeight().toFloat());
ASSERT(count >= 1);
return count;
}
@@ -331,7 +331,7 @@ unsigned RenderMultiColumnSet::columnIndexAtOffset(LayoutUnit offset, ColumnInde
}
// Just divide by the column height to determine the correct column.
- return static_cast<float>(offset - flowThreadLogicalTop) / computedColumnHeight();
+ return (offset - flowThreadLogicalTop).toFloat() / computedColumnHeight().toFloat();
}
LayoutRect RenderMultiColumnSet::flowThreadPortionRectAt(unsigned index) const
« no previous file with comments | « Source/core/rendering/RenderMultiColumnSet.h ('k') | Source/core/rendering/shapes/BoxShape.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698