<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[173970] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/173970">173970</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-09-25 10:25:43 -0700 (Thu, 25 Sep 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>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&lt;&gt;() / downcast&lt;&gt;()
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&lt;&gt;() function. This was an
issue when is&lt;&gt;() 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&lt;&lt;):
* 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&lt;&gt;() / downcast&lt;&gt;() 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&lt;SVGElement&gt;() check when the input type is an SVGElement.

* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
* svg/SVGElement.cpp:
(WebCore::SVGElement::getBoundingBox):
Use is&lt;&gt;() / downcast&lt;&gt;() 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&lt;SVGElement&gt;() 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&lt;&gt;() / downcast&lt;&gt;() 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&lt;SVGElement&gt;() 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&lt;&gt;() / downcast&lt;&gt;() where appropriate.

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

* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::toClipPath):
Use is&lt;&gt;() / downcast&lt;&gt;() 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&lt;&gt;() / downcast&lt;&gt;() 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.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCoredomElementh">trunk/Source/WebCore/dom/Element.h</a></li>
<li><a href="#trunkSourceWebCoredomNodeh">trunk/Source/WebCore/dom/Node.h</a></li>
<li><a href="#trunkSourceWebCoredommake_namespl">trunk/Source/WebCore/dom/make_names.pl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLElementh">trunk/Source/WebCore/html/HTMLElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementh">trunk/Source/WebCore/html/HTMLMediaElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLPlugInImageElementh">trunk/Source/WebCore/html/HTMLPlugInImageElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlLabelableElementh">trunk/Source/WebCore/html/LabelableElement.h</a></li>
<li><a href="#trunkSourceWebCoremathmlMathMLElementh">trunk/Source/WebCore/mathml/MathMLElement.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGBlockh">trunk/Source/WebCore/rendering/svg/RenderSVGBlock.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGGradientStopcpp">trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGInlineh">trunk/Source/WebCore/rendering/svg/RenderSVGInline.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGResourceClippercpp">trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGResourceContainercpp">trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGShapeh">trunk/Source/WebCore/rendering/svg/RenderSVGShape.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGTransformableContainerh">trunk/Source/WebCore/rendering/svg/RenderSVGTransformableContainer.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGRenderSupportcpp">trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGRenderTreeAsTextcpp">trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGRenderingContextcpp">trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGResourcescpp">trunk/Source/WebCore/rendering/svg/SVGResources.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAElementcpp">trunk/Source/WebCore/svg/SVGAElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimateElementcpp">trunk/Source/WebCore/svg/SVGAnimateElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimateElementh">trunk/Source/WebCore/svg/SVGAnimateElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimationElementcpp">trunk/Source/WebCore/svg/SVGAnimationElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGElementcpp">trunk/Source/WebCore/svg/SVGElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGElementh">trunk/Source/WebCore/svg/SVGElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFilterPrimitiveStandardAttributesh">trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGGradientElementcpp">trunk/Source/WebCore/svg/SVGGradientElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGGradientElementh">trunk/Source/WebCore/svg/SVGGradientElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGGraphicsElementh">trunk/Source/WebCore/svg/SVGGraphicsElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGLinearGradientElementcpp">trunk/Source/WebCore/svg/SVGLinearGradientElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGLocatablecpp">trunk/Source/WebCore/svg/SVGLocatable.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGPolyElementcpp">trunk/Source/WebCore/svg/SVGPolyElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGPolyElementh">trunk/Source/WebCore/svg/SVGPolyElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGRadialGradientElementcpp">trunk/Source/WebCore/svg/SVGRadialGradientElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGTextContentElementcpp">trunk/Source/WebCore/svg/SVGTextContentElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGTextContentElementh">trunk/Source/WebCore/svg/SVGTextContentElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGUseElementcpp">trunk/Source/WebCore/svg/SVGUseElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvganimationSVGSMILElementcpp">trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvganimationSVGSMILElementh">trunk/Source/WebCore/svg/animation/SVGSMILElement.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/ChangeLog        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -1,3 +1,135 @@
</span><ins>+2014-09-25  Christophe Dumez  &lt;cdumez@apple.com&gt;
+
+        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&lt;&gt;() / downcast&lt;&gt;()
+        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&lt;&gt;() function. This was an
+        issue when is&lt;&gt;() 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&lt;&lt;):
+        * 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&lt;&gt;() / downcast&lt;&gt;() 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&lt;SVGElement&gt;() check when the input type is an SVGElement.
+
+        * svg/SVGAnimationElement.cpp:
+        (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::getBoundingBox):
+        Use is&lt;&gt;() / downcast&lt;&gt;() 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&lt;SVGElement&gt;() 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&lt;&gt;() / downcast&lt;&gt;() 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&lt;SVGElement&gt;() 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&lt;&gt;() / downcast&lt;&gt;() where appropriate.
+
+        * svg/SVGTextContentElement.h:
+        WebCore::isSVGTextContentElement):
+        Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS().
+
+        * svg/SVGUseElement.cpp:
+        (WebCore::SVGUseElement::toClipPath):
+        Use is&lt;&gt;() / downcast&lt;&gt;() 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&lt;&gt;() / downcast&lt;&gt;() 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.
+
</ins><span class="cx"> 2014-09-25  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Minor refactoring to mediaType/presentationType
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -1712,7 +1712,7 @@
</span><span class="cx"> 
</span><span class="cx">         renderer = styledNode-&gt;renderer();
</span><span class="cx"> 
</span><del>-        if (propertyID == CSSPropertyDisplay &amp;&amp; !renderer &amp;&amp; isSVGElement(*styledNode) &amp;&amp; !downcast&lt;SVGElement&gt;(*styledNode).isValid())
</del><ins>+        if (propertyID == CSSPropertyDisplay &amp;&amp; !renderer &amp;&amp; is&lt;SVGElement&gt;(*styledNode) &amp;&amp; !downcast&lt;SVGElement&gt;(*styledNode).isValid())
</ins><span class="cx">             return nullptr;
</span><span class="cx"> 
</span><span class="cx">         style = computeRenderStyleForProperty(styledNode, m_pseudoElementSpecifier, propertyID);
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.h (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.h        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/dom/Element.h        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -672,7 +672,7 @@
</span><span class="cx"> 
</span><span class="cx"> template &lt;&gt;
</span><span class="cx"> struct NodeTypeCastTraits&lt;const Element, const Node&gt; {
</span><del>-    static bool is(const Node&amp; node) { return node.isElementNode(); }
</del><ins>+    static bool isType(const Node&amp; node) { return node.isElementNode(); }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> inline bool Node::hasAttributes() const
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.h (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.h        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/dom/Node.h        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -741,12 +741,12 @@
</span><span class="cx"> 
</span><span class="cx"> template &lt;typename ExpectedType, typename ArgType&gt;
</span><span class="cx"> struct NodeTypeCastTraits {
</span><del>-    static bool is(ArgType&amp;);
</del><ins>+    static bool isType(ArgType&amp;);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> template &lt;typename ExpectedType&gt;
</span><span class="cx"> struct NodeTypeCastTraits&lt;ExpectedType, ExpectedType&gt; {
</span><del>-    static bool is(ExpectedType&amp;) { return true; }
</del><ins>+    static bool isType(ExpectedType&amp;) { return true; }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> // Type checking function for Nodes, to use before casting with downcast&lt;&gt;().
</span><span class="lines">@@ -754,7 +754,7 @@
</span><span class="cx"> inline bool is(ArgType&amp; node)
</span><span class="cx"> {
</span><span class="cx">     static_assert(!std::is_base_of&lt;ExpectedType, ArgType&gt;::value, &quot;Unnecessary type check&quot;);
</span><del>-    return NodeTypeCastTraits&lt;const ExpectedType, const ArgType&gt;::is(node);
</del><ins>+    return NodeTypeCastTraits&lt;const ExpectedType, const ArgType&gt;::isType(node);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template &lt;typename ExpectedType, typename ArgType&gt;
</span><span class="lines">@@ -762,7 +762,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(node);
</span><span class="cx">     static_assert(!std::is_base_of&lt;ExpectedType, ArgType&gt;::value, &quot;Unnecessary type check&quot;);
</span><del>-    return NodeTypeCastTraits&lt;const ExpectedType, const ArgType&gt;::is(*node);
</del><ins>+    return NodeTypeCastTraits&lt;const ExpectedType, const ArgType&gt;::isType(*node);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // Downcasting functions for Node types.
</span><span class="lines">@@ -785,7 +785,7 @@
</span><span class="cx">     template &lt;typename ArgType&gt; \
</span><span class="cx">     class NodeTypeCastTraits&lt;const ClassName, ArgType&gt; { \
</span><span class="cx">     public: \
</span><del>-        static bool is(ArgType&amp; node) { return is##ClassName(node); } \
</del><ins>+        static bool isType(ArgType&amp; node) { return is##ClassName(node); } \
</ins><span class="cx">     private:
</span><span class="cx"> 
</span><span class="cx"> #define SPECIALIZE_TYPE_TRAITS_END() \
</span></span></pre></div>
<a id="trunkSourceWebCoredommake_namespl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/make_names.pl (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/make_names.pl        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/dom/make_names.pl        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -638,7 +638,7 @@
</span><span class="cx"> template &lt;typename ArgType&gt;
</span><span class="cx"> class NodeTypeCastTraits&lt;const $class, ArgType&gt; {
</span><span class="cx"> public:
</span><del>-    static bool is(ArgType&amp; node) { return checkTagName(node); }
</del><ins>+    static bool isType(ArgType&amp; node) { return checkTagName(node); }
</ins><span class="cx"> private:
</span><span class="cx"> END
</span><span class="cx">        ;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLElement.h (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLElement.h        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/html/HTMLElement.h        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -151,7 +151,7 @@
</span><span class="cx"> 
</span><span class="cx"> template &lt;typename ArgType&gt;
</span><span class="cx"> struct NodeTypeCastTraits&lt;const HTMLElement, ArgType&gt; {
</span><del>-    static bool is(ArgType&amp; node) { return isHTMLElement(node); }
</del><ins>+    static bool isType(ArgType&amp; node) { return isHTMLElement(node); }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> NODE_TYPE_CASTS(HTMLElement)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.h        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -916,7 +916,7 @@
</span><span class="cx"> 
</span><span class="cx"> template &lt;typename ArgType&gt;
</span><span class="cx"> struct NodeTypeCastTraits&lt;const HTMLMediaElement, ArgType&gt; {
</span><del>-    static bool is(ArgType&amp; node) { return isHTMLMediaElement(node); }
</del><ins>+    static bool isType(ArgType&amp; node) { return isHTMLMediaElement(node); }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> NODE_TYPE_CASTS(HTMLMediaElement)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLPlugInImageElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLPlugInImageElement.h (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLPlugInImageElement.h        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/html/HTMLPlugInImageElement.h        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -163,7 +163,7 @@
</span><span class="cx"> 
</span><span class="cx"> template &lt;typename ArgType&gt;
</span><span class="cx"> struct NodeTypeCastTraits&lt;const HTMLPlugInImageElement, ArgType&gt; {
</span><del>-    static bool is(ArgType&amp; node) { return isHTMLPlugInImageElement(node); }
</del><ins>+    static bool isType(ArgType&amp; node) { return isHTMLPlugInImageElement(node); }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> NODE_TYPE_CASTS(HTMLPlugInImageElement)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlLabelableElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/LabelableElement.h (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/LabelableElement.h        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/html/LabelableElement.h        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> 
</span><span class="cx"> template &lt;typename ArgType&gt;
</span><span class="cx"> struct NodeTypeCastTraits&lt;const LabelableElement, ArgType&gt; {
</span><del>-    static bool is(ArgType&amp; node) { return isLabelableElement(node); }
</del><ins>+    static bool isType(ArgType&amp; node) { return isLabelableElement(node); }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> NODE_TYPE_CASTS(LabelableElement)
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlMathMLElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/MathMLElement.h (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/MathMLElement.h        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/mathml/MathMLElement.h        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx"> 
</span><span class="cx"> template &lt;typename ArgType&gt;
</span><span class="cx"> struct NodeTypeCastTraits&lt;const MathMLElement, ArgType&gt; {
</span><del>-    static bool is(ArgType&amp; node) { return isMathMLElement(node); }
</del><ins>+    static bool isType(ArgType&amp; node) { return isMathMLElement(node); }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> NODE_TYPE_CASTS(MathMLElement)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGBlock.h (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGBlock.h        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGBlock.h        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx"> public:
</span><span class="cx">     virtual LayoutRect visualOverflowRect() const override final;
</span><span class="cx"> 
</span><del>-    SVGGraphicsElement&amp; graphicsElement() const { return toSVGGraphicsElement(nodeForNonAnonymous()); }
</del><ins>+    SVGGraphicsElement&amp; graphicsElement() const { return downcast&lt;SVGGraphicsElement&gt;(nodeForNonAnonymous()); }
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     RenderSVGBlock(SVGGraphicsElement&amp;, PassRef&lt;RenderStyle&gt;);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGGradientStopcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -67,8 +67,8 @@
</span><span class="cx"> 
</span><span class="cx"> SVGGradientElement* RenderSVGGradientStop::gradientElement()
</span><span class="cx"> {
</span><del>-    if (element().parentElement() &amp;&amp; isSVGGradientElement(*element().parentElement()))
-        return &amp;toSVGGradientElement(*element().parentElement());
</del><ins>+    if (element().parentElement() &amp;&amp; is&lt;SVGGradientElement&gt;(*element().parentElement()))
+        return &amp;downcast&lt;SVGGradientElement&gt;(*element().parentElement());
</ins><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGInlineh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGInline.h (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGInline.h        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGInline.h        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> public:
</span><span class="cx">     RenderSVGInline(SVGGraphicsElement&amp;, PassRef&lt;RenderStyle&gt;);
</span><span class="cx"> 
</span><del>-    SVGGraphicsElement&amp; graphicsElement() const { return toSVGGraphicsElement(nodeForNonAnonymous()); }
</del><ins>+    SVGGraphicsElement&amp; graphicsElement() const { return downcast&lt;SVGGraphicsElement&gt;(nodeForNonAnonymous()); }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     void element() const = delete;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGResourceClippercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">             return false;
</span><span class="cx">         if (!childNode-&gt;isSVGElement() || !downcast&lt;SVGElement&gt;(*childNode).isSVGGraphicsElement())
</span><span class="cx">             continue;
</span><del>-        SVGGraphicsElement&amp; styled = toSVGGraphicsElement(*childNode);
</del><ins>+        SVGGraphicsElement&amp; styled = downcast&lt;SVGGraphicsElement&gt;(*childNode);
</ins><span class="cx">         const RenderStyle&amp; style = renderer-&gt;style();
</span><span class="cx">         if (style.display() == NONE || style.visibility() != VISIBLE)
</span><span class="cx">              continue;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGResourceContainercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -211,7 +211,7 @@
</span><span class="cx">     if (!object-&gt;isSVGShape())
</span><span class="cx">         return resourceTransform;
</span><span class="cx"> 
</span><del>-    SVGGraphicsElement* element = toSVGGraphicsElement(object-&gt;node());
</del><ins>+    SVGGraphicsElement* element = downcast&lt;SVGGraphicsElement&gt;(object-&gt;node());
</ins><span class="cx">     AffineTransform transform = element-&gt;getScreenCTM(SVGLocatable::DisallowStyleUpdate);
</span><span class="cx">     transform *= resourceTransform;
</span><span class="cx">     return transform;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGShapeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGShape.h (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGShape.h        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGShape.h        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx">     RenderSVGShape(SVGGraphicsElement&amp;, PassRef&lt;RenderStyle&gt;, Path*, bool);
</span><span class="cx">     virtual ~RenderSVGShape();
</span><span class="cx"> 
</span><del>-    SVGGraphicsElement&amp; graphicsElement() const { return toSVGGraphicsElement(RenderSVGModelObject::element()); }
</del><ins>+    SVGGraphicsElement&amp; graphicsElement() const { return downcast&lt;SVGGraphicsElement&gt;(RenderSVGModelObject::element()); }
</ins><span class="cx"> 
</span><span class="cx">     void setNeedsShapeUpdate() { m_needsShapeUpdate = true; }
</span><span class="cx">     virtual void setNeedsBoundariesUpdate() override final { m_needsBoundariesUpdate = true; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGTransformableContainerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGTransformableContainer.h (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGTransformableContainer.h        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGTransformableContainer.h        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> class RenderSVGTransformableContainer final : public RenderSVGContainer {
</span><span class="cx"> public:
</span><span class="cx">     RenderSVGTransformableContainer(SVGGraphicsElement&amp;, PassRef&lt;RenderStyle&gt;);
</span><del>-    SVGGraphicsElement&amp; graphicsElement() { return toSVGGraphicsElement(RenderSVGContainer::element()); }
</del><ins>+    SVGGraphicsElement&amp; graphicsElement() { return downcast&lt;SVGGraphicsElement&gt;(RenderSVGContainer::element()); }
</ins><span class="cx"> 
</span><span class="cx">     virtual bool isSVGTransformableContainer() const { return true; }
</span><span class="cx">     virtual const AffineTransform&amp; localToParentTransform() const { return m_localTransform; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGRenderSupportcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -464,7 +464,7 @@
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><span class="cx">         if (ancestor-&gt;computedStyle()-&gt;svgStyle().hasMasker())
</span><del>-            toSVGGraphicsElement(*ancestor).setShouldIsolateBlending(maskedAncestorShouldIsolateBlending);
</del><ins>+            downcast&lt;SVGGraphicsElement&gt;(*ancestor).setShouldIsolateBlending(maskedAncestorShouldIsolateBlending);
</ins><span class="cx"> 
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGRenderTreeAsTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -343,8 +343,8 @@
</span><span class="cx">         writeNameValuePair(ts, &quot;cx&quot;, element.cx().value(lengthContext));
</span><span class="cx">         writeNameValuePair(ts, &quot;cy&quot;, element.cy().value(lengthContext));
</span><span class="cx">         writeNameValuePair(ts, &quot;r&quot;, element.r().value(lengthContext));
</span><del>-    } else if (svgElement.hasTagName(SVGNames::polygonTag) || svgElement.hasTagName(SVGNames::polylineTag)) {
-        const SVGPolyElement&amp; element = toSVGPolyElement(svgElement);
</del><ins>+    } else if (is&lt;SVGPolyElement&gt;(svgElement)) {
+        const SVGPolyElement&amp; element = downcast&lt;SVGPolyElement&gt;(svgElement);
</ins><span class="cx">         writeNameAndQuotedValue(ts, &quot;points&quot;, element.pointList().valueAsString());
</span><span class="cx">     } else if (is&lt;SVGPathElement&gt;(svgElement)) {
</span><span class="cx">         const SVGPathElement&amp; element = downcast&lt;SVGPathElement&gt;(svgElement);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGRenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -105,8 +105,8 @@
</span><span class="cx">     bool isolateMaskForBlending = false;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_COMPOSITING)
</span><del>-    if (svgStyle.hasMasker() &amp;&amp; downcast&lt;SVGElement&gt;(renderer.element())-&gt;isSVGGraphicsElement()) {
-        SVGGraphicsElement&amp; graphicsElement = toSVGGraphicsElement(*renderer.element());
</del><ins>+    if (svgStyle.hasMasker() &amp;&amp; is&lt;SVGGraphicsElement&gt;(downcast&lt;SVGElement&gt;(renderer.element()))) {
+        SVGGraphicsElement&amp; graphicsElement = downcast&lt;SVGGraphicsElement&gt;(*renderer.element());
</ins><span class="cx">         isolateMaskForBlending = graphicsElement.shouldIsolateBlending();
</span><span class="cx">     }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGResourcescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGResources.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGResources.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/rendering/svg/SVGResources.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -143,8 +143,8 @@
</span><span class="cx">     String target;
</span><span class="cx">     if (is&lt;SVGPatternElement&gt;(element))
</span><span class="cx">         target = downcast&lt;SVGPatternElement&gt;(element).href();
</span><del>-    else if (isSVGGradientElement(element))
-        target = toSVGGradientElement(element).href();
</del><ins>+    else if (is&lt;SVGGradientElement&gt;(element))
+        target = downcast&lt;SVGGradientElement&gt;(element).href();
</ins><span class="cx">     else if (is&lt;SVGFilterElement&gt;(element))
</span><span class="cx">         target = downcast&lt;SVGFilterElement&gt;(element).href();
</span><span class="cx">     else
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAElement.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAElement.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/SVGAElement.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -160,8 +160,8 @@
</span><span class="cx"> 
</span><span class="cx">             if (url[0] == '#') {
</span><span class="cx">                 Element* targetElement = treeScope().getElementById(url.substringSharingImpl(1));
</span><del>-                if (targetElement &amp;&amp; isSVGSMILElement(*targetElement)) {
-                    toSVGSMILElement(*targetElement).beginByLinkActivation();
</del><ins>+                if (targetElement &amp;&amp; is&lt;SVGSMILElement&gt;(*targetElement)) {
+                    downcast&lt;SVGSMILElement&gt;(*targetElement).beginByLinkActivation();
</ins><span class="cx">                     event-&gt;setDefaultHandled();
</span><span class="cx">                     return;
</span><span class="cx">                 }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimateElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimateElement.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimateElement.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/SVGAnimateElement.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx">     ASSERT(m_fromType-&gt;type() == m_animatedPropertyType);
</span><span class="cx">     ASSERT(m_toType);
</span><span class="cx"> 
</span><del>-    SVGAnimateElement&amp; resultAnimationElement = toSVGAnimateElement(*resultElement);
</del><ins>+    SVGAnimateElement&amp; resultAnimationElement = downcast&lt;SVGAnimateElement&gt;(*resultElement);
</ins><span class="cx">     ASSERT(resultAnimationElement.m_animatedType);
</span><span class="cx">     ASSERT(resultAnimationElement.m_animatedPropertyType == m_animatedPropertyType);
</span><span class="cx"> 
</span><span class="lines">@@ -459,12 +459,4 @@
</span><span class="cx">     return m_animator.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool isSVGAnimateElement(const Node&amp; node)
-{
-    return node.hasTagName(SVGNames::animateTag)
-        || node.hasTagName(SVGNames::animateColorTag)
-        || node.hasTagName(SVGNames::animateTransformTag)
-        || node.hasTagName(SVGNames::setTag);
</del><span class="cx"> }
</span><del>-
-}
</del></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimateElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimateElement.h (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimateElement.h        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/SVGAnimateElement.h        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -74,9 +74,14 @@
</span><span class="cx">     std::unique_ptr&lt;SVGAnimatedTypeAnimator&gt; m_animator;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-void isSVGAnimateElement(const SVGAnimateElement&amp;); // Catch unnecessary runtime check of type known at compile time.
-bool isSVGAnimateElement(const Node&amp;);
-NODE_TYPE_CASTS(SVGAnimateElement)
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(SVGAnimateElement)
+    static bool isSVGAnimateElement(const SVGElement&amp; element)
+    {
+        return element.hasTagName(SVGNames::animateTag) || element.hasTagName(SVGNames::animateColorTag)
+            || element.hasTagName(SVGNames::animateTransformTag) || element.hasTagName(SVGNames::setTag);
+    }
+    static bool isSVGAnimateElement(const Node&amp; node) { return is&lt;SVGElement&gt;(node) &amp;&amp; isSVGAnimateElement(downcast&lt;SVGElement&gt;(node)); }
+SPECIALIZE_TYPE_TRAITS_END()
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimationElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimationElement.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimationElement.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/SVGAnimationElement.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -508,7 +508,7 @@
</span><span class="cx"> 
</span><span class="cx">     CalcMode calcMode = this-&gt;calcMode();
</span><span class="cx">     if (hasTagName(SVGNames::animateTag) || hasTagName(SVGNames::animateColorTag)) {
</span><del>-        AnimatedPropertyType attributeType = toSVGAnimateElement(*this).determineAnimatedPropertyType(targetElement());
</del><ins>+        AnimatedPropertyType attributeType = downcast&lt;SVGAnimateElement&gt;(*this).determineAnimatedPropertyType(targetElement());
</ins><span class="cx">         // Fall back to discrete animations for Strings.
</span><span class="cx">         if (attributeType == AnimatedBoolean
</span><span class="cx">             || attributeType == AnimatedEnumeration
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGElement.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGElement.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/SVGElement.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -452,8 +452,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool SVGElement::getBoundingBox(FloatRect&amp; rect, SVGLocatable::StyleUpdateStrategy styleUpdateStrategy)
</span><span class="cx"> {
</span><del>-    if (isSVGGraphicsElement()) {
-        rect = toSVGGraphicsElement(*this).getBBox(styleUpdateStrategy);
</del><ins>+    if (is&lt;SVGGraphicsElement&gt;(*this)) {
+        rect = downcast&lt;SVGGraphicsElement&gt;(*this).getBBox(styleUpdateStrategy);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx">     return false;
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGElement.h (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGElement.h        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/SVGElement.h        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -221,16 +221,10 @@
</span><span class="cx">     static bool equal(const QualifiedName&amp; a, const QualifiedName&amp; b) { return a.matches(b); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-void isSVGElement(const SVGElement&amp;); // Catch unnecessary runtime check of type known at compile time.
-inline bool isSVGElement(const Node&amp; node) { return node.isSVGElement(); }
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(SVGElement)
+    static bool isSVGElement(const Node&amp; node) { return node.isSVGElement(); }
+SPECIALIZE_TYPE_TRAITS_END()
</ins><span class="cx"> 
</span><del>-template &lt;typename ArgType&gt;
-struct NodeTypeCastTraits&lt;const SVGElement, ArgType&gt; {
-    static bool is(ArgType&amp; node) { return isSVGElement(node); }
-};
-
-NODE_TYPE_CASTS(SVGElement)
-
</del><span class="cx"> inline bool Node::hasTagName(const SVGQualifiedName&amp; name) const
</span><span class="cx"> {
</span><span class="cx">     return isSVGElement() &amp;&amp; downcast&lt;SVGElement&gt;(*this).hasTagName(name);
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFilterPrimitiveStandardAttributesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -82,18 +82,11 @@
</span><span class="cx"> 
</span><span class="cx"> void invalidateFilterPrimitiveParent(SVGElement*);
</span><span class="cx"> 
</span><del>-void isSVGFilterPrimitiveStandardAttributes(const SVGFilterPrimitiveStandardAttributes&amp;); // Catch unnecessary runtime check of type known at compile time.
-inline bool isSVGFilterPrimitiveStandardAttributes(const SVGElement&amp; element) { return element.isFilterEffect(); }
-inline bool isSVGFilterPrimitiveStandardAttributes(const Node&amp; node) { return node.isSVGElement() &amp;&amp; downcast&lt;SVGElement&gt;(node).isFilterEffect(); }
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(SVGFilterPrimitiveStandardAttributes)
+    static bool isSVGFilterPrimitiveStandardAttributes(const SVGElement&amp; element) { return element.isFilterEffect(); }
+    static bool isSVGFilterPrimitiveStandardAttributes(const Node&amp; node) { return is&lt;SVGElement&gt;(node) &amp;&amp; isSVGFilterPrimitiveStandardAttributes(downcast&lt;SVGElement&gt;(node)); }
+SPECIALIZE_TYPE_TRAITS_END()
</ins><span class="cx"> 
</span><del>-template &lt;typename ArgType&gt;
-struct NodeTypeCastTraits&lt;const SVGFilterPrimitiveStandardAttributes, ArgType&gt; {
-    static bool is(ArgType&amp; node) { return isSVGFilterPrimitiveStandardAttributes(node); }
-};
-
-NODE_TYPE_CASTS(SVGFilterPrimitiveStandardAttributes)
-
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGGradientElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGGradientElement.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGGradientElement.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/SVGGradientElement.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -160,9 +160,4 @@
</span><span class="cx">     return stops;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool isSVGGradientElement(const Node&amp; node)
-{
-    return node.hasTagName(SVGNames::radialGradientTag) || node.hasTagName(SVGNames::linearGradientTag);
</del><span class="cx"> }
</span><del>-
-}
</del></span></pre></div>
<a id="trunkSourceWebCoresvgSVGGradientElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGGradientElement.h (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGGradientElement.h        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/SVGGradientElement.h        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -107,9 +107,16 @@
</span><span class="cx">     END_DECLARE_ANIMATED_PROPERTIES
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-void isSVGGradientElement(const SVGGradientElement&amp;); // Catch unnecessary runtime check of type known at compile time.
-bool isSVGGradientElement(const Node&amp;);
-NODE_TYPE_CASTS(SVGGradientElement)
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(SVGGradientElement)
+static bool isSVGGradientElement(const SVGElement&amp; element)
+{
+    return element.hasTagName(SVGNames::radialGradientTag) || element.hasTagName(SVGNames::linearGradientTag);
+}
+static bool isSVGGradientElement(const Node&amp; node)
+{
+    return is&lt;SVGElement&gt;(node) &amp;&amp; isSVGGradientElement(downcast&lt;SVGElement&gt;(node));
+}
+SPECIALIZE_TYPE_TRAITS_END()
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGGraphicsElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGGraphicsElement.h (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGGraphicsElement.h        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/SVGGraphicsElement.h        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -82,10 +82,10 @@
</span><span class="cx">     bool m_shouldIsolateBlending;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-void isSVGGraphicsElement(const SVGGraphicsElement&amp;); // Catch unnecessary runtime check of type known at compile time.
-inline bool isSVGGraphicsElement(const SVGElement&amp; element) { return element.isSVGGraphicsElement(); }
-inline bool isSVGGraphicsElement(const Node&amp; node) { return node.isSVGElement() &amp;&amp; downcast&lt;SVGElement&gt;(node).isSVGGraphicsElement(); }
-NODE_TYPE_CASTS(SVGGraphicsElement)
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(SVGGraphicsElement)
+    static bool isSVGGraphicsElement(const SVGElement&amp; element) { return element.isSVGGraphicsElement(); }
+    static bool isSVGGraphicsElement(const Node&amp; node) { return is&lt;SVGElement&gt;(node) &amp;&amp; isSVGGraphicsElement(downcast&lt;SVGElement&gt;(node)); }
+SPECIALIZE_TYPE_TRAITS_END()
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGLinearGradientElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGLinearGradientElement.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGLinearGradientElement.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/SVGLinearGradientElement.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -173,8 +173,8 @@
</span><span class="cx">     while (true) {
</span><span class="cx">         // Respect xlink:href, take attributes from referenced element
</span><span class="cx">         Node* refNode = SVGURIReference::targetElementFromIRIString(current-&gt;href(), document());
</span><del>-        if (refNode &amp;&amp; isSVGGradientElement(*refNode)) {
-            current = toSVGGradientElement(refNode);
</del><ins>+        if (refNode &amp;&amp; is&lt;SVGGradientElement&gt;(*refNode)) {
+            current = downcast&lt;SVGGradientElement&gt;(refNode);
</ins><span class="cx"> 
</span><span class="cx">             // Cycle detection
</span><span class="cx">             if (processedGradients.contains(current))
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGLocatablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGLocatable.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGLocatable.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/SVGLocatable.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -101,8 +101,8 @@
</span><span class="cx"> {
</span><span class="cx">     AffineTransform ctm = getCTM(styleUpdateStrategy);
</span><span class="cx"> 
</span><del>-    if (target &amp;&amp; target-&gt;isSVGGraphicsElement()) {
-        AffineTransform targetCTM = toSVGGraphicsElement(*target).getCTM(styleUpdateStrategy);
</del><ins>+    if (target &amp;&amp; is&lt;SVGGraphicsElement&gt;(target)) {
+        AffineTransform targetCTM = downcast&lt;SVGGraphicsElement&gt;(*target).getCTM(styleUpdateStrategy);
</ins><span class="cx">         if (!targetCTM.isInvertible()) {
</span><span class="cx">             ec = SVGException::SVG_MATRIX_NOT_INVERTABLE;
</span><span class="cx">             return ctm;
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGPolyElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGPolyElement.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGPolyElement.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/SVGPolyElement.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx"> void SVGPolyElement::synchronizePoints(SVGElement* contextElement)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(contextElement);
</span><del>-    SVGPolyElement&amp; ownerType = toSVGPolyElement(*contextElement);
</del><ins>+    SVGPolyElement&amp; ownerType = downcast&lt;SVGPolyElement&gt;(*contextElement);
</ins><span class="cx">     if (!ownerType.m_points.shouldSynchronize)
</span><span class="cx">         return;
</span><span class="cx">     ownerType.m_points.synchronize(&amp;ownerType, pointsPropertyInfo()-&gt;attributeName, ownerType.m_points.value.valueAsString());
</span><span class="lines">@@ -141,7 +141,7 @@
</span><span class="cx"> PassRefPtr&lt;SVGAnimatedProperty&gt; SVGPolyElement::lookupOrCreatePointsWrapper(SVGElement* contextElement)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(contextElement);
</span><del>-    SVGPolyElement&amp; ownerType = toSVGPolyElement(*contextElement);
</del><ins>+    SVGPolyElement&amp; ownerType = downcast&lt;SVGPolyElement&gt;(*contextElement);
</ins><span class="cx">     return SVGAnimatedProperty::lookupOrCreateWrapper&lt;SVGPolyElement, SVGAnimatedPointList, SVGPointList&gt;
</span><span class="cx">         (&amp;ownerType, pointsPropertyInfo(), ownerType.m_points.value);
</span><span class="cx"> }
</span><span class="lines">@@ -158,9 +158,4 @@
</span><span class="cx">     return static_cast&lt;SVGListPropertyTearOff&lt;SVGPointList&gt;*&gt;(static_pointer_cast&lt;SVGAnimatedPointList&gt;(lookupOrCreatePointsWrapper(this))-&gt;animVal());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool isSVGPolyElement(const Node&amp; node)
-{
-    return node.hasTagName(SVGNames::polygonTag) || node.hasTagName(SVGNames::polylineTag);
</del><span class="cx"> }
</span><del>-
-}
</del></span></pre></div>
<a id="trunkSourceWebCoresvgSVGPolyElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGPolyElement.h (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGPolyElement.h        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/SVGPolyElement.h        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -62,9 +62,10 @@
</span><span class="cx">     mutable SVGSynchronizableAnimatedProperty&lt;SVGPointList&gt; m_points;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-void isSVGPolyElement(const SVGPolyElement&amp;); // Catch unnecessary runtime check of type known at compile time.
-bool isSVGPolyElement(const Node&amp;);
-NODE_TYPE_CASTS(SVGPolyElement)
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(SVGPolyElement)
+    static bool isSVGPolyElement(const SVGElement&amp; element) { return element.hasTagName(SVGNames::polygonTag) || element.hasTagName(SVGNames::polylineTag); }
+    static bool isSVGPolyElement(const Node&amp; node) { return is&lt;SVGElement&gt;(node) &amp;&amp; isSVGPolyElement(downcast&lt;SVGElement&gt;(node)); }
+SPECIALIZE_TYPE_TRAITS_END()
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGRadialGradientElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGRadialGradientElement.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGRadialGradientElement.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/SVGRadialGradientElement.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -191,8 +191,8 @@
</span><span class="cx">     while (true) {
</span><span class="cx">         // Respect xlink:href, take attributes from referenced element
</span><span class="cx">         Node* refNode = SVGURIReference::targetElementFromIRIString(current-&gt;href(), document());
</span><del>-        if (refNode &amp;&amp; isSVGGradientElement(*refNode)) {
-            current = toSVGGradientElement(refNode);
</del><ins>+        if (refNode &amp;&amp; is&lt;SVGGradientElement&gt;(*refNode)) {
+            current = downcast&lt;SVGGradientElement&gt;(refNode);
</ins><span class="cx"> 
</span><span class="cx">             // Cycle detection
</span><span class="cx">             if (processedGradients.contains(current))
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGTextContentElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGTextContentElement.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGTextContentElement.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/SVGTextContentElement.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> void SVGTextContentElement::synchronizeTextLength(SVGElement* contextElement)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(contextElement);
</span><del>-    SVGTextContentElement&amp; ownerType = toSVGTextContentElement(*contextElement);
</del><ins>+    SVGTextContentElement&amp; ownerType = downcast&lt;SVGTextContentElement&gt;(*contextElement);
</ins><span class="cx">     if (!ownerType.m_textLength.shouldSynchronize)
</span><span class="cx">         return;
</span><span class="cx">     AtomicString value(SVGPropertyTraits&lt;SVGLength&gt;::toString(ownerType.m_specifiedTextLength));
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> PassRefPtr&lt;SVGAnimatedProperty&gt; SVGTextContentElement::lookupOrCreateTextLengthWrapper(SVGElement* contextElement)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(contextElement);
</span><del>-    SVGTextContentElement&amp; ownerType = toSVGTextContentElement(*contextElement);
</del><ins>+    SVGTextContentElement&amp; ownerType = downcast&lt;SVGTextContentElement&gt;(*contextElement);
</ins><span class="cx">     return SVGAnimatedProperty::lookupOrCreateWrapper&lt;SVGTextContentElement, SVGAnimatedLength, SVGLength&gt;
</span><span class="cx">         (&amp;ownerType, textLengthPropertyInfo(), ownerType.m_textLength.value);
</span><span class="cx"> }
</span><span class="lines">@@ -296,10 +296,10 @@
</span><span class="cx">     SVGElement* element = downcast&lt;SVGElement&gt;(renderer-&gt;node());
</span><span class="cx">     ASSERT(element);
</span><span class="cx"> 
</span><del>-    if (!element-&gt;isTextContent())
</del><ins>+    if (!is&lt;SVGTextContentElement&gt;(element))
</ins><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    return toSVGTextContentElement(element);
</del><ins>+    return downcast&lt;SVGTextContentElement&gt;(element);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGTextContentElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGTextContentElement.h (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGTextContentElement.h        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/SVGTextContentElement.h        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -119,10 +119,10 @@
</span><span class="cx">     END_DECLARE_ANIMATED_PROPERTIES
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-void isSVGTextContentElement(const SVGTextContentElement&amp;); // Catch unnecessary runtime check of type known at compile time.
-inline bool isSVGTextContentElement(const SVGElement&amp; element) { return element.isTextContent(); }
-inline bool isSVGTextContentElement(const Node&amp; node) { return node.isSVGElement() &amp;&amp; downcast&lt;SVGElement&gt;(node).isTextContent(); }
-NODE_TYPE_CASTS(SVGTextContentElement)
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(SVGTextContentElement)
+    static bool isSVGTextContentElement(const SVGElement&amp; element) { return element.isTextContent(); }
+    static bool isSVGTextContentElement(const Node&amp; node) { return is&lt;SVGElement&gt;(node) &amp;&amp; isSVGTextContentElement(downcast&lt;SVGElement&gt;(node)); }
+SPECIALIZE_TYPE_TRAITS_END()
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGUseElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGUseElement.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGUseElement.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/SVGUseElement.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -543,16 +543,16 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(path.isEmpty());
</span><span class="cx"> 
</span><del>-    Node* node = m_targetElementInstance ? m_targetElementInstance-&gt;shadowTreeElement() : nullptr;
-    if (!node)
</del><ins>+    SVGElement* element = m_targetElementInstance ? m_targetElementInstance-&gt;shadowTreeElement() : nullptr;
+    if (!element)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (node-&gt;isSVGElement() &amp;&amp; downcast&lt;SVGElement&gt;(*node).isSVGGraphicsElement()) {
-        if (!isDirectReference(downcast&lt;SVGElement&gt;(*node))) {
</del><ins>+    if (is&lt;SVGGraphicsElement&gt;(element)) {
+        if (!isDirectReference(*element)) {
</ins><span class="cx">             // Spec: Indirect references are an error (14.3.5)
</span><span class="cx">             document().accessSVGExtensions().reportError(&quot;Not allowed to use indirect reference in &lt;clip-path&gt;&quot;);
</span><span class="cx">         } else {
</span><del>-            toSVGGraphicsElement(*node).toClipPath(path);
</del><ins>+            downcast&lt;SVGGraphicsElement&gt;(*element).toClipPath(path);
</ins><span class="cx">             // FIXME: Avoid manual resolution of x/y here. Its potentially harmful.
</span><span class="cx">             SVGLengthContext lengthContext(this);
</span><span class="cx">             path.translate(FloatSize(x().value(lengthContext), y().value(lengthContext)));
</span></span></pre></div>
<a id="trunkSourceWebCoresvganimationSVGSMILElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -168,7 +168,7 @@
</span><span class="cx">         target = parentNode() &amp;&amp; parentNode()-&gt;isElementNode() ? toElement(parentNode()) : nullptr;
</span><span class="cx">     else
</span><span class="cx">         target = SVGURIReference::targetElementFromIRIString(href, document(), &amp;id);
</span><del>-    SVGElement* svgTarget = target &amp;&amp; target-&gt;isSVGElement() ? downcast&lt;SVGElement&gt;(target) : nullptr;
</del><ins>+    SVGElement* svgTarget = target &amp;&amp; is&lt;SVGElement&gt;(target) ? downcast&lt;SVGElement&gt;(target) : nullptr;
</ins><span class="cx"> 
</span><span class="cx">     if (svgTarget &amp;&amp; !svgTarget-&gt;inDocument())
</span><span class="cx">         svgTarget = nullptr;
</span><span class="lines">@@ -536,11 +536,11 @@
</span><span class="cx">             condition.m_syncbase = treeScope().getElementById(condition.m_baseID);
</span><span class="cx">             if (!condition.m_syncbase)
</span><span class="cx">                 continue;
</span><del>-            if (!isSVGSMILElement(*condition.m_syncbase)) {
</del><ins>+            if (!is&lt;SVGSMILElement&gt;(*condition.m_syncbase)) {
</ins><span class="cx">                 condition.m_syncbase = nullptr;
</span><span class="cx">                 continue;
</span><span class="cx">             }
</span><del>-            toSVGSMILElement(*condition.m_syncbase).addTimeDependent(this);
</del><ins>+            downcast&lt;SVGSMILElement&gt;(*condition.m_syncbase).addTimeDependent(this);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -568,7 +568,7 @@
</span><span class="cx">             condition.m_eventListener = nullptr;
</span><span class="cx">         } else if (condition.m_type == Condition::Syncbase) {
</span><span class="cx">             if (condition.m_syncbase)
</span><del>-                toSVGSMILElement(condition.m_syncbase.get())-&gt;removeTimeDependent(this);
</del><ins>+                downcast&lt;SVGSMILElement&gt;(condition.m_syncbase.get())-&gt;removeTimeDependent(this);
</ins><span class="cx">         }
</span><span class="cx">         condition.m_syncbase = nullptr;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoresvganimationSVGSMILElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.h (173969 => 173970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/animation/SVGSMILElement.h        2014-09-25 17:23:21 UTC (rev 173969)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.h        2014-09-25 17:25:43 UTC (rev 173970)
</span><span class="lines">@@ -237,18 +237,11 @@
</span><span class="cx">     friend class ConditionEventListener;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-void isSVGSMILElement(const SVGSMILElement&amp;); // Catch unnecessary runtime check of type known at compile time.
-inline bool isSVGSMILElement(const SVGElement&amp; element) { return element.isSMILElement(); }
-inline bool isSVGSMILElement(const Node&amp; node) { return node.isSVGElement() &amp;&amp; downcast&lt;SVGElement&gt;(node).isSMILElement(); }
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(SVGSMILElement)
+    static bool isSVGSMILElement(const SVGElement&amp; element) { return element.isSMILElement(); }
+    static bool isSVGSMILElement(const Node&amp; node) { return is&lt;SVGElement&gt;(node) &amp;&amp; isSVGSMILElement(downcast&lt;SVGElement&gt;(node)); }
+SPECIALIZE_TYPE_TRAITS_END()
</ins><span class="cx"> 
</span><del>-template &lt;typename ArgType&gt;
-struct NodeTypeCastTraits&lt;const SVGSMILElement, ArgType&gt; {
-    static bool is(ArgType&amp; node) { return isSVGSMILElement(node); }
-};
-
-
-NODE_TYPE_CASTS(SVGSMILElement)
-
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // SVGSMILElement_h
</span></span></pre>
</div>
</div>

</body>
</html>