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

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: Rebase. Created 4 years, 10 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
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 14628de47a416b2e9d08f8af2425aebdcd7f4e66..cab8a31c69e684ae7ca70cc14305bc96076d5230 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -2912,8 +2912,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
This is Rietveld 408576698