Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutImageResource.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutImageResource.cpp b/third_party/WebKit/Source/core/layout/LayoutImageResource.cpp |
| index beb97934d72db52a1eacc616826caa8c15beed51..37afb84a1a5dd0672900bbb721f5e79cbf1e6150 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutImageResource.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutImageResource.cpp |
| @@ -104,14 +104,14 @@ PassRefPtr<Image> LayoutImageResource::image(const IntSize& containerSize, float |
| { |
| RefPtr<Image> image = m_cachedImage ? m_cachedImage->image() : Image::nullImage(); |
| if (image->isSVGImage()) { |
| + KURL url; |
| SVGImage* svgImage = toSVGImage(image.get()); |
| Node* node = m_layoutObject->node(); |
| - if (node && isHTMLImageElement(node)) { |
| - const AtomicString& urlString = toHTMLImageElement(node)->imageSourceURL(); |
| - KURL url = node->document().completeURL(urlString); |
| - svgImage->setURL(url); |
| + if (node && node->isElementNode()) { |
| + const AtomicString& urlString = toElement(node)->imageSourceURL(); |
|
fs
2015/11/19 14:59:44
Nit: With this change I guess the include of HTMLI
davve
2015/11/20 08:14:21
Thanks.
|
| + url = node->document().completeURL(urlString); |
| } |
| - return SVGImageForContainer::create(svgImage, containerSize, zoom); |
| + return SVGImageForContainer::create(svgImage, containerSize, zoom, url); |
| } |
| return image; |
| } |