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

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

Issue 112003003: [SVG] SVGLength{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert aggressive svgAttributeChanged, add NeedsRebaseline 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/SVGTextPositioningElement.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 50f3b50bc2c9f2dd01fa71af8302f2133aed13d5..fef4794ee2555c04f2bca115269bdc5eac4f7678 100644
--- a/Source/core/svg/SVGTextPathElement.cpp
+++ b/Source/core/svg/SVGTextPathElement.cpp
@@ -30,13 +30,11 @@
namespace WebCore {
// Animated property definitions
-DEFINE_ANIMATED_LENGTH(SVGTextPathElement, SVGNames::startOffsetAttr, StartOffset, startOffset)
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(startOffset)
REGISTER_LOCAL_ANIMATED_PROPERTY(method)
REGISTER_LOCAL_ANIMATED_PROPERTY(spacing)
REGISTER_LOCAL_ANIMATED_PROPERTY(href)
@@ -45,11 +43,13 @@ END_REGISTER_ANIMATED_PROPERTIES
inline SVGTextPathElement::SVGTextPathElement(Document& document)
: SVGTextContentElement(SVGNames::textPathTag, document)
- , m_startOffset(LengthModeOther)
+ , m_startOffset(SVGAnimatedLength::create(this, SVGNames::startOffsetAttr, SVGLength::create(LengthModeOther)))
, m_method(SVGTextPathMethodAlign)
, m_spacing(SVGTextPathSpacingExact)
{
ScriptWrappable::init(this);
+
+ addToPropertyMap(m_startOffset);
registerAnimatedPropertiesForSVGTextPathElement();
}
@@ -87,7 +87,7 @@ void SVGTextPathElement::parseAttribute(const QualifiedName& name, const AtomicS
if (!isSupportedAttribute(name))
SVGTextContentElement::parseAttribute(name, value);
else if (name == SVGNames::startOffsetAttr)
- setStartOffsetBaseValue(SVGLength::construct(LengthModeOther, value, parseError));
+ m_startOffset->setBaseValueAsString(value, AllowNegativeLengths, parseError);
else if (name == SVGNames::methodAttr) {
SVGTextPathMethodType propertyValue = SVGPropertyTraits<SVGTextPathMethodType>::fromString(value);
if (propertyValue > 0)
@@ -189,7 +189,7 @@ void SVGTextPathElement::removedFrom(ContainerNode* rootParent)
bool SVGTextPathElement::selfHasRelativeLengths() const
{
- return startOffsetCurrentValue().isRelative()
+ return m_startOffset->currentValue()->isRelative()
|| SVGTextContentElement::selfHasRelativeLengths();
}
« no previous file with comments | « Source/core/svg/SVGTextPathElement.h ('k') | Source/core/svg/SVGTextPositioningElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698