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

Unified Diff: Source/platform/geometry/LayoutSize.h

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/platform/geometry/FloatSize.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/geometry/LayoutSize.h
diff --git a/Source/platform/geometry/LayoutSize.h b/Source/platform/geometry/LayoutSize.h
index c950cf535102e968382ba618cd2751e40376812b..208b47dd47b80a7c3a6256ba4d798afd7bf4c7f1 100644
--- a/Source/platform/geometry/LayoutSize.h
+++ b/Source/platform/geometry/LayoutSize.h
@@ -61,7 +61,7 @@ public:
bool isEmpty() const { return m_width.rawValue() <= 0 || m_height.rawValue() <= 0; }
bool isZero() const { return !m_width && !m_height; }
- float aspectRatio() const { return static_cast<float>(m_width) / static_cast<float>(m_height); }
+ float aspectRatio() const { return m_width.toFloat() / m_height.toFloat(); }
void expand(LayoutUnit width, LayoutUnit height)
{
« no previous file with comments | « Source/platform/geometry/FloatSize.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698