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

Unified Diff: Source/core/html/ImageDocument.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/frame/FrameView.cpp ('k') | Source/core/page/SpatialNavigation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/ImageDocument.cpp
diff --git a/Source/core/html/ImageDocument.cpp b/Source/core/html/ImageDocument.cpp
index 193cbab3c9c63b704fa9eae7c33ac516f59d6d63..2782a6d71b09006be3fb1740f419a40c3ca63fe0 100644
--- a/Source/core/html/ImageDocument.cpp
+++ b/Source/core/html/ImageDocument.cpp
@@ -227,8 +227,8 @@ float ImageDocument::scale() const
LayoutSize imageSize = m_imageElement->cachedImage()->imageSizeForRenderer(m_imageElement->renderer(), pageZoomFactor(this));
LayoutSize windowSize = LayoutSize(view->width(), view->height());
- float widthScale = (float)windowSize.width() / imageSize.width();
- float heightScale = (float)windowSize.height() / imageSize.height();
+ float widthScale = windowSize.width().toFloat() / imageSize.width().toFloat();
+ float heightScale = windowSize.height().toFloat() / imageSize.height().toFloat();
return min(widthScale, heightScale);
}
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/page/SpatialNavigation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698