Chromium Code Reviews

Unified Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 1681553002: Add support for 'href' (w/o XLink NS) for various SVG elements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove invalid assert. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: third_party/WebKit/Source/core/dom/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index 7fbdd94c4772e4e492671f35a04a0fe61af96e7d..73f5f2b03ec669330fa81e504d47c582304d8d2c 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -2915,8 +2915,11 @@ KURL Element::hrefURL() const
// <link> implement URLUtils?
if (isHTMLAnchorElement(*this) || isHTMLAreaElement(*this) || isHTMLLinkElement(*this))
return getURLAttribute(hrefAttr);
- if (isSVGAElement(*this))
+ if (isSVGAElement(*this)) {
+ if (hasAttribute(SVGNames::hrefAttr))
+ return getURLAttribute(SVGNames::hrefAttr);
return getURLAttribute(XLinkNames::hrefAttr);
+ }
return KURL();
}

Powered by Google App Engine