diff options
Diffstat (limited to 'WebCore/svg/SVGTextElement.cpp')
-rw-r--r-- | WebCore/svg/SVGTextElement.cpp | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/WebCore/svg/SVGTextElement.cpp b/WebCore/svg/SVGTextElement.cpp index c1481cf..7de34fe 100644 --- a/WebCore/svg/SVGTextElement.cpp +++ b/WebCore/svg/SVGTextElement.cpp @@ -37,7 +37,7 @@ namespace WebCore { SVGTextElement::SVGTextElement(const QualifiedName& tagName, Document* doc) : SVGTextPositioningElement(tagName, doc) , SVGTransformable() - , m_transform(this, SVGNames::transformAttr, SVGTransformList::create(SVGNames::transformAttr)) + , m_transform(SVGTransformList::create(SVGNames::transformAttr)) { } @@ -47,18 +47,11 @@ SVGTextElement::~SVGTextElement() void SVGTextElement::parseMappedAttribute(MappedAttribute* attr) { - if (attr->name() == SVGNames::transformAttr) { + if (SVGTransformable::isKnownAttribute(attr->name())) { SVGTransformList* localTransforms = transformBaseValue(); - - ExceptionCode ec = 0; - localTransforms->clear(ec); - - if (!SVGTransformable::parseTransformAttribute(localTransforms, attr->value())) + if (!SVGTransformable::parseTransformAttribute(localTransforms, attr->value())) { + ExceptionCode ec = 0; localTransforms->clear(ec); - else { - setTransformBaseValue(localTransforms); - if (renderer()) - renderer()->setNeedsLayout(true); // should be in setTransformBaseValue } } else SVGTextPositioningElement::parseMappedAttribute(attr); @@ -124,10 +117,28 @@ void SVGTextElement::svgAttributeChanged(const QualifiedName& attrName) if (!renderer()) return; - if (SVGTextPositioningElement::isKnownAttribute(attrName)) + if (SVGTransformable::isKnownAttribute(attrName)) renderer()->setNeedsLayout(true); } +void SVGTextElement::synchronizeProperty(const QualifiedName& attrName) +{ + SVGTextPositioningElement::synchronizeProperty(attrName); + + if (attrName == anyQName() || SVGTransformable::isKnownAttribute(attrName)) + synchronizeTransform(); +} + +void SVGTextElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) +{ + SVGTextPositioningElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta); + + if (!renderer()) + return; + + renderer()->setNeedsLayout(true); +} + } #endif // ENABLE(SVG) |