Chromium Code Reviews| Index: third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp |
| diff --git a/third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp b/third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp |
| index 0eeb5bb14664187b58e582eeb290f1cd9947ccf1..8e3cfa61397648118dc61e0e2c5bd146366c719b 100644 |
| --- a/third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp |
| +++ b/third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp |
| @@ -93,11 +93,15 @@ bool StyleFetchedImageSet::errorOccurred() const |
| return m_bestFitImage->errorOccurred(); |
| } |
| -LayoutSize StyleFetchedImageSet::imageSize(const LayoutObject* layoutObject, float multiplier) const |
| +LayoutSize StyleFetchedImageSet::imageSize(const LayoutObject*, float multiplier, const LayoutSize& defaultObjectSize) const |
| { |
| - LayoutSize scaledImageSize = m_bestFitImage->imageSize(LayoutObject::shouldRespectImageOrientation(layoutObject), multiplier); |
| - scaledImageSize.scale(1 / m_imageScaleFactor); |
| - return scaledImageSize; |
| + if (m_bestFitImage->image() && m_bestFitImage->image()->isSVGImage()) |
| + return imageSizeForSVGImage(toSVGImage(m_bestFitImage->image()), multiplier, defaultObjectSize); |
| + |
| + // Image orientation should only be respected for content images, |
| + // not decorative ones such as StyleImage (backgrounds, |
| + // border-image, etc.) |
|
Yoav Weiss
2016/03/07 11:16:07
Here too, pointing to a spec and testing functiona
davve
2016/03/07 13:07:38
You mean add the spec link as a comment? I'll do t
davve
2016/03/07 14:26:10
I looked into what happens here. The background im
|
| + return m_bestFitImage->imageSize(DoNotRespectImageOrientation, multiplier); |
| } |
| bool StyleFetchedImageSet::imageHasRelativeSize() const |