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

Unified Diff: third_party/WebKit/Source/core/html/forms/ImageInputType.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/html/forms/ImageInputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/ImageInputType.cpp b/third_party/WebKit/Source/core/html/forms/ImageInputType.cpp
index 9705409c388c8ad938f5256111bbb4928a6bd27c..98362088b63ca1cfe7ebec6bcb8fe483d99a8c85 100644
--- a/third_party/WebKit/Source/core/html/forms/ImageInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/ImageInputType.cpp
@@ -205,7 +205,7 @@ unsigned ImageInputType::height() const
// If the image is available, use its height.
HTMLImageLoader* imageLoader = element->imageLoader();
if (imageLoader && imageLoader->image())
- return imageLoader->image()->imageSize(LayoutObject::shouldRespectImageOrientation(nullptr), 1).height();
+ return imageLoader->image()->defaultConcreteObjectSize(LayoutObject::shouldRespectImageOrientation(nullptr), 1).height();
}
element->document().updateLayout();
@@ -227,7 +227,7 @@ unsigned ImageInputType::width() const
// If the image is available, use its width.
HTMLImageLoader* imageLoader = element->imageLoader();
if (imageLoader && imageLoader->image())
- return imageLoader->image()->imageSize(LayoutObject::shouldRespectImageOrientation(nullptr), 1).width();
+ return imageLoader->image()->defaultConcreteObjectSize(LayoutObject::shouldRespectImageOrientation(nullptr), 1).width();
}
element->document().updateLayout();

Powered by Google App Engine
This is Rietveld 408576698