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

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

Issue 1694263003: Add Image::updateConcreteSize() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor-size-calculation-in
Patch Set: Pull test for now, needs changes in upcoming CL to pass. 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/fetch/ImageResource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.cpp b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
index 30e13864b184ef5e48bd4a9c0070ccbe5bc0b853..b90de63fdbf87e01690ce09b29b66717a8cd2a0d 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/ImageResource.cpp
@@ -211,6 +211,14 @@ bool ImageResource::imageHasRelativeSize() const
return false;
}
+void ImageResource::updateConcreteObjectSize(const LayoutSize& defaultObjectSize)
+{
+ if (!m_image)
+ return;
+
+ m_image->updateConcreteObjectSize(defaultObjectSize);
+}
+
LayoutSize ImageResource::imageSize(RespectImageOrientationEnum shouldRespectImageOrientation, float multiplier, SizeType sizeType)
{
ASSERT(!isPurgeable());

Powered by Google App Engine
This is Rietveld 408576698