Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h

Issue 1458083002: Support fragment URLs for more kinds of SVG images (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplification wasn't simple enough Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 2ea5975d87c8e1b3a154d3aef34f6d92e2889951..69039e561354a742d28c16d9c1f9ed96e80ce4d1 100644
--- a/third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h
+++ b/third_party/WebKit/Source/core/svg/graphics/SVGImageForContainer.h
@@ -37,11 +37,11 @@ namespace blink {
class SVGImageForContainer final : public Image {
USING_FAST_MALLOC(SVGImageForContainer);
public:
- static PassRefPtr<SVGImageForContainer> create(SVGImage* image, const IntSize& containerSize, float zoom)
+ static PassRefPtr<SVGImageForContainer> create(SVGImage* image, const IntSize& containerSize, float zoom, const KURL& url)
{
FloatSize containerSizeWithoutZoom(containerSize);
containerSizeWithoutZoom.scale(1 / zoom);
- return adoptRef(new SVGImageForContainer(image, containerSizeWithoutZoom, zoom));
+ return adoptRef(new SVGImageForContainer(image, containerSizeWithoutZoom, zoom, url));
}
IntSize size() const override;
@@ -64,10 +64,11 @@ public:
PassRefPtr<SkImage> imageForCurrentFrame() override;
private:
- SVGImageForContainer(SVGImage* image, const FloatSize& containerSize, float zoom)
+ SVGImageForContainer(SVGImage* image, const FloatSize& containerSize, float zoom, const KURL& url)
: m_image(image)
, m_containerSize(containerSize)
, m_zoom(zoom)
+ , m_url(url)
{
}
@@ -76,6 +77,7 @@ private:
SVGImage* m_image;
const FloatSize m_containerSize;
const float m_zoom;
+ const KURL m_url;
};
}

Powered by Google App Engine
This is Rietveld 408576698