#pragma once
#include "SVGAnimatedPointList.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGGeometryElement.h"
#include "SVGNames.h"
namespace WebCore {
class SVGPolyElement : public SVGGeometryElement, public SVGExternalResourcesRequired {
WTF_MAKE_ISO_ALLOCATED(SVGPolyElement);
public:
Ref<SVGPointList> points();
Ref<SVGPointList> animatedPoints();
const SVGPointListValues& pointList() const { return m_points.value(); }
size_t approximateMemoryCost() const override;
protected:
SVGPolyElement(const QualifiedName&, Document&);
private:
using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGPolyElement, SVGGeometryElement, SVGExternalResourcesRequired>;
static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
static void registerAttributes();
const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
void parseAttribute(const QualifiedName&, const AtomicString&) override;
void svgAttributeChanged(const QualifiedName&) override;
bool isValid() const override { return SVGTests::isValid(); }
bool supportsMarkers() const override { return true; }
AttributeOwnerProxy m_attributeOwnerProxy { *this };
SVGAnimatedPointListAttribute m_points;
};
}
SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::SVGPolyElement)
static bool isType(const WebCore::SVGElement& element) { return element.hasTagName(WebCore::SVGNames::polygonTag) || element.hasTagName(WebCore::SVGNames::polylineTag); }
static bool isType(const WebCore::Node& node) { return is<WebCore::SVGElement>(node) && isType(downcast<WebCore::SVGElement>(node)); }
SPECIALIZE_TYPE_TRAITS_END()