Stop using legacy NODE_TYPE_CASTS() macro in svg/
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Sep 2014 17:25:43 +0000 (17:25 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Sep 2014 17:25:43 +0000 (17:25 +0000)
commit48fa996bce11d20e8390a7ed064b99403ec4b60c
tree537a770b8d4bcd58f163629a956678b91e03c073
parentaf4f163fd00741e68ae217e0ac442a8edbe17446
Stop using legacy NODE_TYPE_CASTS() macro in svg/
https://bugs.webkit.org/show_bug.cgi?id=137106

Reviewed by Ryosuke Niwa.

Stop using legacy NODE_TYPE_CASTS() in svg/ and use the new
SPECIALIZE_TYPE_TRAITS_*() macro instead so that is<>() / downcast<>()
can be used for those types.

No new tests, no behavior change.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* dom/Element.h:
* dom/Node.h:
(WebCore::is):
* dom/make_names.pl:
(printTypeHelpers):
* html/HTMLElement.h:
* html/HTMLMediaElement.h:
* html/HTMLPlugInImageElement.h:
* html/LabelableElement.h:
* mathml/MathMLElement.h:
Rename NodeTypeCastTraits::is() to NodeTypeCastTraits::isType() to
avoid naming conflict with the global is<>() function. This was an
issue when is<>() was called from one of the template specializations.

* rendering/svg/RenderSVGBlock.h:
(WebCore::RenderSVGBlock::graphicsElement):
* rendering/svg/RenderSVGGradientStop.cpp:
(WebCore::RenderSVGGradientStop::gradientElement):
* rendering/svg/RenderSVGInline.h:
(WebCore::RenderSVGInline::graphicsElement):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::pathOnlyClipping):
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
* rendering/svg/RenderSVGShape.h:
(WebCore::RenderSVGShape::graphicsElement):
* rendering/svg/RenderSVGTransformableContainer.h:
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::operator<<):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):
* rendering/svg/SVGResources.cpp:
(WebCore::targetReferenceFromResource):
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::defaultEventHandler):
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::calculateAnimatedValue):
(WebCore::isSVGAnimateElement): Deleted.
Use is<>() / downcast<>() where appropriate.

* svg/SVGAnimateElement.h:
(WebCore::isSVGAnimateElement):
Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and add
overload for isSVGAnimateElement() taking an SVGElement in argument to
bypass the is<SVGElement>() check when the input type is an SVGElement.

* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
* svg/SVGElement.cpp:
(WebCore::SVGElement::getBoundingBox):
Use is<>() / downcast<>() where appropriate.

* svg/SVGElement.h:
* svg/SVGFilterPrimitiveStandardAttributes.h:
Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and drop
the pre-existing NodeTypeCastTraits template specialization as it is
now generated by the macro.

* svg/SVGGradientElement.cpp:
(WebCore::isSVGGradientElement): Deleted.
* svg/SVGGradientElement.h:
(WebCore::isSVGGradientElement):
Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and add
overload for isSVGAnimateElement() taking an SVGElement in argument to
bypass the is<SVGElement>() check when the input type is an SVGElement.

* svg/SVGGraphicsElement.h:
(WebCore::isSVGGraphicsElement):
Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS().

* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::collectGradientAttributes):
* svg/SVGLocatable.cpp:
(WebCore::SVGLocatable::getTransformToElement):
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::synchronizePoints):
(WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
(WebCore::isSVGPolyElement): Deleted.
Use is<>() / downcast<>() where appropriate.

* svg/SVGPolyElement.h:
(WebCore::isSVGPolyElement):
Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and add
overload for isPolyElement() taking an SVGElement in argument to
bypass the is<SVGElement>() check when the input type is an SVGElement.

* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::collectGradientAttributes):
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::synchronizeTextLength):
(WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
(WebCore::SVGTextContentElement::elementFromRenderer):
Use is<>() / downcast<>() where appropriate.

* svg/SVGTextContentElement.h:
WebCore::isSVGTextContentElement):
Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS().

* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::toClipPath):
Use is<>() / downcast<>() where appropriate. Also use tighter typing
for value returned by shadowTreeElement().

* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::buildPendingResource):
(WebCore::SVGSMILElement::connectConditions):
(WebCore::SVGSMILElement::disconnectConditions):
Use is<>() / downcast<>() where appropriate.

* svg/animation/SVGSMILElement.h:
(WebCore::isSVGSMILElement):
Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and drop
the pre-existing NodeTypeCastTraits template specialization as it is
now generated by the macro.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
41 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/Node.h
Source/WebCore/dom/make_names.pl
Source/WebCore/html/HTMLElement.h
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/html/HTMLPlugInImageElement.h
Source/WebCore/html/LabelableElement.h
Source/WebCore/mathml/MathMLElement.h
Source/WebCore/rendering/svg/RenderSVGBlock.h
Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp
Source/WebCore/rendering/svg/RenderSVGInline.h
Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp
Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp
Source/WebCore/rendering/svg/RenderSVGShape.h
Source/WebCore/rendering/svg/RenderSVGTransformableContainer.h
Source/WebCore/rendering/svg/SVGRenderSupport.cpp
Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp
Source/WebCore/rendering/svg/SVGRenderingContext.cpp
Source/WebCore/rendering/svg/SVGResources.cpp
Source/WebCore/svg/SVGAElement.cpp
Source/WebCore/svg/SVGAnimateElement.cpp
Source/WebCore/svg/SVGAnimateElement.h
Source/WebCore/svg/SVGAnimationElement.cpp
Source/WebCore/svg/SVGElement.cpp
Source/WebCore/svg/SVGElement.h
Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
Source/WebCore/svg/SVGGradientElement.cpp
Source/WebCore/svg/SVGGradientElement.h
Source/WebCore/svg/SVGGraphicsElement.h
Source/WebCore/svg/SVGLinearGradientElement.cpp
Source/WebCore/svg/SVGLocatable.cpp
Source/WebCore/svg/SVGPolyElement.cpp
Source/WebCore/svg/SVGPolyElement.h
Source/WebCore/svg/SVGRadialGradientElement.cpp
Source/WebCore/svg/SVGTextContentElement.cpp
Source/WebCore/svg/SVGTextContentElement.h
Source/WebCore/svg/SVGUseElement.cpp
Source/WebCore/svg/animation/SVGSMILElement.cpp
Source/WebCore/svg/animation/SVGSMILElement.h