#ifndef SVGPolyElement_h
#define SVGPolyElement_h
#include "SVGNames.h"
#include "core/svg/SVGAnimatedBoolean.h"
#include "core/svg/SVGAnimatedPointList.h"
#include "core/svg/SVGGeometryElement.h"
namespace WebCore {
class SVGPolyElement : public SVGGeometryElement {
public:
SVGAnimatedPointList* points() { return m_points.get(); }
PassRefPtr<SVGPointListTearOff> pointsFromJavascript() { return m_points->baseVal(); }
PassRefPtr<SVGPointListTearOff> animatedPoints() { return m_points->animVal(); }
protected:
SVGPolyElement(const QualifiedName&, Document&);
private:
virtual bool supportsFocus() const OVERRIDE FINAL { return hasFocusEventListeners(); }
bool isSupportedAttribute(const QualifiedName&);
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE FINAL;
virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE FINAL;
private:
RefPtr<SVGAnimatedPointList> m_points;
};
inline bool isSVGPolyElement(const Node& node)
{
return node.hasTagName(SVGNames::polygonTag) || node.hasTagName(SVGNames::polylineTag);
}
DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGPolyElement);
}
#endif