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 099b40708f59cff71ce307a075b4dd88ec86cb15..3fb1c53c86aba2858a59a673a9fe35f890d915d9 100644 |
--- a/third_party/WebKit/Source/core/style/StyleFetchedImage.cpp |
+++ b/third_party/WebKit/Source/core/style/StyleFetchedImage.cpp |
@@ -126,10 +126,10 @@ void StyleFetchedImage::notifyFinished(Resource* resource) |
PassRefPtr<Image> StyleFetchedImage::image(const LayoutObject*, const IntSize& containerSize, float zoom) const |
{ |
- RefPtr<Image> image = m_image->image(); |
- if (image->isSVGImage()) |
- return SVGImageForContainer::create(toSVGImage(image.get()), containerSize, zoom, m_url); |
- return image; |
+ if (!m_image->image()->isSVGImage()) |
+ return m_image->image(); |
+ |
+ return SVGImageForContainer::create(toSVGImage(m_image->image()), containerSize, zoom, m_url); |
} |
bool StyleFetchedImage::knownToBeOpaque(const LayoutObject* layoutObject) const |