#ifndef SVGPolyElement_h
#define SVGPolyElement_h
#include "SVGAnimatedBoolean.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGGraphicsElement.h"
#include "SVGNames.h"
#include "SVGPointList.h"
namespace WebCore {
class SVGPolyElement : public SVGGraphicsElement, public SVGExternalResourcesRequired {
public:
RefPtr<SVGListPropertyTearOff<SVGPointList>> points();
RefPtr<SVGListPropertyTearOff<SVGPointList>> animatedPoints();
SVGPointList& pointList() const { return m_points.value; }
static const SVGPropertyInfo* pointsPropertyInfo();
size_t approximateMemoryCost() const override;
protected:
SVGPolyElement(const QualifiedName&, Document&);
private:
virtual bool isValid() const override { return SVGTests::isValid(); }
virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
virtual void svgAttributeChanged(const QualifiedName&) override;
virtual 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<SVGPointList> 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()
#endif