| Index: third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h
|
| diff --git a/third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h b/third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h
|
| index 23bbf308d726ab68fe812dae57bee36b69759d85..9ad1a3d0f42789847ac841530cfe40ba3c96bd0f 100644
|
| --- a/third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h
|
| +++ b/third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h
|
| @@ -36,15 +36,14 @@ namespace blink {
|
|
|
| class SVGImageForContainer final : public Image {
|
| public:
|
| - static PassRefPtr<SVGImageForContainer> create(SVGImage* image, const FloatSize& containerSize, float zoom)
|
| + static PassRefPtr<SVGImageForContainer> create(PassRefPtr<SVGImage> image, const FloatSize& containerSize, float zoom, const KURL& urlWithFragment)
|
| {
|
| - return adoptRef(new SVGImageForContainer(image, containerSize, zoom));
|
| + FloatSize containerSizeWithoutZoom(containerSize);
|
| + containerSizeWithoutZoom.scale(1 / zoom);
|
| + return adoptRef(new SVGImageForContainer(image, containerSizeWithoutZoom, zoom, urlWithFragment));
|
| }
|
|
|
| - bool isSVGImage() const override { return true; }
|
| -
|
| IntSize size() const override;
|
| - void setURL(const KURL& url) { m_image->setURL(url); }
|
|
|
| bool usesContainerSize() const override { return m_image->usesContainerSize(); }
|
| bool hasRelativeWidth() const override { return m_image->hasRelativeWidth(); }
|
| @@ -64,19 +63,22 @@ public:
|
| PassRefPtr<SkImage> imageForCurrentFrame() override;
|
|
|
| private:
|
| - SVGImageForContainer(SVGImage* image, const FloatSize& containerSize, float zoom)
|
| + SVGImageForContainer(PassRefPtr<SVGImage> image, const FloatSize& containerSize, float zoom, const KURL& urlWithFragment)
|
| : m_image(image)
|
| , m_containerSize(containerSize)
|
| , m_zoom(zoom)
|
| + , m_urlWithFragment(urlWithFragment)
|
| {
|
| }
|
|
|
| void destroyDecodedData(bool) override { }
|
|
|
| - SVGImage* m_image;
|
| + RefPtr<SVGImage> m_image;
|
| const FloatSize m_containerSize;
|
| const float m_zoom;
|
| + KURL m_urlWithFragment;
|
| };
|
| +
|
| }
|
|
|
| #endif // SVGImageForContainer_h
|
|
|