diff options
Diffstat (limited to 'Source/WebCore/svg/SVGAnimateTransformElement.cpp')
-rw-r--r-- | Source/WebCore/svg/SVGAnimateTransformElement.cpp | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/Source/WebCore/svg/SVGAnimateTransformElement.cpp b/Source/WebCore/svg/SVGAnimateTransformElement.cpp index b20a89eca..72eb7720c 100644 --- a/Source/WebCore/svg/SVGAnimateTransformElement.cpp +++ b/Source/WebCore/svg/SVGAnimateTransformElement.cpp @@ -21,26 +21,23 @@ */ #include "config.h" - -#if ENABLE(SVG) #include "SVGAnimateTransformElement.h" -#include "Attribute.h" #include "SVGNames.h" #include "SVGTransformable.h" namespace WebCore { inline SVGAnimateTransformElement::SVGAnimateTransformElement(const QualifiedName& tagName, Document& document) - : SVGAnimateElement(tagName, document) - , m_type(SVGTransform::SVG_TRANSFORM_UNKNOWN) + : SVGAnimateElementBase(tagName, document) + , m_type(SVGTransformValue::SVG_TRANSFORM_UNKNOWN) { ASSERT(hasTagName(SVGNames::animateTransformTag)); } -PassRefPtr<SVGAnimateTransformElement> SVGAnimateTransformElement::create(const QualifiedName& tagName, Document& document) +Ref<SVGAnimateTransformElement> SVGAnimateTransformElement::create(const QualifiedName& tagName, Document& document) { - return adoptRef(new SVGAnimateTransformElement(tagName, document)); + return adoptRef(*new SVGAnimateTransformElement(tagName, document)); } bool SVGAnimateTransformElement::hasValidAttributeType() @@ -49,37 +46,22 @@ bool SVGAnimateTransformElement::hasValidAttributeType() if (!targetElement) return false; - if (attributeType() == AttributeTypeCSS) + if (attributeType() == AttributeType::CSS) return false; return m_animatedPropertyType == AnimatedTransformList; } -bool SVGAnimateTransformElement::isSupportedAttribute(const QualifiedName& attrName) -{ - DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); - if (supportedAttributes.isEmpty()) - supportedAttributes.add(SVGNames::typeAttr); - return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); -} - void SVGAnimateTransformElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { - if (!isSupportedAttribute(name)) { - SVGAnimateElement::parseAttribute(name, value); - return; - } - if (name == SVGNames::typeAttr) { m_type = SVGTransformable::parseTransformType(value); - if (m_type == SVGTransform::SVG_TRANSFORM_MATRIX) - m_type = SVGTransform::SVG_TRANSFORM_UNKNOWN; + if (m_type == SVGTransformValue::SVG_TRANSFORM_MATRIX) + m_type = SVGTransformValue::SVG_TRANSFORM_UNKNOWN; return; } - ASSERT_NOT_REACHED(); + SVGAnimateElementBase::parseAttribute(name, value); } } - -#endif // ENABLE(SVG) |