summaryrefslogtreecommitdiff
path: root/Source/WebCore/svg/SVGViewElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/svg/SVGViewElement.cpp')
-rw-r--r--Source/WebCore/svg/SVGViewElement.cpp45
1 files changed, 10 insertions, 35 deletions
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> SVGViewElement::create(const QualifiedName& tagName, Document& document)
+Ref<SVGViewElement> 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<SVGStringList> SVGViewElement::viewTarget()
{
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
- if (supportedAttributes.isEmpty()) {
- SVGExternalResourcesRequired::addSupportedAttributes(supportedAttributes);
- SVGFitToViewBox::addSupportedAttributes(supportedAttributes);
- SVGZoomAndPan::addSupportedAttributes(supportedAttributes);
- supportedAttributes.add(SVGNames::viewTargetAttr);
- }
- return supportedAttributes.contains<SVGAttributeHashTranslator>(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)