Index: Source/core/svg/graphics/SVGImageCache.cpp |
diff --git a/Source/core/svg/graphics/SVGImageCache.cpp b/Source/core/svg/graphics/SVGImageCache.cpp |
index 059bbb42b4f1fd8cd553878ad909171d621aa090..26143b6de8547d3458fc490aae6ac16e0d7d2dad 100644 |
--- a/Source/core/svg/graphics/SVGImageCache.cpp |
+++ b/Source/core/svg/graphics/SVGImageCache.cpp |
@@ -23,6 +23,7 @@ |
#include "core/fetch/ImageResource.h" |
#include "core/frame/FrameView.h" |
+#include "core/html/HTMLImageElement.h" |
#include "core/page/Page.h" |
#include "core/rendering/svg/RenderSVGRoot.h" |
#include "core/svg/graphics/SVGImage.h" |
@@ -89,6 +90,14 @@ Image* SVGImageCache::imageForRenderer(const RenderObject* renderer) |
RefPtr<SVGImageForContainer> imageForContainer = it->value; |
ASSERT(!imageForContainer->size().isEmpty()); |
+ |
+ Node* node = renderer->node(); |
+ if (node && isHTMLImageElement(node)) { |
+ const AtomicString& urlString = toHTMLImageElement(node)->imageSourceURL(); |
+ KURL url = node->document().completeURL(urlString); |
+ imageForContainer->setURL(url); |
+ } |
+ |
return imageForContainer.get(); |
} |