diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/svg/SVGAnimateTransformElement.cpp | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
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) |