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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutImage.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/LayoutImage.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutImage.cpp b/third_party/WebKit/Source/core/layout/LayoutImage.cpp
index d5c340de55a4910712edc687c6f42d7c54ba5126..e517e3271a1a26e398bbb9963315feea9a1f6399 100644
--- a/third_party/WebKit/Source/core/layout/LayoutImage.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutImage.cpp
@@ -122,7 +122,7 @@ void LayoutImage::imageChanged(WrappedImagePtr newImage, const IntRect* rect)
if (!m_didIncrementVisuallyNonEmptyPixelCount) {
// At a zoom level of 1 the image is guaranteed to have an integer size.
- view()->frameView()->incrementVisuallyNonEmptyPixelCount(flooredIntSize(m_imageResource->imageSize(1.0f)));
+ view()->frameView()->incrementVisuallyNonEmptyPixelCount(flooredIntSize(m_imageResource->defaultConcreteObjectSize(1.0f)));
m_didIncrementVisuallyNonEmptyPixelCount = true;
}
@@ -139,7 +139,7 @@ void LayoutImage::updateIntrinsicSizeIfNeeded(const LayoutSize& newSize)
void LayoutImage::invalidatePaintAndMarkForLayoutIfNeeded()
{
LayoutSize oldIntrinsicSize = intrinsicSize();
- LayoutSize newIntrinsicSize = m_imageResource->imageSize(style()->effectiveZoom());
+ LayoutSize newIntrinsicSize = m_imageResource->defaultConcreteObjectSize(style()->effectiveZoom());
updateIntrinsicSizeIfNeeded(newIntrinsicSize);
// In the case of generated image content using :before/:after/content, we might not be

Powered by Google App Engine
This is Rietveld 408576698