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

Unified Diff: third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp

Issue 1458083002: Support fragment URLs for more kinds of SVG images (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplifications and an added content test 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/style/StyleFetchedImageSet.cpp
diff --git a/third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp b/third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp
index ee7810801d293b1c9e24341b642d077d63a658aa..6f2688c1281d889aabe1745d670ffab78cd8ccbd 100644
--- a/third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp
+++ b/third_party/WebKit/Source/core/style/StyleFetchedImageSet.cpp
@@ -33,10 +33,11 @@
namespace blink {
-StyleFetchedImageSet::StyleFetchedImageSet(ImageResource* image, float imageScaleFactor, CSSImageSetValue* value)
+StyleFetchedImageSet::StyleFetchedImageSet(ImageResource* image, float imageScaleFactor, CSSImageSetValue* value, const KURL& url)
: m_bestFitImage(image)
, m_imageScaleFactor(imageScaleFactor)
, m_imageSetValue(value)
+ , m_url(url)
{
m_isImageResourceSet = true;
m_bestFitImage->addClient(this);
@@ -124,7 +125,7 @@ PassRefPtr<Image> StyleFetchedImageSet::image(const LayoutObject*, const IntSize
{
RefPtr<Image> image = m_bestFitImage->image();
if (image && image->isSVGImage())
- return SVGImageForContainer::create(toSVGImage(image.get()), containerSize, zoom);
+ return SVGImageForContainer::create(toSVGImage(image.get()), containerSize, zoom, m_url);
return image;
}

Powered by Google App Engine
This is Rietveld 408576698