Stop using legacy NODE_TYPE_CASTS() macro in svg/
[WebKit-https.git] / Source / WebCore / svg / SVGPolyElement.cpp
index 112c20f..484df89 100644 (file)
@@ -132,7 +132,7 @@ void SVGPolyElement::svgAttributeChanged(const QualifiedName& attrName)
 void SVGPolyElement::synchronizePoints(SVGElement* contextElement)
 {
     ASSERT(contextElement);
-    SVGPolyElement& ownerType = toSVGPolyElement(*contextElement);
+    SVGPolyElement& ownerType = downcast<SVGPolyElement>(*contextElement);
     if (!ownerType.m_points.shouldSynchronize)
         return;
     ownerType.m_points.synchronize(&ownerType, pointsPropertyInfo()->attributeName, ownerType.m_points.value.valueAsString());
@@ -141,7 +141,7 @@ void SVGPolyElement::synchronizePoints(SVGElement* contextElement)
 PassRefPtr<SVGAnimatedProperty> SVGPolyElement::lookupOrCreatePointsWrapper(SVGElement* contextElement)
 {
     ASSERT(contextElement);
-    SVGPolyElement& ownerType = toSVGPolyElement(*contextElement);
+    SVGPolyElement& ownerType = downcast<SVGPolyElement>(*contextElement);
     return SVGAnimatedProperty::lookupOrCreateWrapper<SVGPolyElement, SVGAnimatedPointList, SVGPointList>
         (&ownerType, pointsPropertyInfo(), ownerType.m_points.value);
 }
@@ -158,9 +158,4 @@ SVGListPropertyTearOff<SVGPointList>* SVGPolyElement::animatedPoints()
     return static_cast<SVGListPropertyTearOff<SVGPointList>*>(static_pointer_cast<SVGAnimatedPointList>(lookupOrCreatePointsWrapper(this))->animVal());
 }
 
-bool isSVGPolyElement(const Node& node)
-{
-    return node.hasTagName(SVGNames::polygonTag) || node.hasTagName(SVGNames::polylineTag);
-}
-
 }