From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/svg/SVGViewElement.cpp | 45 ++++++++--------------------------- 1 file changed, 10 insertions(+), 35 deletions(-) (limited to 'Source/WebCore/svg/SVGViewElement.cpp') diff --git a/Source/WebCore/svg/SVGViewElement.cpp b/Source/WebCore/svg/SVGViewElement.cpp index fe038d987..04b7e8239 100644 --- a/Source/WebCore/svg/SVGViewElement.cpp +++ b/Source/WebCore/svg/SVGViewElement.cpp @@ -19,15 +19,10 @@ */ #include "config.h" - -#if ENABLE(SVG) #include "SVGViewElement.h" -#include "Attribute.h" -#include "SVGFitToViewBox.h" #include "SVGNames.h" #include "SVGStringList.h" -#include "SVGZoomAndPan.h" namespace WebCore { @@ -52,45 +47,25 @@ inline SVGViewElement::SVGViewElement(const QualifiedName& tagName, Document& do registerAnimatedPropertiesForSVGViewElement(); } -PassRefPtr SVGViewElement::create(const QualifiedName& tagName, Document& document) +Ref SVGViewElement::create(const QualifiedName& tagName, Document& document) { - return adoptRef(new SVGViewElement(tagName, document)); + return adoptRef(*new SVGViewElement(tagName, document)); } -bool SVGViewElement::isSupportedAttribute(const QualifiedName& attrName) +Ref SVGViewElement::viewTarget() { - DEFINE_STATIC_LOCAL(HashSet, supportedAttributes, ()); - if (supportedAttributes.isEmpty()) { - SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes); - SVGFitToViewBox::addSupportedAttributes(supportedAttributes); - SVGZoomAndPan::addSupportedAttributes(supportedAttributes); - supportedAttributes.add(SVGNames::viewTargetAttr); - } - return supportedAttributes.contains(attrName); + return SVGStringList::create(*this, m_viewTarget); } void SVGViewElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { - if (!isSupportedAttribute(name)) { - SVGElement::parseAttribute(name, value); - return; - } - - if (name == SVGNames::viewTargetAttr) { - viewTarget().reset(value); - return; - } + if (name == SVGNames::viewTargetAttr) + m_viewTarget.reset(value); - if (SVGExternalResourcesRequired::parseAttribute(name, value)) - return; - if (SVGFitToViewBox::parseAttribute(this, name, value)) - return; - if (SVGZoomAndPan::parseAttribute(this, name, value)) - return; - - ASSERT_NOT_REACHED(); + SVGExternalResourcesRequired::parseAttribute(name, value); + SVGFitToViewBox::parseAttribute(this, name, value); + SVGZoomAndPan::parseAttribute(*this, name, value); + SVGElement::parseAttribute(name, value); } } - -#endif // ENABLE(SVG) -- cgit v1.2.1