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

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

Issue 169103002: Drop [LegacyImplementedInBaseClass] from SVGURIReference IDL interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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: Source/core/svg/SVGURIReference.cpp
diff --git a/Source/core/svg/SVGURIReference.cpp b/Source/core/svg/SVGURIReference.cpp
index 6c3d871aa6a82cec791cfd903c188dd2009b2323..240dd7f491ac917179e0942ed8657253c867e78a 100644
--- a/Source/core/svg/SVGURIReference.cpp
+++ b/Source/core/svg/SVGURIReference.cpp
@@ -19,14 +19,21 @@
*/
#include "config.h"
-
#include "core/svg/SVGURIReference.h"
#include "XLinkNames.h"
+#include "core/svg/SVGElement.h"
#include "platform/weborigin/KURL.h"
namespace WebCore {
+SVGURIReference::SVGURIReference(SVGElement* element)
+ : m_href(SVGAnimatedString::create(element, XLinkNames::hrefAttr, SVGString::create()))
+{
+ ASSERT(element);
+ element->addToPropertyMap(m_href);
+}
+
bool SVGURIReference::isKnownAttribute(const QualifiedName& attrName)
{
return attrName.matches(XLinkNames::hrefAttr);
@@ -93,4 +100,13 @@ void SVGURIReference::addSupportedAttributes(HashSet<QualifiedName>& supportedAt
supportedAttributes.add(XLinkNames::hrefAttr);
}
+bool SVGURIReference::parseAttribute(const QualifiedName& name, const AtomicString& value, SVGParsingError& parseError)
+{
+ if (name.matches(XLinkNames::hrefAttr)) {
+ m_href->setBaseValueAsString(value, parseError);
+ return true;
+ }
+ return false;
+}
+
}

Powered by Google App Engine
This is Rietveld 408576698