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

Unified Diff: Source/core/html/HTMLImageElement.cpp

Issue 422503002: HTMLImageElement.natural{Width,Height} should return intrinsic dimensions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Two more spots... Created 6 years, 5 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
« no previous file with comments | « LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height-svg-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLImageElement.cpp
diff --git a/Source/core/html/HTMLImageElement.cpp b/Source/core/html/HTMLImageElement.cpp
index de6c4cec59283cc9420a4805efc8c78b754c4771..3b26f4752d7e7774b04256332e5ca483ed6753af 100644
--- a/Source/core/html/HTMLImageElement.cpp
+++ b/Source/core/html/HTMLImageElement.cpp
@@ -374,7 +374,7 @@ int HTMLImageElement::naturalWidth() const
if (!imageLoader().image())
return 0;
- return imageLoader().image()->imageSizeForRenderer(renderer(), 1.0f).width();
+ return imageLoader().image()->imageSizeForRenderer(renderer(), 1.0f, ImageResource::IntrinsicSize).width();
}
int HTMLImageElement::naturalHeight() const
@@ -382,7 +382,7 @@ int HTMLImageElement::naturalHeight() const
if (!imageLoader().image())
return 0;
- return imageLoader().image()->imageSizeForRenderer(renderer(), 1.0f).height();
+ return imageLoader().image()->imageSizeForRenderer(renderer(), 1.0f, ImageResource::IntrinsicSize).height();
}
const String& HTMLImageElement::currentSrc() const
« no previous file with comments | « LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height-svg-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698