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

Unified Diff: third_party/WebKit/Source/core/html/ImageDocument.cpp

Issue 2261663002: Disallow cast/implicit conversion from LayoutUnit to int/unsigned (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 4 years, 4 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
Index: third_party/WebKit/Source/core/html/ImageDocument.cpp
diff --git a/third_party/WebKit/Source/core/html/ImageDocument.cpp b/third_party/WebKit/Source/core/html/ImageDocument.cpp
index 0e71f636fcfd525304a5ad21de938bd6d8ab5102..d3fb21bb4965fa5cbc3f17601c632912be9995ae 100644
--- a/third_party/WebKit/Source/core/html/ImageDocument.cpp
+++ b/third_party/WebKit/Source/core/html/ImageDocument.cpp
@@ -330,8 +330,8 @@ void ImageDocument::restoreImageSize(ScaleType type)
DCHECK(m_imageElement->cachedImage());
LayoutSize imageSize = m_imageElement->cachedImage()->imageSize(LayoutObject::shouldRespectImageOrientation(m_imageElement->layoutObject()), 1.0f);
- m_imageElement->setWidth(imageSize.width());
- m_imageElement->setHeight(imageSize.height());
+ m_imageElement->setWidth(imageSize.width().toInt());
+ m_imageElement->setHeight(imageSize.height().toInt());
if (imageFitsInWindow())
m_imageElement->removeInlineStyleProperty(CSSPropertyCursor);
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLImageElement.cpp ('k') | third_party/WebKit/Source/core/html/forms/ImageInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698