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

Unified Diff: third_party/WebKit/Source/core/style/StyleGeneratedImage.cpp

Issue 1685353004: Clean up Image::computeIntrinsicDimensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits Created 4 years, 10 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/style/StyleGeneratedImage.cpp
diff --git a/third_party/WebKit/Source/core/style/StyleGeneratedImage.cpp b/third_party/WebKit/Source/core/style/StyleGeneratedImage.cpp
index 499333d9726638cd4369921d6064d036c5770b7e..66bf2dce653f8ed4641ee1683e1e98a606ad19a7 100644
--- a/third_party/WebKit/Source/core/style/StyleGeneratedImage.cpp
+++ b/third_party/WebKit/Source/core/style/StyleGeneratedImage.cpp
@@ -69,13 +69,12 @@ LayoutSize StyleGeneratedImage::imageSize(const LayoutObject* layoutObject, floa
return LayoutSize();
}
-void StyleGeneratedImage::computeIntrinsicDimensions(const LayoutObject* layoutObject, Length& intrinsicWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio)
+void StyleGeneratedImage::computeIntrinsicDimensions(const LayoutObject* layoutObject, FloatSize& intrinsicSize, FloatSize& intrinsicRatio)
{
// At a zoom level of 1 the image is guaranteed to have an integer size.
- IntSize size = flooredIntSize(imageSize(layoutObject, 1));
- intrinsicWidth = Length(size.width(), Fixed);
- intrinsicHeight = Length(size.height(), Fixed);
- intrinsicRatio = FloatSize(size);
+ LayoutSize size = imageSize(layoutObject, 1);
+ ASSERT(size.fraction().isZero());
+ intrinsicSize = intrinsicRatio = FloatSize(size);
}
void StyleGeneratedImage::addClient(LayoutObject* layoutObject)
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleGeneratedImage.h ('k') | third_party/WebKit/Source/core/style/StyleImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698