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

Unified Diff: third_party/WebKit/Source/core/svg/SVGUseElement.cpp

Issue 1661803003: Don't reload an svg <use> element's xlink:href if only the fragment changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « third_party/WebKit/LayoutTests/http/tests/cache/svg-use-revalidate-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/SVGUseElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGUseElement.cpp b/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
index f1023a8fbf36b6075cc938a51c896f6eef4f8ccc..4e5725217cd392a5b434ffe46548b1ece4d47e3d 100644
--- a/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
@@ -237,7 +237,8 @@ void SVGUseElement::svgAttributeChanged(const QualifiedName& attrName)
SVGElement::InvalidationGuard invalidationGuard(this);
if (isStructurallyExternal()) {
KURL url = document().completeURL(hrefString());
- if (url.hasFragmentIdentifier()) {
+ const KURL& existingURL = m_resource ? m_resource->url() : KURL();
+ if (url.hasFragmentIdentifier() && !equalIgnoringFragmentIdentifier(url, existingURL)) {
FetchRequest request(ResourceRequest(url), localName());
setDocumentResource(DocumentResource::fetchSVGDocument(request, document().fetcher()));
}
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/cache/svg-use-revalidate-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698