Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.h |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.h b/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.h |
| index 284bb9322ff631adc0ae5ca846a779a588ce89a5..2eefa4633a77239a9d359fe3b05b836591e10b55 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.h |
| +++ b/third_party/WebKit/Source/core/layout/LayoutImageResourceStyleImage.h |
| @@ -51,7 +51,13 @@ public: |
| bool imageHasRelativeSize() const override { return m_styleImage->imageHasRelativeSize(); } |
| - LayoutSize imageSize(float multiplier) const override { return m_styleImage->imageSize(m_layoutObject, multiplier); } |
| + LayoutSize imageSize(float multiplier) const override |
| + { |
| + // TODO(davve): Find out the default object size, if any, in this context. |
| + LayoutSize scaledImageSize = m_styleImage->imageSize(m_layoutObject, multiplier, LayoutSize()); |
| + scaledImageSize.scale(1 / m_styleImage->imageScaleFactor()); |
|
fs
2016/03/03 15:22:53
Won't this double-scale if m_styleImage is an imag
fs
2016/03/03 15:24:43
Ah, no, that code was no longer. You can disregard
|
| + return scaledImageSize; |
| + } |
| WrappedImagePtr imagePtr() const override { return m_styleImage->data(); } |