Index: third_party/WebKit/Source/core/html/HTMLImageElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp |
index ae94760df80dc15558cfd47ca4327036312ba7e1..2596b9e0d6893f6f9ad411b7bae00ac2b6505a58 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp |
@@ -427,7 +427,7 @@ int HTMLImageElement::width() |
// if the image is available, use its width |
if (imageLoader().image()) |
- return imageLoader().image()->imageSizeForLayoutObject(layoutObject(), 1.0f).width(); |
+ return imageLoader().image()->imageSize(LayoutObject::shouldRespectImageOrientation(nullptr), 1.0f).width(); |
} |
LayoutBox* box = layoutBox(); |
@@ -448,7 +448,7 @@ int HTMLImageElement::height() |
// if the image is available, use its height |
if (imageLoader().image()) |
- return imageLoader().image()->imageSizeForLayoutObject(layoutObject(), 1.0f).height(); |
+ return imageLoader().image()->imageSize(LayoutObject::shouldRespectImageOrientation(nullptr), 1.0f).height(); |
} |
LayoutBox* box = layoutBox(); |
@@ -460,7 +460,7 @@ int HTMLImageElement::naturalWidth() const |
if (!imageLoader().image()) |
return 0; |
- return imageLoader().image()->imageSizeForLayoutObject(layoutObject(), m_imageDevicePixelRatio, ImageResource::IntrinsicCorrectedToDPR).width(); |
+ return imageLoader().image()->imageSize(LayoutObject::shouldRespectImageOrientation(layoutObject()), m_imageDevicePixelRatio, ImageResource::IntrinsicCorrectedToDPR).width(); |
} |
int HTMLImageElement::naturalHeight() const |
@@ -468,7 +468,7 @@ int HTMLImageElement::naturalHeight() const |
if (!imageLoader().image()) |
return 0; |
- return imageLoader().image()->imageSizeForLayoutObject(layoutObject(), m_imageDevicePixelRatio, ImageResource::IntrinsicCorrectedToDPR).height(); |
+ return imageLoader().image()->imageSize(LayoutObject::shouldRespectImageOrientation(layoutObject()), m_imageDevicePixelRatio, ImageResource::IntrinsicCorrectedToDPR).height(); |
} |
const String& HTMLImageElement::currentSrc() const |
@@ -627,7 +627,7 @@ FloatSize HTMLImageElement::elementSize() const |
if (!image) |
return FloatSize(); |
- return FloatSize(image->imageSizeForLayoutObject(layoutObject(), 1.0f)); |
+ return FloatSize(image->imageSize(LayoutObject::shouldRespectImageOrientation(layoutObject()), 1.0f)); |
} |
FloatSize HTMLImageElement::defaultDestinationSize() const |
@@ -636,7 +636,7 @@ FloatSize HTMLImageElement::defaultDestinationSize() const |
if (!image) |
return FloatSize(); |
LayoutSize size; |
- size = image->imageSizeForLayoutObject(layoutObject(), 1.0f); |
+ size = image->imageSize(LayoutObject::shouldRespectImageOrientation(layoutObject()), 1.0f); |
if (layoutObject() && layoutObject()->isLayoutImage() && image->image() && !image->image()->hasRelativeWidth()) |
size.scale(toLayoutImage(layoutObject())->imageDevicePixelRatio()); |
return FloatSize(size); |