#pragma once
#include "SVGAnimatedBoolean.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGGraphicsElement.h"
#include "SVGNames.h"
#include "SVGPointListValues.h"
namespace WebCore {
class SVGPolyElement : public SVGGraphicsElement, public SVGExternalResourcesRequired {
public:
Ref<SVGPointList> points();
Ref<SVGPointList> animatedPoints();
SVGPointListValues& pointList() const { return m_points.value; }
static const SVGPropertyInfo* pointsPropertyInfo();
size_t approximateMemoryCost() const override;
protected:
SVGPolyElement(const QualifiedName&, Document&);
private:
bool isValid() const override { return SVGTests::isValid(); }
void parseAttribute(const QualifiedName&, const AtomicString&) override;
void svgAttributeChanged(const QualifiedName&) override;
bool supportsMarkers() const override { return true; }
static void synchronizePoints(SVGElement* contextElement);
static Ref<SVGAnimatedProperty> lookupOrCreatePointsWrapper(SVGElement* contextElement);
BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGPolyElement)
DECLARE_ANIMATED_BOOLEAN_OVERRIDE(ExternalResourcesRequired, externalResourcesRequired)
END_DECLARE_ANIMATED_PROPERTIES
protected:
mutable SVGSynchronizableAnimatedProperty<SVGPointListValues> 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()