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

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

Issue 1732563007: [NOT FOR COMMIT] Pass defaultObjectSize to get image size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/fetch/ImageResource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.cpp b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
index d0a45f23971fc7e03830991a9c35cbc9abda55f8..a953d9ac625f79c3c9a09afee8e60f9e8e79a437 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
@@ -211,7 +211,7 @@ bool ImageResource::imageHasRelativeSize() const
return false;
}
-LayoutSize ImageResource::imageSize(RespectImageOrientationEnum shouldRespectImageOrientation, float multiplier, SizeType sizeType)
+LayoutSize ImageResource::concreteObjectSize(const FloatSize& defaultObjectSize, RespectImageOrientationEnum shouldRespectImageOrientation, float multiplier, SizeType sizeType)
{
ASSERT(!isPurgeable());
@@ -223,7 +223,7 @@ LayoutSize ImageResource::imageSize(RespectImageOrientationEnum shouldRespectIma
if (m_image->isBitmapImage() && shouldRespectImageOrientation == RespectImageOrientation)
size = LayoutSize(toBitmapImage(m_image.get())->sizeRespectingOrientation());
else
- size = LayoutSize(m_image->size());
+ size = LayoutSize(m_image->concreteObjectSize(defaultObjectSize));
if (sizeType == IntrinsicCorrectedToDPR && m_hasDevicePixelRatioHeaderValue && m_devicePixelRatioHeaderValue > 0)
multiplier = 1 / m_devicePixelRatioHeaderValue;
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ImageResource.h ('k') | third_party/WebKit/Source/core/frame/ImageBitmap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698