| 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 63fc68a53f2b7c46ff50f331cf6e6665aa678b8e..f1958cee1ff2f4a640e26364cf782f78ba8b8016 100644
|
| --- a/third_party/WebKit/Source/core/style/StyleFetchedImage.cpp
|
| +++ b/third_party/WebKit/Source/core/style/StyleFetchedImage.cpp
|
| @@ -28,12 +28,14 @@
|
| #include "core/fetch/ImageResource.h"
|
| #include "core/layout/LayoutObject.h"
|
| #include "core/svg/graphics/SVGImage.h"
|
| +#include "core/svg/graphics/SVGImageForContainer.h"
|
|
|
| namespace blink {
|
|
|
| -StyleFetchedImage::StyleFetchedImage(ImageResource* image, Document* document)
|
| +StyleFetchedImage::StyleFetchedImage(ImageResource* image, Document* document, const KURL& urlWithFragment)
|
| : m_image(image)
|
| , m_document(document)
|
| + , m_urlWithFragment(urlWithFragment)
|
| {
|
| m_isImageResource = true;
|
| m_image->addClient(this);
|
| @@ -104,11 +106,6 @@ bool StyleFetchedImage::usesImageContainerSize() const
|
| return m_image->usesImageContainerSize();
|
| }
|
|
|
| -void StyleFetchedImage::setContainerSizeForLayoutObject(const LayoutObject* layoutObject, const IntSize& imageContainerSize, float imageContainerZoomFactor)
|
| -{
|
| - m_image->setContainerSizeForLayoutObject(layoutObject, imageContainerSize, imageContainerZoomFactor);
|
| -}
|
| -
|
| void StyleFetchedImage::addClient(LayoutObject* layoutObject)
|
| {
|
| m_image->addClient(layoutObject);
|
| @@ -127,9 +124,12 @@ void StyleFetchedImage::notifyFinished(Resource* resource)
|
| m_document.clear();
|
| }
|
|
|
| -PassRefPtr<Image> StyleFetchedImage::image(const LayoutObject* layoutObject, const IntSize&) const
|
| +PassRefPtr<Image> StyleFetchedImage::image(const LayoutObject*, const IntSize& containerSize, float zoom, const KURL& url) const
|
| {
|
| - return m_image->imageForLayoutObject(layoutObject);
|
| + RefPtr<Image> image = m_image->image();
|
| + if (image->isSVGImage())
|
| + return SVGImageForContainer::create(toSVGImage(image.get()), containerSize, zoom, url);
|
| + return image;
|
| }
|
|
|
| bool StyleFetchedImage::knownToBeOpaque(const LayoutObject* layoutObject) const
|
|
|