Index: third_party/WebKit/Source/core/style/StyleGeneratedImage.cpp |
diff --git a/third_party/WebKit/Source/core/style/StyleGeneratedImage.cpp b/third_party/WebKit/Source/core/style/StyleGeneratedImage.cpp |
index 68aaf42452030ce5042bf12836c825ba598c0c92..67fedc1d77edcfde06260c6db5fa576995c8fe9f 100644 |
--- a/third_party/WebKit/Source/core/style/StyleGeneratedImage.cpp |
+++ b/third_party/WebKit/Source/core/style/StyleGeneratedImage.cpp |
@@ -46,10 +46,12 @@ PassRefPtrWillBeRawPtr<CSSValue> StyleGeneratedImage::computedCSSValue() const |
return m_imageGeneratorValue->valueWithURLsMadeAbsolute(); |
} |
-LayoutSize StyleGeneratedImage::imageSize(const LayoutObject* layoutObject, float multiplier) const |
+LayoutSize StyleGeneratedImage::imageSize(const LayoutObject* layoutObject, float multiplier, const LayoutSize& defaultObjectSize) const |
{ |
if (m_fixedSize) { |
- LayoutSize fixedSize(m_imageGeneratorValue->fixedSize(layoutObject)); |
+ FloatSize unzoomedDefaultObjectSize(defaultObjectSize); |
fs
2016/03/04 09:00:56
(Strange as it may sound/feel, but this looks like
davve
2016/03/04 13:02:56
I'm not sure what you refer to by 'this' here but
fs
2016/03/04 13:06:56
Yes, that was the 'this' I was referring too ("thi
|
+ unzoomedDefaultObjectSize.scale(1 / multiplier); |
+ LayoutSize fixedSize(m_imageGeneratorValue->fixedSize(layoutObject, unzoomedDefaultObjectSize)); |
if (multiplier == 1.0f) |
return fixedSize; |
@@ -66,13 +68,13 @@ LayoutSize StyleGeneratedImage::imageSize(const LayoutObject* layoutObject, floa |
return LayoutSize(width, height); |
} |
- return LayoutSize(); |
+ return defaultObjectSize; |
} |
void StyleGeneratedImage::computeIntrinsicDimensions(const LayoutObject* layoutObject, FloatSize& intrinsicSize, FloatSize& intrinsicRatio) |
{ |
// At a zoom level of 1 the image is guaranteed to have an integer size. |
- LayoutSize size = imageSize(layoutObject, 1); |
+ LayoutSize size = imageSize(layoutObject, 1, LayoutSize()); |
ASSERT(size.fraction().isZero()); |
intrinsicSize = intrinsicRatio = FloatSize(size); |
} |