Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp |
| index 1bce9cf781b9e3d55e4e815f6aa1d17cd2c83b77..d95b5566c8eaa959f28d00f8833bd4fa3cefbc9f 100644 |
| --- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp |
| +++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp |
| @@ -69,7 +69,8 @@ static float resolveHeightForRatio(float width, |
| FloatSize LayoutSVGImage::calculateObjectSize() const { |
| ImageResourceContent* cachedImage = m_imageResource->cachedImage(); |
| - if (!cachedImage || cachedImage->errorOccurred()) |
| + if (!cachedImage || cachedImage->errorOccurred() || |
| + !cachedImage->isSizeAvailable()) |
|
fs
2016/12/20 10:08:12
Would this not affect other similar code-paths sim
yhirano
2016/12/20 12:06:30
I'm not sure (I'm not familiar with the layout / i
fs
2016/12/20 12:15:45
My observation was mostly that other code seems to
hiroshige
2016/12/21 17:51:06
If we can replace isSizeAvailable() here and in Im
|
| return m_objectBoundingBox.size(); |
| FloatSize intrinsicSize = FloatSize(cachedImage->getImage()->size()); |