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

Unified Diff: third_party/WebKit/Source/core/fetch/ImageResource.cpp

Issue 1653673002: Even more explicit LayoutUnit conversion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moarConstructors
Patch Set: address comments Created 4 years, 11 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/fetch/ImageResource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.cpp b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
index c7851237e61ce149a67e32797efea295bf8265f4..1c9b1e124753c34dd1e75130cba65cb152d1be03 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
@@ -228,7 +228,8 @@ LayoutSize ImageResource::imageSize(RespectImageOrientationEnum shouldRespectIma
// Don't let images that have a width/height >= 1 shrink below 1 when zoomed.
float widthScale = m_image->hasRelativeSize() ? 1.0f : multiplier;
float heightScale = m_image->hasRelativeSize() ? 1.0f : multiplier;
- LayoutSize minimumSize(size.width() > 0 ? 1 : 0, size.height() > 0 ? 1 : 0);
+ LayoutSize minimumSize(size.width() > LayoutUnit() ? LayoutUnit(1) : LayoutUnit(),
+ LayoutUnit(size.height() > LayoutUnit() ? LayoutUnit(1) : LayoutUnit()));
size.scale(widthScale, heightScale);
size.clampToMinimumSize(minimumSize);
ASSERT(multiplier != 1.0f || (size.width().fraction() == 0.0f && size.height().fraction() == 0.0f));
« no previous file with comments | « third_party/WebKit/Source/core/editing/SelectionEditor.cpp ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698