Chromium Code Reviews| Index: third_party/WebKit/Source/core/style/StyleFetchedImage.cpp |
| diff --git a/third_party/WebKit/Source/core/style/StyleFetchedImage.cpp b/third_party/WebKit/Source/core/style/StyleFetchedImage.cpp |
| index f2e15b31e4c114262515a4a8c346468200ea4352..f28bef72d82cfdf99b8b27ea925de8edf521c656 100644 |
| --- a/third_party/WebKit/Source/core/style/StyleFetchedImage.cpp |
| +++ b/third_party/WebKit/Source/core/style/StyleFetchedImage.cpp |
| @@ -91,9 +91,15 @@ bool StyleFetchedImage::errorOccurred() const |
| return m_image->errorOccurred(); |
| } |
| -LayoutSize StyleFetchedImage::imageSize(const LayoutObject* layoutObject, float multiplier) const |
| +LayoutSize StyleFetchedImage::imageSize(const LayoutObject* layoutObject, float multiplier, const LayoutSize& defaultObjectSize) const |
| { |
| - return m_image->imageSize(LayoutObject::shouldRespectImageOrientation(layoutObject), multiplier); |
| + if (m_image->image() && m_image->image()->isSVGImage()) |
| + return imageSizeForSVGImage(toSVGImage(m_image->image()), multiplier, defaultObjectSize); |
| + |
| + // Image orientation should only be respected for content images, |
| + // not decorative images such as StyleImage (backgrounds, |
| + // border-image, etc.) |
|
Yoav Weiss
2016/03/07 11:16:07
Could you point to a spec indicating that this is
davve
2016/03/07 13:07:38
https://drafts.csswg.org/css-images-3/#the-image-o
|
| + return m_image->imageSize(DoNotRespectImageOrientation, multiplier); |
| } |
| bool StyleFetchedImage::imageHasRelativeSize() const |