diff options
Diffstat (limited to 'Source/WebCore/svg/SVGPolyElement.h')
-rw-r--r-- | Source/WebCore/svg/SVGPolyElement.h | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/Source/WebCore/svg/SVGPolyElement.h b/Source/WebCore/svg/SVGPolyElement.h index 7415c5d20..b3e24a247 100644 --- a/Source/WebCore/svg/SVGPolyElement.h +++ b/Source/WebCore/svg/SVGPolyElement.h @@ -18,59 +18,53 @@ * Boston, MA 02110-1301, USA. */ -#ifndef SVGPolyElement_h -#define SVGPolyElement_h - -#if ENABLE(SVG) +#pragma once #include "SVGAnimatedBoolean.h" #include "SVGExternalResourcesRequired.h" #include "SVGGraphicsElement.h" #include "SVGNames.h" -#include "SVGPointList.h" +#include "SVGPointListValues.h" namespace WebCore { class SVGPolyElement : public SVGGraphicsElement, public SVGExternalResourcesRequired { public: - SVGListPropertyTearOff<SVGPointList>* points(); - SVGListPropertyTearOff<SVGPointList>* animatedPoints(); + Ref<SVGPointList> points(); + Ref<SVGPointList> animatedPoints(); - SVGPointList& pointList() const { return m_points.value; } + SVGPointListValues& 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 bool supportsFocus() const override { return true; } + bool isValid() const override { return SVGTests::isValid(); } - bool isSupportedAttribute(const QualifiedName&); - virtual void parseAttribute(const QualifiedName&, const AtomicString&) override; - virtual void svgAttributeChanged(const QualifiedName&) override; + void parseAttribute(const QualifiedName&, const AtomicString&) override; + void svgAttributeChanged(const QualifiedName&) override; - virtual bool supportsMarkers() const override { return true; } + bool supportsMarkers() const override { return true; } // Custom 'points' property static void synchronizePoints(SVGElement* contextElement); - static PassRefPtr<SVGAnimatedProperty> lookupOrCreatePointsWrapper(SVGElement* contextElement); + static Ref<SVGAnimatedProperty> lookupOrCreatePointsWrapper(SVGElement* contextElement); BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGPolyElement) - DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesRequired) + DECLARE_ANIMATED_BOOLEAN_OVERRIDE(ExternalResourcesRequired, externalResourcesRequired) END_DECLARE_ANIMATED_PROPERTIES protected: - mutable SVGSynchronizableAnimatedProperty<SVGPointList> m_points; + mutable SVGSynchronizableAnimatedProperty<SVGPointListValues> m_points; }; -void isSVGPolyElement(const SVGPolyElement&); // Catch unnecessary runtime check of type known at compile time. -bool isSVGPolyElement(const Node&); -NODE_TYPE_CASTS(SVGPolyElement) - } // namespace WebCore -#endif // ENABLE(SVG) - -#endif +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() |