summaryrefslogtreecommitdiffstats
path: root/WebCore/svg/SVGStyledTransformableElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/svg/SVGStyledTransformableElement.cpp')
-rw-r--r--WebCore/svg/SVGStyledTransformableElement.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/WebCore/svg/SVGStyledTransformableElement.cpp b/WebCore/svg/SVGStyledTransformableElement.cpp
index 4e97c83..6815914 100644
--- a/WebCore/svg/SVGStyledTransformableElement.cpp
+++ b/WebCore/svg/SVGStyledTransformableElement.cpp
@@ -33,12 +33,10 @@
namespace WebCore {
-char SVGStyledTransformableElementIdentifier[] = "SVGStyledTransformableElement";
-
SVGStyledTransformableElement::SVGStyledTransformableElement(const QualifiedName& tagName, Document* doc)
: SVGStyledLocatableElement(tagName, doc)
, SVGTransformable()
- , m_transform(this, SVGNames::transformAttr, SVGTransformList::create(SVGNames::transformAttr))
+ , m_transform(SVGTransformList::create(SVGNames::transformAttr))
{
}
@@ -70,20 +68,24 @@ TransformationMatrix* SVGStyledTransformableElement::supplementalTransform()
void SVGStyledTransformableElement::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);
- } else
+ }
+ } else
SVGStyledLocatableElement::parseMappedAttribute(attr);
}
+void SVGStyledTransformableElement::synchronizeProperty(const QualifiedName& attrName)
+{
+ SVGStyledLocatableElement::synchronizeProperty(attrName);
+
+ if (attrName == anyQName() || SVGTransformable::isKnownAttribute(attrName))
+ synchronizeTransform();
+}
+
bool SVGStyledTransformableElement::isKnownAttribute(const QualifiedName& attrName)
{
return SVGTransformable::isKnownAttribute(attrName) ||