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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutImageResource.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/layout/LayoutImageResource.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutImageResource.cpp b/third_party/WebKit/Source/core/layout/LayoutImageResource.cpp
index 2037457c0a490c306a79a6ebe58b2aab9ecdfe20..e26191e2958513d1d9fbc2fd94633cd2347093cb 100644
--- a/third_party/WebKit/Source/core/layout/LayoutImageResource.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutImageResource.cpp
@@ -89,11 +89,11 @@ void LayoutImageResource::resetAnimation()
m_layoutObject->setShouldDoFullPaintInvalidation();
}
-LayoutSize LayoutImageResource::imageSize(float multiplier) const
+LayoutSize LayoutImageResource::concreteObjectSize(const FloatSize& defaultObjectSize, float multiplier) const
{
if (!m_cachedImage)
return LayoutSize();
- LayoutSize size = m_cachedImage->imageSize(LayoutObject::shouldRespectImageOrientation(m_layoutObject), multiplier);
+ LayoutSize size = m_cachedImage->concreteObjectSize(defaultObjectSize, LayoutObject::shouldRespectImageOrientation(m_layoutObject), multiplier);
if (m_layoutObject && m_layoutObject->isLayoutImage() && size.width() && size.height())
size.scale(toLayoutImage(m_layoutObject)->imageDevicePixelRatio());
return size;

Powered by Google App Engine
This is Rietveld 408576698