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

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

Issue 148173018: [SVG] SVGAnimatedString{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove debug print Created 6 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 | « Source/core/svg/SVGTextPathElement.h ('k') | Source/core/svg/SVGURIReference.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGTextPathElement.cpp
diff --git a/Source/core/svg/SVGTextPathElement.cpp b/Source/core/svg/SVGTextPathElement.cpp
index 45b2f60f8d99291d08f9e01b8ef3fb69f1f2d768..849980a7c217c3a5b8346bed897d50c4a9116c24 100644
--- a/Source/core/svg/SVGTextPathElement.cpp
+++ b/Source/core/svg/SVGTextPathElement.cpp
@@ -32,24 +32,24 @@ namespace WebCore {
// Animated property definitions
DEFINE_ANIMATED_ENUMERATION(SVGTextPathElement, SVGNames::methodAttr, Method, method, SVGTextPathMethodType)
DEFINE_ANIMATED_ENUMERATION(SVGTextPathElement, SVGNames::spacingAttr, Spacing, spacing, SVGTextPathSpacingType)
-DEFINE_ANIMATED_STRING(SVGTextPathElement, XLinkNames::hrefAttr, Href, href)
BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGTextPathElement)
REGISTER_LOCAL_ANIMATED_PROPERTY(method)
REGISTER_LOCAL_ANIMATED_PROPERTY(spacing)
- REGISTER_LOCAL_ANIMATED_PROPERTY(href)
REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTextContentElement)
END_REGISTER_ANIMATED_PROPERTIES
inline SVGTextPathElement::SVGTextPathElement(Document& document)
: SVGTextContentElement(SVGNames::textPathTag, document)
, m_startOffset(SVGAnimatedLength::create(this, SVGNames::startOffsetAttr, SVGLength::create(LengthModeOther)))
+ , m_href(SVGAnimatedString::create(this, XLinkNames::hrefAttr, SVGString::create()))
, m_method(SVGTextPathMethodAlign)
, m_spacing(SVGTextPathSpacingExact)
{
ScriptWrappable::init(this);
addToPropertyMap(m_startOffset);
+ addToPropertyMap(m_href);
registerAnimatedPropertiesForSVGTextPathElement();
}
@@ -96,7 +96,8 @@ void SVGTextPathElement::parseAttribute(const QualifiedName& name, const AtomicS
SVGTextPathSpacingType propertyValue = SVGPropertyTraits<SVGTextPathSpacingType>::fromString(value);
if (propertyValue > 0)
setSpacingBaseValue(propertyValue);
- } else if (SVGURIReference::parseAttribute(name, value)) {
+ } else if (name.matches(XLinkNames::hrefAttr)) {
+ m_href->setBaseValueAsString(value, parseError);
} else
ASSERT_NOT_REACHED();
@@ -146,7 +147,7 @@ void SVGTextPathElement::buildPendingResource()
return;
AtomicString id;
- Element* target = SVGURIReference::targetElementFromIRIString(hrefCurrentValue(), document(), &id);
+ Element* target = SVGURIReference::targetElementFromIRIString(m_href->currentValue()->value(), document(), &id);
if (!target) {
// Do not register as pending if we are already pending this resource.
if (document().accessSVGExtensions()->isElementPendingResource(this, id))
« no previous file with comments | « Source/core/svg/SVGTextPathElement.h ('k') | Source/core/svg/SVGURIReference.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698