Index: third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp |
diff --git a/third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp b/third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp |
index 459ea952645656ff98eb95947d59ce90de48acef..ec59447b35a06e6bc3ec2668e1e289c4be8e34bd 100644 |
--- a/third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp |
+++ b/third_party/WebKit/Source/core/css/CSSCrossfadeValue.cpp |
@@ -94,6 +94,14 @@ static Image* renderableImageForCSSValue(CSSValue* value, const LayoutObject* la |
return cachedImage->image(); |
} |
+static KURL urlForCSSValue(const CSSValue* value) |
+{ |
+ if (!value->isImageValue()) |
+ return KURL(); |
+ |
+ return KURL(ParsedURLString, toCSSImageValue(*value).url()); |
+} |
+ |
CSSCrossfadeValue::CSSCrossfadeValue(PassRefPtrWillBeRawPtr<CSSValue> fromValue, PassRefPtrWillBeRawPtr<CSSValue> toValue, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> percentageValue) |
: CSSImageGeneratorValue(CrossfadeClass) |
, m_fromValue(fromValue) |
@@ -219,13 +227,11 @@ PassRefPtr<Image> CSSCrossfadeValue::image(const LayoutObject* layoutObject, con |
RefPtr<Image> fromImageRef(fromImage); |
RefPtr<Image> toImageRef(toImage); |
- // TODO(davve): Pass along proper URL to the SVG wrappers |
- |
if (fromImage->isSVGImage()) |
- fromImageRef = SVGImageForContainer::create(toSVGImage(fromImage), size, 1, KURL()); |
+ fromImageRef = SVGImageForContainer::create(toSVGImage(fromImage), size, 1, urlForCSSValue(m_fromValue.get())); |
if (toImage->isSVGImage()) |
- toImageRef = SVGImageForContainer::create(toSVGImage(toImage), size, 1, KURL()); |
+ toImageRef = SVGImageForContainer::create(toSVGImage(toImage), size, 1, urlForCSSValue(m_toValue.get())); |
m_generatedImage = CrossfadeGeneratedImage::create(fromImageRef, toImageRef, m_percentageValue->getFloatValue(), fixedSize(layoutObject), size); |