From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/svg/SVGPolyElement.h | 42 ++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 24 deletions(-) (limited to 'Source/WebCore/svg/SVGPolyElement.h') 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* points(); - SVGListPropertyTearOff* animatedPoints(); + Ref points(); + Ref 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 lookupOrCreatePointsWrapper(SVGElement* contextElement); + static Ref 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 m_points; + mutable SVGSynchronizableAnimatedProperty 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(node) && isType(downcast(node)); } +SPECIALIZE_TYPE_TRAITS_END() -- cgit v1.2.1