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

Unified Diff: Source/core/svg/SVGImageLoader.cpp

Issue 329943003: Fix resolving protocol-agnostic <svg:image> URLs in about:blank iframes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months 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
« no previous file with comments | « LayoutTests/http/tests/svg/image-base-within-aboutblank-iframe-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGImageLoader.cpp
diff --git a/Source/core/svg/SVGImageLoader.cpp b/Source/core/svg/SVGImageLoader.cpp
index 1b9c9842066a0ba283f828d978132bc19f2e50e9..af9d5b7587efbb2c1c8d12d5ea226b57bce46141 100644
--- a/Source/core/svg/SVGImageLoader.cpp
+++ b/Source/core/svg/SVGImageLoader.cpp
@@ -47,9 +47,9 @@ void SVGImageLoader::dispatchLoadEvent()
String SVGImageLoader::sourceURI(const AtomicString& attribute) const
{
KURL base = element()->baseURI();
- if (base.isValid())
- return KURL(base, stripLeadingAndTrailingHTMLSpaces(attribute)).string();
- return element()->document().completeURL(stripLeadingAndTrailingHTMLSpaces(attribute));
+ if (!base.isValid())
+ base = element()->document().baseURI();
+ return element()->document().completeURLWithOverride(stripLeadingAndTrailingHTMLSpaces(attribute), base);
}
}
« no previous file with comments | « LayoutTests/http/tests/svg/image-base-within-aboutblank-iframe-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698