<!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<>() / 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.</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 <cdumez@apple.com>
+
+ 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.
+
</ins><span class="cx"> 2014-09-25 Brent Fulgham <bfulgham@apple.com>
</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->renderer();
</span><span class="cx">
</span><del>- if (propertyID == CSSPropertyDisplay && !renderer && isSVGElement(*styledNode) && !downcast<SVGElement>(*styledNode).isValid())
</del><ins>+ if (propertyID == CSSPropertyDisplay && !renderer && is<SVGElement>(*styledNode) && !downcast<SVGElement>(*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 <>
</span><span class="cx"> struct NodeTypeCastTraits<const Element, const Node> {
</span><del>- static bool is(const Node& node) { return node.isElementNode(); }
</del><ins>+ static bool isType(const Node& 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 <typename ExpectedType, typename ArgType>
</span><span class="cx"> struct NodeTypeCastTraits {
</span><del>- static bool is(ArgType&);
</del><ins>+ static bool isType(ArgType&);
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> template <typename ExpectedType>
</span><span class="cx"> struct NodeTypeCastTraits<ExpectedType, ExpectedType> {
</span><del>- static bool is(ExpectedType&) { return true; }
</del><ins>+ static bool isType(ExpectedType&) { 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<>().
</span><span class="lines">@@ -754,7 +754,7 @@
</span><span class="cx"> inline bool is(ArgType& node)
</span><span class="cx"> {
</span><span class="cx"> static_assert(!std::is_base_of<ExpectedType, ArgType>::value, "Unnecessary type check");
</span><del>- return NodeTypeCastTraits<const ExpectedType, const ArgType>::is(node);
</del><ins>+ return NodeTypeCastTraits<const ExpectedType, const ArgType>::isType(node);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template <typename ExpectedType, typename ArgType>
</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<ExpectedType, ArgType>::value, "Unnecessary type check");
</span><del>- return NodeTypeCastTraits<const ExpectedType, const ArgType>::is(*node);
</del><ins>+ return NodeTypeCastTraits<const ExpectedType, const ArgType>::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 <typename ArgType> \
</span><span class="cx"> class NodeTypeCastTraits<const ClassName, ArgType> { \
</span><span class="cx"> public: \
</span><del>- static bool is(ArgType& node) { return is##ClassName(node); } \
</del><ins>+ static bool isType(ArgType& 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 <typename ArgType>
</span><span class="cx"> class NodeTypeCastTraits<const $class, ArgType> {
</span><span class="cx"> public:
</span><del>- static bool is(ArgType& node) { return checkTagName(node); }
</del><ins>+ static bool isType(ArgType& 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 <typename ArgType>
</span><span class="cx"> struct NodeTypeCastTraits<const HTMLElement, ArgType> {
</span><del>- static bool is(ArgType& node) { return isHTMLElement(node); }
</del><ins>+ static bool isType(ArgType& 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 <typename ArgType>
</span><span class="cx"> struct NodeTypeCastTraits<const HTMLMediaElement, ArgType> {
</span><del>- static bool is(ArgType& node) { return isHTMLMediaElement(node); }
</del><ins>+ static bool isType(ArgType& 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 <typename ArgType>
</span><span class="cx"> struct NodeTypeCastTraits<const HTMLPlugInImageElement, ArgType> {
</span><del>- static bool is(ArgType& node) { return isHTMLPlugInImageElement(node); }
</del><ins>+ static bool isType(ArgType& 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 <typename ArgType>
</span><span class="cx"> struct NodeTypeCastTraits<const LabelableElement, ArgType> {
</span><del>- static bool is(ArgType& node) { return isLabelableElement(node); }
</del><ins>+ static bool isType(ArgType& 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 <typename ArgType>
</span><span class="cx"> struct NodeTypeCastTraits<const MathMLElement, ArgType> {
</span><del>- static bool is(ArgType& node) { return isMathMLElement(node); }
</del><ins>+ static bool isType(ArgType& 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& graphicsElement() const { return toSVGGraphicsElement(nodeForNonAnonymous()); }
</del><ins>+ SVGGraphicsElement& graphicsElement() const { return downcast<SVGGraphicsElement>(nodeForNonAnonymous()); }
</ins><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> RenderSVGBlock(SVGGraphicsElement&, PassRef<RenderStyle>);
</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() && isSVGGradientElement(*element().parentElement()))
- return &toSVGGradientElement(*element().parentElement());
</del><ins>+ if (element().parentElement() && is<SVGGradientElement>(*element().parentElement()))
+ return &downcast<SVGGradientElement>(*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&, PassRef<RenderStyle>);
</span><span class="cx">
</span><del>- SVGGraphicsElement& graphicsElement() const { return toSVGGraphicsElement(nodeForNonAnonymous()); }
</del><ins>+ SVGGraphicsElement& graphicsElement() const { return downcast<SVGGraphicsElement>(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->isSVGElement() || !downcast<SVGElement>(*childNode).isSVGGraphicsElement())
</span><span class="cx"> continue;
</span><del>- SVGGraphicsElement& styled = toSVGGraphicsElement(*childNode);
</del><ins>+ SVGGraphicsElement& styled = downcast<SVGGraphicsElement>(*childNode);
</ins><span class="cx"> const RenderStyle& style = renderer->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->isSVGShape())
</span><span class="cx"> return resourceTransform;
</span><span class="cx">
</span><del>- SVGGraphicsElement* element = toSVGGraphicsElement(object->node());
</del><ins>+ SVGGraphicsElement* element = downcast<SVGGraphicsElement>(object->node());
</ins><span class="cx"> AffineTransform transform = element->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&, PassRef<RenderStyle>, Path*, bool);
</span><span class="cx"> virtual ~RenderSVGShape();
</span><span class="cx">
</span><del>- SVGGraphicsElement& graphicsElement() const { return toSVGGraphicsElement(RenderSVGModelObject::element()); }
</del><ins>+ SVGGraphicsElement& graphicsElement() const { return downcast<SVGGraphicsElement>(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&, PassRef<RenderStyle>);
</span><del>- SVGGraphicsElement& graphicsElement() { return toSVGGraphicsElement(RenderSVGContainer::element()); }
</del><ins>+ SVGGraphicsElement& graphicsElement() { return downcast<SVGGraphicsElement>(RenderSVGContainer::element()); }
</ins><span class="cx">
</span><span class="cx"> virtual bool isSVGTransformableContainer() const { return true; }
</span><span class="cx"> virtual const AffineTransform& 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->computedStyle()->svgStyle().hasMasker())
</span><del>- toSVGGraphicsElement(*ancestor).setShouldIsolateBlending(maskedAncestorShouldIsolateBlending);
</del><ins>+ downcast<SVGGraphicsElement>(*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, "cx", element.cx().value(lengthContext));
</span><span class="cx"> writeNameValuePair(ts, "cy", element.cy().value(lengthContext));
</span><span class="cx"> writeNameValuePair(ts, "r", element.r().value(lengthContext));
</span><del>- } else if (svgElement.hasTagName(SVGNames::polygonTag) || svgElement.hasTagName(SVGNames::polylineTag)) {
- const SVGPolyElement& element = toSVGPolyElement(svgElement);
</del><ins>+ } else if (is<SVGPolyElement>(svgElement)) {
+ const SVGPolyElement& element = downcast<SVGPolyElement>(svgElement);
</ins><span class="cx"> writeNameAndQuotedValue(ts, "points", element.pointList().valueAsString());
</span><span class="cx"> } else if (is<SVGPathElement>(svgElement)) {
</span><span class="cx"> const SVGPathElement& element = downcast<SVGPathElement>(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() && downcast<SVGElement>(renderer.element())->isSVGGraphicsElement()) {
- SVGGraphicsElement& graphicsElement = toSVGGraphicsElement(*renderer.element());
</del><ins>+ if (svgStyle.hasMasker() && is<SVGGraphicsElement>(downcast<SVGElement>(renderer.element()))) {
+ SVGGraphicsElement& graphicsElement = downcast<SVGGraphicsElement>(*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<SVGPatternElement>(element))
</span><span class="cx"> target = downcast<SVGPatternElement>(element).href();
</span><del>- else if (isSVGGradientElement(element))
- target = toSVGGradientElement(element).href();
</del><ins>+ else if (is<SVGGradientElement>(element))
+ target = downcast<SVGGradientElement>(element).href();
</ins><span class="cx"> else if (is<SVGFilterElement>(element))
</span><span class="cx"> target = downcast<SVGFilterElement>(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 && isSVGSMILElement(*targetElement)) {
- toSVGSMILElement(*targetElement).beginByLinkActivation();
</del><ins>+ if (targetElement && is<SVGSMILElement>(*targetElement)) {
+ downcast<SVGSMILElement>(*targetElement).beginByLinkActivation();
</ins><span class="cx"> event->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->type() == m_animatedPropertyType);
</span><span class="cx"> ASSERT(m_toType);
</span><span class="cx">
</span><del>- SVGAnimateElement& resultAnimationElement = toSVGAnimateElement(*resultElement);
</del><ins>+ SVGAnimateElement& resultAnimationElement = downcast<SVGAnimateElement>(*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& 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<SVGAnimatedTypeAnimator> m_animator;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-void isSVGAnimateElement(const SVGAnimateElement&); // Catch unnecessary runtime check of type known at compile time.
-bool isSVGAnimateElement(const Node&);
-NODE_TYPE_CASTS(SVGAnimateElement)
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(SVGAnimateElement)
+ static bool isSVGAnimateElement(const SVGElement& element)
+ {
+ return element.hasTagName(SVGNames::animateTag) || element.hasTagName(SVGNames::animateColorTag)
+ || element.hasTagName(SVGNames::animateTransformTag) || element.hasTagName(SVGNames::setTag);
+ }
+ static bool isSVGAnimateElement(const Node& node) { return is<SVGElement>(node) && isSVGAnimateElement(downcast<SVGElement>(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->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<SVGAnimateElement>(*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& rect, SVGLocatable::StyleUpdateStrategy styleUpdateStrategy)
</span><span class="cx"> {
</span><del>- if (isSVGGraphicsElement()) {
- rect = toSVGGraphicsElement(*this).getBBox(styleUpdateStrategy);
</del><ins>+ if (is<SVGGraphicsElement>(*this)) {
+ rect = downcast<SVGGraphicsElement>(*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& a, const QualifiedName& b) { return a.matches(b); }
</span><span class="cx"> };
</span><span class="cx">
</span><del>-void isSVGElement(const SVGElement&); // Catch unnecessary runtime check of type known at compile time.
-inline bool isSVGElement(const Node& node) { return node.isSVGElement(); }
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(SVGElement)
+ static bool isSVGElement(const Node& node) { return node.isSVGElement(); }
+SPECIALIZE_TYPE_TRAITS_END()
</ins><span class="cx">
</span><del>-template <typename ArgType>
-struct NodeTypeCastTraits<const SVGElement, ArgType> {
- static bool is(ArgType& node) { return isSVGElement(node); }
-};
-
-NODE_TYPE_CASTS(SVGElement)
-
</del><span class="cx"> inline bool Node::hasTagName(const SVGQualifiedName& name) const
</span><span class="cx"> {
</span><span class="cx"> return isSVGElement() && downcast<SVGElement>(*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&); // Catch unnecessary runtime check of type known at compile time.
-inline bool isSVGFilterPrimitiveStandardAttributes(const SVGElement& element) { return element.isFilterEffect(); }
-inline bool isSVGFilterPrimitiveStandardAttributes(const Node& node) { return node.isSVGElement() && downcast<SVGElement>(node).isFilterEffect(); }
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(SVGFilterPrimitiveStandardAttributes)
+ static bool isSVGFilterPrimitiveStandardAttributes(const SVGElement& element) { return element.isFilterEffect(); }
+ static bool isSVGFilterPrimitiveStandardAttributes(const Node& node) { return is<SVGElement>(node) && isSVGFilterPrimitiveStandardAttributes(downcast<SVGElement>(node)); }
+SPECIALIZE_TYPE_TRAITS_END()
</ins><span class="cx">
</span><del>-template <typename ArgType>
-struct NodeTypeCastTraits<const SVGFilterPrimitiveStandardAttributes, ArgType> {
- static bool is(ArgType& 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& 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&); // Catch unnecessary runtime check of type known at compile time.
-bool isSVGGradientElement(const Node&);
-NODE_TYPE_CASTS(SVGGradientElement)
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(SVGGradientElement)
+static bool isSVGGradientElement(const SVGElement& element)
+{
+ return element.hasTagName(SVGNames::radialGradientTag) || element.hasTagName(SVGNames::linearGradientTag);
+}
+static bool isSVGGradientElement(const Node& node)
+{
+ return is<SVGElement>(node) && isSVGGradientElement(downcast<SVGElement>(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&); // Catch unnecessary runtime check of type known at compile time.
-inline bool isSVGGraphicsElement(const SVGElement& element) { return element.isSVGGraphicsElement(); }
-inline bool isSVGGraphicsElement(const Node& node) { return node.isSVGElement() && downcast<SVGElement>(node).isSVGGraphicsElement(); }
-NODE_TYPE_CASTS(SVGGraphicsElement)
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(SVGGraphicsElement)
+ static bool isSVGGraphicsElement(const SVGElement& element) { return element.isSVGGraphicsElement(); }
+ static bool isSVGGraphicsElement(const Node& node) { return is<SVGElement>(node) && isSVGGraphicsElement(downcast<SVGElement>(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->href(), document());
</span><del>- if (refNode && isSVGGradientElement(*refNode)) {
- current = toSVGGradientElement(refNode);
</del><ins>+ if (refNode && is<SVGGradientElement>(*refNode)) {
+ current = downcast<SVGGradientElement>(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 && target->isSVGGraphicsElement()) {
- AffineTransform targetCTM = toSVGGraphicsElement(*target).getCTM(styleUpdateStrategy);
</del><ins>+ if (target && is<SVGGraphicsElement>(target)) {
+ AffineTransform targetCTM = downcast<SVGGraphicsElement>(*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& ownerType = toSVGPolyElement(*contextElement);
</del><ins>+ SVGPolyElement& ownerType = downcast<SVGPolyElement>(*contextElement);
</ins><span class="cx"> if (!ownerType.m_points.shouldSynchronize)
</span><span class="cx"> return;
</span><span class="cx"> ownerType.m_points.synchronize(&ownerType, pointsPropertyInfo()->attributeName, ownerType.m_points.value.valueAsString());
</span><span class="lines">@@ -141,7 +141,7 @@
</span><span class="cx"> PassRefPtr<SVGAnimatedProperty> SVGPolyElement::lookupOrCreatePointsWrapper(SVGElement* contextElement)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(contextElement);
</span><del>- SVGPolyElement& ownerType = toSVGPolyElement(*contextElement);
</del><ins>+ SVGPolyElement& ownerType = downcast<SVGPolyElement>(*contextElement);
</ins><span class="cx"> return SVGAnimatedProperty::lookupOrCreateWrapper<SVGPolyElement, SVGAnimatedPointList, SVGPointList>
</span><span class="cx"> (&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<SVGListPropertyTearOff<SVGPointList>*>(static_pointer_cast<SVGAnimatedPointList>(lookupOrCreatePointsWrapper(this))->animVal());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool isSVGPolyElement(const Node& 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<SVGPointList> m_points;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-void isSVGPolyElement(const SVGPolyElement&); // Catch unnecessary runtime check of type known at compile time.
-bool isSVGPolyElement(const Node&);
-NODE_TYPE_CASTS(SVGPolyElement)
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(SVGPolyElement)
+ static bool isSVGPolyElement(const SVGElement& element) { return element.hasTagName(SVGNames::polygonTag) || element.hasTagName(SVGNames::polylineTag); }
+ static bool isSVGPolyElement(const Node& node) { return is<SVGElement>(node) && isSVGPolyElement(downcast<SVGElement>(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->href(), document());
</span><del>- if (refNode && isSVGGradientElement(*refNode)) {
- current = toSVGGradientElement(refNode);
</del><ins>+ if (refNode && is<SVGGradientElement>(*refNode)) {
+ current = downcast<SVGGradientElement>(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& ownerType = toSVGTextContentElement(*contextElement);
</del><ins>+ SVGTextContentElement& ownerType = downcast<SVGTextContentElement>(*contextElement);
</ins><span class="cx"> if (!ownerType.m_textLength.shouldSynchronize)
</span><span class="cx"> return;
</span><span class="cx"> AtomicString value(SVGPropertyTraits<SVGLength>::toString(ownerType.m_specifiedTextLength));
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> PassRefPtr<SVGAnimatedProperty> SVGTextContentElement::lookupOrCreateTextLengthWrapper(SVGElement* contextElement)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(contextElement);
</span><del>- SVGTextContentElement& ownerType = toSVGTextContentElement(*contextElement);
</del><ins>+ SVGTextContentElement& ownerType = downcast<SVGTextContentElement>(*contextElement);
</ins><span class="cx"> return SVGAnimatedProperty::lookupOrCreateWrapper<SVGTextContentElement, SVGAnimatedLength, SVGLength>
</span><span class="cx"> (&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<SVGElement>(renderer->node());
</span><span class="cx"> ASSERT(element);
</span><span class="cx">
</span><del>- if (!element->isTextContent())
</del><ins>+ if (!is<SVGTextContentElement>(element))
</ins><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- return toSVGTextContentElement(element);
</del><ins>+ return downcast<SVGTextContentElement>(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&); // Catch unnecessary runtime check of type known at compile time.
-inline bool isSVGTextContentElement(const SVGElement& element) { return element.isTextContent(); }
-inline bool isSVGTextContentElement(const Node& node) { return node.isSVGElement() && downcast<SVGElement>(node).isTextContent(); }
-NODE_TYPE_CASTS(SVGTextContentElement)
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(SVGTextContentElement)
+ static bool isSVGTextContentElement(const SVGElement& element) { return element.isTextContent(); }
+ static bool isSVGTextContentElement(const Node& node) { return is<SVGElement>(node) && isSVGTextContentElement(downcast<SVGElement>(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->shadowTreeElement() : nullptr;
- if (!node)
</del><ins>+ SVGElement* element = m_targetElementInstance ? m_targetElementInstance->shadowTreeElement() : nullptr;
+ if (!element)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- if (node->isSVGElement() && downcast<SVGElement>(*node).isSVGGraphicsElement()) {
- if (!isDirectReference(downcast<SVGElement>(*node))) {
</del><ins>+ if (is<SVGGraphicsElement>(element)) {
+ if (!isDirectReference(*element)) {
</ins><span class="cx"> // Spec: Indirect references are an error (14.3.5)
</span><span class="cx"> document().accessSVGExtensions().reportError("Not allowed to use indirect reference in <clip-path>");
</span><span class="cx"> } else {
</span><del>- toSVGGraphicsElement(*node).toClipPath(path);
</del><ins>+ downcast<SVGGraphicsElement>(*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() && parentNode()->isElementNode() ? toElement(parentNode()) : nullptr;
</span><span class="cx"> else
</span><span class="cx"> target = SVGURIReference::targetElementFromIRIString(href, document(), &id);
</span><del>- SVGElement* svgTarget = target && target->isSVGElement() ? downcast<SVGElement>(target) : nullptr;
</del><ins>+ SVGElement* svgTarget = target && is<SVGElement>(target) ? downcast<SVGElement>(target) : nullptr;
</ins><span class="cx">
</span><span class="cx"> if (svgTarget && !svgTarget->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<SVGSMILElement>(*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<SVGSMILElement>(*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())->removeTimeDependent(this);
</del><ins>+ downcast<SVGSMILElement>(condition.m_syncbase.get())->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&); // Catch unnecessary runtime check of type known at compile time.
-inline bool isSVGSMILElement(const SVGElement& element) { return element.isSMILElement(); }
-inline bool isSVGSMILElement(const Node& node) { return node.isSVGElement() && downcast<SVGElement>(node).isSMILElement(); }
</del><ins>+SPECIALIZE_TYPE_TRAITS_BEGIN(SVGSMILElement)
+ static bool isSVGSMILElement(const SVGElement& element) { return element.isSMILElement(); }
+ static bool isSVGSMILElement(const Node& node) { return is<SVGElement>(node) && isSVGSMILElement(downcast<SVGElement>(node)); }
+SPECIALIZE_TYPE_TRAITS_END()
</ins><span class="cx">
</span><del>-template <typename ArgType>
-struct NodeTypeCastTraits<const SVGSMILElement, ArgType> {
- static bool is(ArgType& 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>