Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutImageResource.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutImageResource.cpp b/third_party/WebKit/Source/core/layout/LayoutImageResource.cpp |
| index e19a029d4c8d6fe5c6497ebf49887f9cd0e3639c..423bb46bf1ccfe4a6a8bc144681f3e7d19a69ff5 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutImageResource.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutImageResource.cpp |
| @@ -94,7 +94,9 @@ LayoutSize LayoutImageResource::imageSize(float multiplier) const |
| { |
| if (!m_cachedImage) |
| return LayoutSize(); |
| - LayoutSize size = m_cachedImage->imageSizeForLayoutObject(m_layoutObject, multiplier); |
| + RespectImageOrientationEnum shouldRespectImageOrientation = |
| + m_layoutObject ? m_layoutObject->shouldRespectImageOrientation() : DoNotRespectImageOrientation; |
| + LayoutSize size = m_cachedImage->imageSize(shouldRespectImageOrientation, multiplier); |
|
Yoav Weiss
2015/11/24 10:29:07
This repetition of the shouldRespectImageOrientati
davve
2015/11/24 12:49:13
Having such a global function has struck my mind,
Yoav Weiss
2015/11/24 13:06:56
Can you just call shouldRespectImageOrientation()
|
| if (m_layoutObject && m_layoutObject->isLayoutImage() && size.width() && size.height()) |
| size.scale(toLayoutImage(m_layoutObject)->imageDevicePixelRatio()); |
| return size; |