<!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>[173859] 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/173859">173859</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-09-22 17:55:05 -0700 (Mon, 22 Sep 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use downcast&lt;SVG*Element&gt;() instead of toSVG*Element()
https://bugs.webkit.org/show_bug.cgi?id=137004

Reviewed by Benjamin Poulain.

Use downcast&lt;SVG*Element&gt;() instead of toSVG*Element() for casting SVG
Elements and get rid of the transition toSVG*Element() macros.

Also use downcast&lt;MathML*Element&gt;() instead of toMathML*Element() for
casting MathML Elements.

The HTML Elements casting counterparts will be taken care of in a
separate patch.

No new tests, no behavior change.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::alternativeText):
(WebCore::AccessibilityNodeObject::accessibilityDescription):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::remoteSVGRootElement):
* bindings/js/JSElementCustom.cpp:
(WebCore::toJSNewlyCreated):
* bindings/js/JSNodeCustom.cpp:
(WebCore::createWrapperInline):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSCursorImageValue.cpp:
(WebCore::resourceReferencedByCursorElement):
(WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchAllRules):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::locateCousinList):
(WebCore::StyleResolver::canShareStyleWithElement):
(WebCore::StyleResolver::locateSharedStyle):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
* dom/Element.cpp:
(WebCore::Element::synchronizeAllAttributes):
(WebCore::Element::synchronizeAttribute):
(WebCore::Element::boundsInRootViewSpace):
(WebCore::Element::getBoundingClientRect):
(WebCore::Element::childShouldCreateRenderer):
(WebCore::Element::fastAttributeLookupAllowed):
* dom/EventDispatcher.cpp:
(WebCore::eventTargetRespectingTargetRules):
* dom/ScriptElement.cpp:
(WebCore::toScriptElementIfPossible):
* dom/make_names.pl:
(printTypeHelpers):
* html/HTMLFrameOwnerElement.cpp:
(WebCore::HTMLFrameOwnerElement::getSVGDocument):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::isPhrasingContent):
(WebCore::MathMLElement::childShouldCreateRenderer):
(WebCore::MathMLElement::attributeChanged):
* mathml/MathMLElement.h:
(WebCore::Node::hasTagName):
* mathml/MathMLSelectElement.cpp:
(WebCore::MathMLSelectElement::getSelectedSemanticsChild):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::instanceAssociatedWithShadowTreeElement):
* page/Frame.cpp:
(WebCore::Frame::setPageAndTextZoomFactors):
* page/FrameView.cpp:
(WebCore::FrameView::scrollToAnchor):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::parseColSpanFromDOM):
(WebCore::RenderTableCell::parseRowSpanFromDOM):
(WebCore::RenderTableCell::computePreferredLogicalWidths):
* rendering/mathml/RenderMathMLMenclose.cpp:
(WebCore::RenderMathMLMenclose::addChild):
(WebCore::RenderMathMLMenclose::computePreferredLogicalWidths):
(WebCore::RenderMathMLMenclose::updateLogicalHeight):
(WebCore::RenderMathMLMenclose::paint):
* rendering/svg/RenderSVGBlock.h:
(WebCore::RenderSVGBlock::graphicsElement):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::foreignObjectElement):
* rendering/svg/RenderSVGGradientStop.cpp:
(WebCore::RenderSVGGradientStop::gradientElement):
* rendering/svg/RenderSVGGradientStop.h:
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::imageElement):
* rendering/svg/RenderSVGInline.h:
(WebCore::RenderSVGInline::graphicsElement):
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::getElementCTM):
(WebCore::RenderSVGModelObject::checkIntersection):
(WebCore::RenderSVGModelObject::checkEnclosure):
* rendering/svg/RenderSVGModelObject.h:
(WebCore::RenderSVGModelObject::element):
* rendering/svg/RenderSVGRect.cpp:
(WebCore::RenderSVGRect::rectElement):
* rendering/svg/RenderSVGResource.cpp:
(WebCore::removeFromCacheAndInvalidateDependencies):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::pathOnlyClipping):
(WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceLinearGradient.h:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::patternElement):
* rendering/svg/RenderSVGResourceRadialGradient.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::svgSVGElement):
* rendering/svg/RenderSVGShape.h:
(WebCore::RenderSVGShape::graphicsElement):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::textElement):
* rendering/svg/RenderSVGTextPath.cpp:
(WebCore::RenderSVGTextPath::textPathElement):
(WebCore::RenderSVGTextPath::layoutPath):
* rendering/svg/RenderSVGTransformableContainer.cpp:
(WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
* rendering/svg/RenderSVGTransformableContainer.h:
* rendering/svg/RenderSVGViewportContainer.cpp:
(WebCore::RenderSVGViewportContainer::svgSVGElement):
* rendering/svg/SVGPathData.cpp:
(WebCore::updatePathFromLineElement):
(WebCore::updatePathFromPathElement):
(WebCore::updatePathFromPolygonElement):
(WebCore::updatePathFromPolylineElement):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::layoutChildren):
(WebCore::SVGRenderSupport::applyStrokeStyleToContext):
(WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::operator&lt;&lt;):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):
* rendering/svg/SVGResources.cpp:
(WebCore::targetReferenceFromResource):
(WebCore::SVGResources::buildCachedResources):
* rendering/svg/SVGTextLayoutEngine.cpp:
(WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::createElementRenderer):
(WebCore::SVGAElement::defaultEventHandler):
* svg/SVGAltGlyphDefElement.cpp:
(WebCore::SVGAltGlyphDefElement::hasValidGlyphElements):
* svg/SVGAltGlyphElement.cpp:
(WebCore::SVGAltGlyphElement::hasValidGlyphElements):
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::calculateAnimatedValue):
* svg/SVGAnimatedTransformList.cpp:
(WebCore::SVGAnimatedTransformListAnimator::SVGAnimatedTransformListAnimator):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
(WebCore::SVGAnimationElement::adjustForInheritance):
* svg/SVGDocument.cpp:
(WebCore::SVGDocument::rootElement):
* svg/SVGElement.cpp:
(WebCore::SVGElement::ownerSVGElement):
(WebCore::SVGElement::viewportElement):
(WebCore::SVGElement::getBoundingBox):
(WebCore::SVGElement::childShouldCreateRenderer):
(WebCore::SVGElement::title):
(WebCore::SVGElement::updateRelativeLengthsInformation):
* svg/SVGElement.h:
(WebCore::Node::hasTagName):
* svg/SVGFEComponentTransferElement.cpp:
(WebCore::SVGFEComponentTransferElement::build):
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::buildPendingResource):
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::childShouldCreateRenderer):
* svg/SVGFilterPrimitiveStandardAttributes.h:
(WebCore::isSVGFilterPrimitiveStandardAttributes):
* svg/SVGFontData.cpp:
(WebCore::SVGFontData::applySVGGlyphSelection):
* svg/SVGFontElement.cpp:
(WebCore::SVGFontElement::ensureGlyphCache):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::rebuildFontFace):
* svg/SVGFontFaceFormatElement.cpp:
(WebCore::SVGFontFaceFormatElement::childrenChanged):
* svg/SVGFontFaceSrcElement.cpp:
(WebCore::SVGFontFaceSrcElement::srcValue):
(WebCore::SVGFontFaceSrcElement::childrenChanged):
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::childrenChanged):
* svg/SVGGlyphElement.cpp:
(WebCore::SVGGlyphElement::invalidateGlyphCache):
* svg/SVGGraphicsElement.h:
(WebCore::isSVGGraphicsElement):
* svg/SVGHKernElement.cpp:
(WebCore::SVGHKernElement::insertedInto):
(WebCore::SVGHKernElement::removedFrom):
* svg/SVGImageLoader.cpp:
(WebCore::SVGImageLoader::dispatchLoadEvent):
* svg/SVGLengthContext.cpp:
(WebCore::SVGLengthContext::determineViewport):
* svg/SVGLinearGradientElement.cpp:
(WebCore::setGradientAttributes):
(WebCore::SVGLinearGradientElement::collectGradientAttributes):
* svg/SVGLocatable.cpp:
(WebCore::SVGLocatable::nearestViewportElement):
(WebCore::SVGLocatable::farthestViewportElement):
(WebCore::SVGLocatable::computeCTM):
(WebCore::SVGLocatable::getTransformToElement):
* svg/SVGMPathElement.cpp:
(WebCore::SVGMPathElement::buildPendingResource):
(WebCore::SVGMPathElement::pathElement):
(WebCore::SVGMPathElement::notifyParentOfPathChange):
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::synchronizeOrientType):
(WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper):
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::invalidateMPathDependencies):
(WebCore::SVGPathElement::lookupOrCreateDWrapper):
(WebCore::SVGPathElement::synchronizeD):
* svg/SVGPathSegList.cpp:
(WebCore::SVGPathSegList::commitChange):
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::collectPatternAttributes):
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::synchronizePoints):
(WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
* svg/SVGRadialGradientElement.cpp:
(WebCore::setGradientAttributes):
(WebCore::SVGRadialGradientElement::collectGradientAttributes):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::setupInitialView):
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::synchronizeTextLength):
(WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
(WebCore::SVGTextContentElement::elementFromRenderer):
* svg/SVGTextContentElement.h:
(WebCore::isSVGTextContentElement):
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::buildPendingResource):
* svg/SVGUseElement.cpp:
(WebCore::dumpInstanceTree):
(WebCore::SVGUseElement::buildPendingResource):
(WebCore::SVGUseElement::toClipPath):
(WebCore::SVGUseElement::buildInstanceTree):
(WebCore::SVGUseElement::hasCycleUseReferencing):
(WebCore::SVGUseElement::expandUseElementsInShadowTree):
(WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
* svg/SVGVKernElement.cpp:
(WebCore::SVGVKernElement::insertedInto):
(WebCore::SVGVKernElement::removedFrom):
* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::viewTarget):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::buildPendingResource):
(WebCore::SVGSMILElement::connectConditions):
(WebCore::SVGSMILElement::disconnectConditions):
* svg/animation/SVGSMILElement.h:
(WebCore::isSVGSMILElement):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::hasSingleSecurityOrigin):
(WebCore::SVGImage::setContainerSize):
(WebCore::SVGImage::containerSize):
(WebCore::SVGImage::embeddedContentBox):
(WebCore::SVGImage::hasRelativeWidth):
(WebCore::SVGImage::hasRelativeHeight):
(WebCore::SVGImage::computeIntrinsicDimensions):
(WebCore::SVGImage::startAnimation):
(WebCore::SVGImage::stopAnimation):
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::platformApplySoftware):
* svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
(WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
* svg/properties/SVGPathSegListPropertyTearOff.cpp:
(WebCore::SVGPathSegListPropertyTearOff::contextElement):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityNodeObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSElementCustomcpp">trunk/Source/WebCore/bindings/js/JSElementCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSNodeCustomcpp">trunk/Source/WebCore/bindings/js/JSNodeCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSCursorImageValuecpp">trunk/Source/WebCore/css/CSSCursorImageValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssElementRuleCollectorcpp">trunk/Source/WebCore/css/ElementRuleCollector.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCore/css/StyleResolver.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentStyleSheetCollectioncpp">trunk/Source/WebCore/dom/DocumentStyleSheetCollection.cpp</a></li>
<li><a href="#trunkSourceWebCoredomElementcpp">trunk/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#trunkSourceWebCoredomEventDispatchercpp">trunk/Source/WebCore/dom/EventDispatcher.cpp</a></li>
<li><a href="#trunkSourceWebCoredomScriptElementcpp">trunk/Source/WebCore/dom/ScriptElement.cpp</a></li>
<li><a href="#trunkSourceWebCoredommake_namespl">trunk/Source/WebCore/dom/make_names.pl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFrameOwnerElementcpp">trunk/Source/WebCore/html/HTMLFrameOwnerElement.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorCSSAgentcpp">trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoremathmlMathMLElementcpp">trunk/Source/WebCore/mathml/MathMLElement.cpp</a></li>
<li><a href="#trunkSourceWebCoremathmlMathMLElementh">trunk/Source/WebCore/mathml/MathMLElement.h</a></li>
<li><a href="#trunkSourceWebCoremathmlMathMLSelectElementcpp">trunk/Source/WebCore/mathml/MathMLSelectElement.cpp</a></li>
<li><a href="#trunkSourceWebCorepageEventHandlercpp">trunk/Source/WebCore/page/EventHandler.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFramecpp">trunk/Source/WebCore/page/Frame.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTableCellcpp">trunk/Source/WebCore/rendering/RenderTableCell.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLMenclosecpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGBlockh">trunk/Source/WebCore/rendering/svg/RenderSVGBlock.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGForeignObjectcpp">trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGGradientStopcpp">trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGGradientStoph">trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGImagecpp">trunk/Source/WebCore/rendering/svg/RenderSVGImage.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGInlineh">trunk/Source/WebCore/rendering/svg/RenderSVGInline.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGModelObjectcpp">trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGModelObjecth">trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGRectcpp">trunk/Source/WebCore/rendering/svg/RenderSVGRect.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGResourcecpp">trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGResourceClippercpp">trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGResourceClipperh">trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGResourceContainercpp">trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGResourceFilterh">trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGResourceLinearGradienth">trunk/Source/WebCore/rendering/svg/RenderSVGResourceLinearGradient.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGResourceMarkerh">trunk/Source/WebCore/rendering/svg/RenderSVGResourceMarker.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGResourceMaskerh">trunk/Source/WebCore/rendering/svg/RenderSVGResourceMasker.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGResourcePatterncpp">trunk/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGResourceRadialGradienth">trunk/Source/WebCore/rendering/svg/RenderSVGResourceRadialGradient.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGRootcpp">trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGShapeh">trunk/Source/WebCore/rendering/svg/RenderSVGShape.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGTextcpp">trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGTextPathcpp">trunk/Source/WebCore/rendering/svg/RenderSVGTextPath.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGTransformableContainercpp">trunk/Source/WebCore/rendering/svg/RenderSVGTransformableContainer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGTransformableContainerh">trunk/Source/WebCore/rendering/svg/RenderSVGTransformableContainer.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGViewportContainercpp">trunk/Source/WebCore/rendering/svg/RenderSVGViewportContainer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGPathDatacpp">trunk/Source/WebCore/rendering/svg/SVGPathData.cpp</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="#trunkSourceWebCorerenderingsvgSVGTextLayoutEnginecpp">trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAElementcpp">trunk/Source/WebCore/svg/SVGAElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAltGlyphDefElementcpp">trunk/Source/WebCore/svg/SVGAltGlyphDefElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAltGlyphElementcpp">trunk/Source/WebCore/svg/SVGAltGlyphElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimateElementcpp">trunk/Source/WebCore/svg/SVGAnimateElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimatedTransformListcpp">trunk/Source/WebCore/svg/SVGAnimatedTransformList.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimationElementcpp">trunk/Source/WebCore/svg/SVGAnimationElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGDocumentcpp">trunk/Source/WebCore/svg/SVGDocument.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="#trunkSourceWebCoresvgSVGFEComponentTransferElementcpp">trunk/Source/WebCore/svg/SVGFEComponentTransferElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFEImageElementcpp">trunk/Source/WebCore/svg/SVGFEImageElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFilterElementcpp">trunk/Source/WebCore/svg/SVGFilterElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFilterPrimitiveStandardAttributesh">trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontDatacpp">trunk/Source/WebCore/svg/SVGFontData.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontElementcpp">trunk/Source/WebCore/svg/SVGFontElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontFaceElementcpp">trunk/Source/WebCore/svg/SVGFontFaceElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontFaceFormatElementcpp">trunk/Source/WebCore/svg/SVGFontFaceFormatElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontFaceSrcElementcpp">trunk/Source/WebCore/svg/SVGFontFaceSrcElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFontFaceUriElementcpp">trunk/Source/WebCore/svg/SVGFontFaceUriElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGGlyphElementcpp">trunk/Source/WebCore/svg/SVGGlyphElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGGraphicsElementh">trunk/Source/WebCore/svg/SVGGraphicsElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGHKernElementcpp">trunk/Source/WebCore/svg/SVGHKernElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGImageLoadercpp">trunk/Source/WebCore/svg/SVGImageLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGLengthContextcpp">trunk/Source/WebCore/svg/SVGLengthContext.cpp</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="#trunkSourceWebCoresvgSVGMPathElementcpp">trunk/Source/WebCore/svg/SVGMPathElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGMarkerElementcpp">trunk/Source/WebCore/svg/SVGMarkerElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGPathElementcpp">trunk/Source/WebCore/svg/SVGPathElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGPathSegListcpp">trunk/Source/WebCore/svg/SVGPathSegList.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGPatternElementcpp">trunk/Source/WebCore/svg/SVGPatternElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGPolyElementcpp">trunk/Source/WebCore/svg/SVGPolyElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGRadialGradientElementcpp">trunk/Source/WebCore/svg/SVGRadialGradientElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGSVGElementcpp">trunk/Source/WebCore/svg/SVGSVGElement.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="#trunkSourceWebCoresvgSVGTextPathElementcpp">trunk/Source/WebCore/svg/SVGTextPathElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGUseElementcpp">trunk/Source/WebCore/svg/SVGUseElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGVKernElementcpp">trunk/Source/WebCore/svg/SVGVKernElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGViewSpeccpp">trunk/Source/WebCore/svg/SVGViewSpec.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>
<li><a href="#trunkSourceWebCoresvggraphicsSVGImagecpp">trunk/Source/WebCore/svg/graphics/SVGImage.cpp</a></li>
<li><a href="#trunkSourceWebCoresvggraphicsfiltersSVGFEImagecpp">trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAnimatedPathSegListPropertyTearOffh">trunk/Source/WebCore/svg/properties/SVGAnimatedPathSegListPropertyTearOff.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGPathSegListPropertyTearOffcpp">trunk/Source/WebCore/svg/properties/SVGPathSegListPropertyTearOff.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/ChangeLog        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -1,3 +1,284 @@
</span><ins>+2014-09-22  Christophe Dumez  &lt;cdumez@apple.com&gt;
+
+        Use downcast&lt;SVG*Element&gt;() instead of toSVG*Element()
+        https://bugs.webkit.org/show_bug.cgi?id=137004
+
+        Reviewed by Benjamin Poulain.
+
+        Use downcast&lt;SVG*Element&gt;() instead of toSVG*Element() for casting SVG
+        Elements and get rid of the transition toSVG*Element() macros.
+
+        Also use downcast&lt;MathML*Element&gt;() instead of toMathML*Element() for
+        casting MathML Elements.
+
+        The HTML Elements casting counterparts will be taken care of in a
+        separate patch.
+
+        No new tests, no behavior change.
+
+        * accessibility/AccessibilityNodeObject.cpp:
+        (WebCore::AccessibilityNodeObject::alternativeText):
+        (WebCore::AccessibilityNodeObject::accessibilityDescription):
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
+        * bindings/js/JSElementCustom.cpp:
+        (WebCore::toJSNewlyCreated):
+        * bindings/js/JSNodeCustom.cpp:
+        (WebCore::createWrapperInline):
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::ComputedStyleExtractor::propertyValue):
+        * css/CSSCursorImageValue.cpp:
+        (WebCore::resourceReferencedByCursorElement):
+        (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
+        * css/ElementRuleCollector.cpp:
+        (WebCore::ElementRuleCollector::matchAllRules):
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::locateCousinList):
+        (WebCore::StyleResolver::canShareStyleWithElement):
+        (WebCore::StyleResolver::locateSharedStyle):
+        * dom/DocumentStyleSheetCollection.cpp:
+        (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
+        * dom/Element.cpp:
+        (WebCore::Element::synchronizeAllAttributes):
+        (WebCore::Element::synchronizeAttribute):
+        (WebCore::Element::boundsInRootViewSpace):
+        (WebCore::Element::getBoundingClientRect):
+        (WebCore::Element::childShouldCreateRenderer):
+        (WebCore::Element::fastAttributeLookupAllowed):
+        * dom/EventDispatcher.cpp:
+        (WebCore::eventTargetRespectingTargetRules):
+        * dom/ScriptElement.cpp:
+        (WebCore::toScriptElementIfPossible):
+        * dom/make_names.pl:
+        (printTypeHelpers):
+        * html/HTMLFrameOwnerElement.cpp:
+        (WebCore::HTMLFrameOwnerElement::getSVGDocument):
+        * inspector/InspectorCSSAgent.cpp:
+        (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
+        * mathml/MathMLElement.cpp:
+        (WebCore::MathMLElement::isPhrasingContent):
+        (WebCore::MathMLElement::childShouldCreateRenderer):
+        (WebCore::MathMLElement::attributeChanged):
+        * mathml/MathMLElement.h:
+        (WebCore::Node::hasTagName):
+        * mathml/MathMLSelectElement.cpp:
+        (WebCore::MathMLSelectElement::getSelectedSemanticsChild):
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::handleMousePressEvent):
+        (WebCore::EventHandler::handleMouseMoveEvent):
+        (WebCore::EventHandler::handleMouseReleaseEvent):
+        (WebCore::instanceAssociatedWithShadowTreeElement):
+        * page/Frame.cpp:
+        (WebCore::Frame::setPageAndTextZoomFactors):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::scrollToAnchor):
+        * rendering/RenderTableCell.cpp:
+        (WebCore::RenderTableCell::parseColSpanFromDOM):
+        (WebCore::RenderTableCell::parseRowSpanFromDOM):
+        (WebCore::RenderTableCell::computePreferredLogicalWidths):
+        * rendering/mathml/RenderMathMLMenclose.cpp:
+        (WebCore::RenderMathMLMenclose::addChild):
+        (WebCore::RenderMathMLMenclose::computePreferredLogicalWidths):
+        (WebCore::RenderMathMLMenclose::updateLogicalHeight):
+        (WebCore::RenderMathMLMenclose::paint):
+        * rendering/svg/RenderSVGBlock.h:
+        (WebCore::RenderSVGBlock::graphicsElement):
+        * rendering/svg/RenderSVGForeignObject.cpp:
+        (WebCore::RenderSVGForeignObject::foreignObjectElement):
+        * rendering/svg/RenderSVGGradientStop.cpp:
+        (WebCore::RenderSVGGradientStop::gradientElement):
+        * rendering/svg/RenderSVGGradientStop.h:
+        * rendering/svg/RenderSVGImage.cpp:
+        (WebCore::RenderSVGImage::imageElement):
+        * rendering/svg/RenderSVGInline.h:
+        (WebCore::RenderSVGInline::graphicsElement):
+        * rendering/svg/RenderSVGModelObject.cpp:
+        (WebCore::getElementCTM):
+        (WebCore::RenderSVGModelObject::checkIntersection):
+        (WebCore::RenderSVGModelObject::checkEnclosure):
+        * rendering/svg/RenderSVGModelObject.h:
+        (WebCore::RenderSVGModelObject::element):
+        * rendering/svg/RenderSVGRect.cpp:
+        (WebCore::RenderSVGRect::rectElement):
+        * rendering/svg/RenderSVGResource.cpp:
+        (WebCore::removeFromCacheAndInvalidateDependencies):
+        * rendering/svg/RenderSVGResourceClipper.cpp:
+        (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
+        (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
+        * rendering/svg/RenderSVGResourceClipper.h:
+        * rendering/svg/RenderSVGResourceContainer.cpp:
+        (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
+        * rendering/svg/RenderSVGResourceFilter.h:
+        * rendering/svg/RenderSVGResourceLinearGradient.h:
+        * rendering/svg/RenderSVGResourceMarker.h:
+        * rendering/svg/RenderSVGResourceMasker.h:
+        * rendering/svg/RenderSVGResourcePattern.cpp:
+        (WebCore::RenderSVGResourcePattern::patternElement):
+        * rendering/svg/RenderSVGResourceRadialGradient.h:
+        * rendering/svg/RenderSVGRoot.cpp:
+        (WebCore::RenderSVGRoot::svgSVGElement):
+        * rendering/svg/RenderSVGShape.h:
+        (WebCore::RenderSVGShape::graphicsElement):
+        * rendering/svg/RenderSVGText.cpp:
+        (WebCore::RenderSVGText::textElement):
+        * rendering/svg/RenderSVGTextPath.cpp:
+        (WebCore::RenderSVGTextPath::textPathElement):
+        (WebCore::RenderSVGTextPath::layoutPath):
+        * rendering/svg/RenderSVGTransformableContainer.cpp:
+        (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
+        * rendering/svg/RenderSVGTransformableContainer.h:
+        * rendering/svg/RenderSVGViewportContainer.cpp:
+        (WebCore::RenderSVGViewportContainer::svgSVGElement):
+        * rendering/svg/SVGPathData.cpp:
+        (WebCore::updatePathFromLineElement):
+        (WebCore::updatePathFromPathElement):
+        (WebCore::updatePathFromPolygonElement):
+        (WebCore::updatePathFromPolylineElement):
+        * rendering/svg/SVGRenderSupport.cpp:
+        (WebCore::SVGRenderSupport::layoutChildren):
+        (WebCore::SVGRenderSupport::applyStrokeStyleToContext):
+        (WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending):
+        * rendering/svg/SVGRenderTreeAsText.cpp:
+        (WebCore::operator&lt;&lt;):
+        * rendering/svg/SVGRenderingContext.cpp:
+        (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
+        * rendering/svg/SVGResources.cpp:
+        (WebCore::targetReferenceFromResource):
+        (WebCore::SVGResources::buildCachedResources):
+        * rendering/svg/SVGTextLayoutEngine.cpp:
+        (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
+        * svg/SVGAElement.cpp:
+        (WebCore::SVGAElement::createElementRenderer):
+        (WebCore::SVGAElement::defaultEventHandler):
+        * svg/SVGAltGlyphDefElement.cpp:
+        (WebCore::SVGAltGlyphDefElement::hasValidGlyphElements):
+        * svg/SVGAltGlyphElement.cpp:
+        (WebCore::SVGAltGlyphElement::hasValidGlyphElements):
+        * svg/SVGAnimateElement.cpp:
+        (WebCore::SVGAnimateElement::calculateAnimatedValue):
+        * svg/SVGAnimatedTransformList.cpp:
+        (WebCore::SVGAnimatedTransformListAnimator::SVGAnimatedTransformListAnimator):
+        * svg/SVGAnimationElement.cpp:
+        (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
+        (WebCore::SVGAnimationElement::adjustForInheritance):
+        * svg/SVGDocument.cpp:
+        (WebCore::SVGDocument::rootElement):
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::ownerSVGElement):
+        (WebCore::SVGElement::viewportElement):
+        (WebCore::SVGElement::getBoundingBox):
+        (WebCore::SVGElement::childShouldCreateRenderer):
+        (WebCore::SVGElement::title):
+        (WebCore::SVGElement::updateRelativeLengthsInformation):
+        * svg/SVGElement.h:
+        (WebCore::Node::hasTagName):
+        * svg/SVGFEComponentTransferElement.cpp:
+        (WebCore::SVGFEComponentTransferElement::build):
+        * svg/SVGFEImageElement.cpp:
+        (WebCore::SVGFEImageElement::buildPendingResource):
+        * svg/SVGFilterElement.cpp:
+        (WebCore::SVGFilterElement::childShouldCreateRenderer):
+        * svg/SVGFilterPrimitiveStandardAttributes.h:
+        (WebCore::isSVGFilterPrimitiveStandardAttributes):
+        * svg/SVGFontData.cpp:
+        (WebCore::SVGFontData::applySVGGlyphSelection):
+        * svg/SVGFontElement.cpp:
+        (WebCore::SVGFontElement::ensureGlyphCache):
+        * svg/SVGFontFaceElement.cpp:
+        (WebCore::SVGFontFaceElement::rebuildFontFace):
+        * svg/SVGFontFaceFormatElement.cpp:
+        (WebCore::SVGFontFaceFormatElement::childrenChanged):
+        * svg/SVGFontFaceSrcElement.cpp:
+        (WebCore::SVGFontFaceSrcElement::srcValue):
+        (WebCore::SVGFontFaceSrcElement::childrenChanged):
+        * svg/SVGFontFaceUriElement.cpp:
+        (WebCore::SVGFontFaceUriElement::childrenChanged):
+        * svg/SVGGlyphElement.cpp:
+        (WebCore::SVGGlyphElement::invalidateGlyphCache):
+        * svg/SVGGraphicsElement.h:
+        (WebCore::isSVGGraphicsElement):
+        * svg/SVGHKernElement.cpp:
+        (WebCore::SVGHKernElement::insertedInto):
+        (WebCore::SVGHKernElement::removedFrom):
+        * svg/SVGImageLoader.cpp:
+        (WebCore::SVGImageLoader::dispatchLoadEvent):
+        * svg/SVGLengthContext.cpp:
+        (WebCore::SVGLengthContext::determineViewport):
+        * svg/SVGLinearGradientElement.cpp:
+        (WebCore::setGradientAttributes):
+        (WebCore::SVGLinearGradientElement::collectGradientAttributes):
+        * svg/SVGLocatable.cpp:
+        (WebCore::SVGLocatable::nearestViewportElement):
+        (WebCore::SVGLocatable::farthestViewportElement):
+        (WebCore::SVGLocatable::computeCTM):
+        (WebCore::SVGLocatable::getTransformToElement):
+        * svg/SVGMPathElement.cpp:
+        (WebCore::SVGMPathElement::buildPendingResource):
+        (WebCore::SVGMPathElement::pathElement):
+        (WebCore::SVGMPathElement::notifyParentOfPathChange):
+        * svg/SVGMarkerElement.cpp:
+        (WebCore::SVGMarkerElement::synchronizeOrientType):
+        (WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper):
+        * svg/SVGPathElement.cpp:
+        (WebCore::SVGPathElement::invalidateMPathDependencies):
+        (WebCore::SVGPathElement::lookupOrCreateDWrapper):
+        (WebCore::SVGPathElement::synchronizeD):
+        * svg/SVGPathSegList.cpp:
+        (WebCore::SVGPathSegList::commitChange):
+        * svg/SVGPatternElement.cpp:
+        (WebCore::SVGPatternElement::collectPatternAttributes):
+        * svg/SVGPolyElement.cpp:
+        (WebCore::SVGPolyElement::synchronizePoints):
+        (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
+        * svg/SVGRadialGradientElement.cpp:
+        (WebCore::setGradientAttributes):
+        (WebCore::SVGRadialGradientElement::collectGradientAttributes):
+        * svg/SVGSVGElement.cpp:
+        (WebCore::SVGSVGElement::setupInitialView):
+        * svg/SVGTextContentElement.cpp:
+        (WebCore::SVGTextContentElement::synchronizeTextLength):
+        (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
+        (WebCore::SVGTextContentElement::elementFromRenderer):
+        * svg/SVGTextContentElement.h:
+        (WebCore::isSVGTextContentElement):
+        * svg/SVGTextPathElement.cpp:
+        (WebCore::SVGTextPathElement::buildPendingResource):
+        * svg/SVGUseElement.cpp:
+        (WebCore::dumpInstanceTree):
+        (WebCore::SVGUseElement::buildPendingResource):
+        (WebCore::SVGUseElement::toClipPath):
+        (WebCore::SVGUseElement::buildInstanceTree):
+        (WebCore::SVGUseElement::hasCycleUseReferencing):
+        (WebCore::SVGUseElement::expandUseElementsInShadowTree):
+        (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
+        * svg/SVGVKernElement.cpp:
+        (WebCore::SVGVKernElement::insertedInto):
+        (WebCore::SVGVKernElement::removedFrom):
+        * svg/SVGViewSpec.cpp:
+        (WebCore::SVGViewSpec::viewTarget):
+        * svg/animation/SVGSMILElement.cpp:
+        (WebCore::SVGSMILElement::buildPendingResource):
+        (WebCore::SVGSMILElement::connectConditions):
+        (WebCore::SVGSMILElement::disconnectConditions):
+        * svg/animation/SVGSMILElement.h:
+        (WebCore::isSVGSMILElement):
+        * svg/graphics/SVGImage.cpp:
+        (WebCore::SVGImage::hasSingleSecurityOrigin):
+        (WebCore::SVGImage::setContainerSize):
+        (WebCore::SVGImage::containerSize):
+        (WebCore::SVGImage::embeddedContentBox):
+        (WebCore::SVGImage::hasRelativeWidth):
+        (WebCore::SVGImage::hasRelativeHeight):
+        (WebCore::SVGImage::computeIntrinsicDimensions):
+        (WebCore::SVGImage::startAnimation):
+        (WebCore::SVGImage::stopAnimation):
+        * svg/graphics/filters/SVGFEImage.cpp:
+        (WebCore::FEImage::platformApplySoftware):
+        * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
+        (WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
+        * svg/properties/SVGPathSegListPropertyTearOff.cpp:
+        (WebCore::SVGPathSegListPropertyTearOff::contextElement):
+
</ins><span class="cx"> 2014-09-22  Pratik Solanki  &lt;psolanki@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Follow on fix for [iOS] ASSERTION FAILED: WTF::isMainThread() in WebCore::memoryCache() when using WebKit1
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityNodeObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -1314,7 +1314,7 @@
</span><span class="cx">     
</span><span class="cx">     // SVG elements all can have a &lt;svg:title&gt; element inside which should act as the descriptive text.
</span><span class="cx">     if (node-&gt;isSVGElement())
</span><del>-        textOrder.append(AccessibilityText(toSVGElement(node)-&gt;title(), AlternativeText));
</del><ins>+        textOrder.append(AccessibilityText(downcast&lt;SVGElement&gt;(*node).title(), AlternativeText));
</ins><span class="cx">     
</span><span class="cx"> #if ENABLE(MATHML)
</span><span class="cx">     if (node-&gt;isMathMLElement())
</span><span class="lines">@@ -1500,7 +1500,7 @@
</span><span class="cx"> 
</span><span class="cx">     // SVG elements all can have a &lt;svg:title&gt; element inside which should act as the descriptive text.
</span><span class="cx">     if (m_node &amp;&amp; m_node-&gt;isSVGElement())
</span><del>-        return toSVGElement(m_node)-&gt;title();
</del><ins>+        return downcast&lt;SVGElement&gt;(*m_node).title();
</ins><span class="cx">     
</span><span class="cx"> #if ENABLE(MATHML)
</span><span class="cx">     if (m_node &amp;&amp; m_node-&gt;isMathMLElement())
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -2879,11 +2879,11 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     Frame&amp; frame = frameView-&gt;frame();
</span><span class="cx">     
</span><del>-    Document* doc = frame.document();
-    if (!doc || !doc-&gt;isSVGDocument())
</del><ins>+    Document* document = frame.document();
+    if (!document || !document-&gt;isSVGDocument())
</ins><span class="cx">         return nullptr;
</span><span class="cx">     
</span><del>-    SVGSVGElement* rootElement = toSVGDocument(doc)-&gt;rootElement();
</del><ins>+    SVGSVGElement* rootElement = downcast&lt;SVGDocument&gt;(*document).rootElement();
</ins><span class="cx">     if (!rootElement)
</span><span class="cx">         return nullptr;
</span><span class="cx">     RenderObject* rendererRoot = rootElement-&gt;renderer();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSElementCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSElementCustom.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSElementCustom.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/bindings/js/JSElementCustom.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx">     if (element-&gt;isHTMLElement())
</span><span class="cx">         wrapper = createJSHTMLWrapper(globalObject, toHTMLElement(element));
</span><span class="cx">     else if (element-&gt;isSVGElement())
</span><del>-        wrapper = createJSSVGWrapper(globalObject, toSVGElement(element));
</del><ins>+        wrapper = createJSSVGWrapper(globalObject, downcast&lt;SVGElement&gt;(element));
</ins><span class="cx">     else
</span><span class="cx">         wrapper = CREATE_DOM_WRAPPER(globalObject, Element, element);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSNodeCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSNodeCustom.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSNodeCustom.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/bindings/js/JSNodeCustom.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -195,7 +195,7 @@
</span><span class="cx">             if (node-&gt;isHTMLElement())
</span><span class="cx">                 wrapper = createJSHTMLWrapper(globalObject, toHTMLElement(node));
</span><span class="cx">             else if (node-&gt;isSVGElement())
</span><del>-                wrapper = createJSSVGWrapper(globalObject, toSVGElement(node));
</del><ins>+                wrapper = createJSSVGWrapper(globalObject, downcast&lt;SVGElement&gt;(node));
</ins><span class="cx">             else
</span><span class="cx">                 wrapper = CREATE_DOM_WRAPPER(globalObject, Element, node);
</span><span class="cx">             break;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</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; !toSVGElement(*styledNode).isValid())
</del><ins>+        if (propertyID == CSSPropertyDisplay &amp;&amp; !renderer &amp;&amp; isSVGElement(*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="trunkSourceWebCorecssCSSCursorImageValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSCursorImageValue.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSCursorImageValue.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/css/CSSCursorImageValue.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -48,9 +48,9 @@
</span><span class="cx"> {
</span><span class="cx">     Element* element = SVGURIReference::targetElementFromIRIString(url, document);
</span><span class="cx">     if (element &amp;&amp; isSVGCursorElement(element))
</span><del>-        return toSVGCursorElement(element);
</del><ins>+        return downcast&lt;SVGCursorElement&gt;(element);
</ins><span class="cx"> 
</span><del>-    return 0;
</del><ins>+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> CSSCursorImageValue::CSSCursorImageValue(PassRef&lt;CSSValue&gt; imageValue, bool hasHotSpot, const IntPoint&amp; hotSpot)
</span><span class="lines">@@ -120,10 +120,10 @@
</span><span class="cx">         if (cachedImageURL() != element-&gt;document().completeURL(cursorElement-&gt;href()))
</span><span class="cx">             clearCachedImage();
</span><span class="cx"> 
</span><del>-        SVGElement* svgElement = toSVGElement(element);
-        m_referencedElements.add(svgElement);
-        svgElement-&gt;setCursorImageValue(this);
-        cursorElement-&gt;addClient(svgElement);
</del><ins>+        SVGElement&amp; svgElement = downcast&lt;SVGElement&gt;(*element);
+        m_referencedElements.add(&amp;svgElement);
+        svgElement.setCursorImageValue(this);
+        cursorElement-&gt;addClient(&amp;svgElement);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssElementRuleCollectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/ElementRuleCollector.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/ElementRuleCollector.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/css/ElementRuleCollector.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -422,7 +422,7 @@
</span><span class="cx"> 
</span><span class="cx">         // Now check SMIL animation override style.
</span><span class="cx">         if (includeSMILProperties &amp;&amp; styledElement.isSVGElement())
</span><del>-            addElementStyleProperties(toSVGElement(styledElement).animatedSMILStyleProperties(), false /* isCacheable */);
</del><ins>+            addElementStyleProperties(downcast&lt;SVGElement&gt;(styledElement).animatedSMILStyleProperties(), false /* isCacheable */);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/css/StyleResolver.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -447,18 +447,18 @@
</span><span class="cx">         return 0;
</span><span class="cx">     if (!parent || !parent-&gt;isStyledElement())
</span><span class="cx">         return 0;
</span><del>-    StyledElement* p = toStyledElement(parent);
-    if (p-&gt;inlineStyle())
</del><ins>+    StyledElement* styledParent = toStyledElement(parent);
+    if (styledParent-&gt;inlineStyle())
</ins><span class="cx">         return 0;
</span><del>-    if (p-&gt;isSVGElement() &amp;&amp; toSVGElement(p)-&gt;animatedSMILStyleProperties())
</del><ins>+    if (styledParent-&gt;isSVGElement() &amp;&amp; downcast&lt;SVGElement&gt;(*styledParent).animatedSMILStyleProperties())
</ins><span class="cx">         return 0;
</span><del>-    if (p-&gt;hasID() &amp;&amp; m_ruleSets.features().idsInRules.contains(p-&gt;idForStyleResolution().impl()))
</del><ins>+    if (styledParent-&gt;hasID() &amp;&amp; m_ruleSets.features().idsInRules.contains(styledParent-&gt;idForStyleResolution().impl()))
</ins><span class="cx">         return 0;
</span><span class="cx"> 
</span><del>-    RenderStyle* parentStyle = p-&gt;renderStyle();
</del><ins>+    RenderStyle* parentStyle = styledParent-&gt;renderStyle();
</ins><span class="cx">     unsigned subcount = 0;
</span><del>-    Node* thisCousin = p;
-    Node* currentNode = p-&gt;previousSibling();
</del><ins>+    Node* thisCousin = styledParent;
+    Node* currentNode = styledParent-&gt;previousSibling();
</ins><span class="cx"> 
</span><span class="cx">     // Reserve the tries for this level. This effectively makes sure that the algorithm
</span><span class="cx">     // will never go deeper than cStyleSearchLevelThreshold levels into recursion.
</span><span class="lines">@@ -602,7 +602,7 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (element-&gt;needsStyleRecalc())
</span><span class="cx">         return false;
</span><del>-    if (element-&gt;isSVGElement() &amp;&amp; toSVGElement(element)-&gt;animatedSMILStyleProperties())
</del><ins>+    if (element-&gt;isSVGElement() &amp;&amp; downcast&lt;SVGElement&gt;(*element).animatedSMILStyleProperties())
</ins><span class="cx">         return false;
</span><span class="cx">     if (element-&gt;isLink() != state.element()-&gt;isLink())
</span><span class="cx">         return false;
</span><span class="lines">@@ -681,22 +681,22 @@
</span><span class="cx"> {
</span><span class="cx">     State&amp; state = m_state;
</span><span class="cx">     if (!state.styledElement() || !state.parentStyle())
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><span class="cx">     // If the element has inline style it is probably unique.
</span><span class="cx">     if (state.styledElement()-&gt;inlineStyle())
</span><del>-        return 0;
-    if (state.styledElement()-&gt;isSVGElement() &amp;&amp; toSVGElement(state.styledElement())-&gt;animatedSMILStyleProperties())
-        return 0;
</del><ins>+        return nullptr;
+    if (state.styledElement()-&gt;isSVGElement() &amp;&amp; downcast&lt;SVGElement&gt;(*state.styledElement()).animatedSMILStyleProperties())
+        return nullptr;
</ins><span class="cx">     // Ids stop style sharing if they show up in the stylesheets.
</span><span class="cx">     if (state.styledElement()-&gt;hasID() &amp;&amp; m_ruleSets.features().idsInRules.contains(state.styledElement()-&gt;idForStyleResolution().impl()))
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     if (parentElementPreventsSharing(state.element()-&gt;parentElement()))
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     if (state.element() == state.document().cssTarget())
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     if (elementHasDirectionAuto(state.element()))
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><span class="cx">     // Cache whether state.element is affected by any known class selectors.
</span><span class="cx">     // FIXME: This shouldn't be a member variable. The style sharing code could be factored out of StyleResolver.
</span><span class="lines">@@ -716,17 +716,17 @@
</span><span class="cx"> 
</span><span class="cx">     // If we have exhausted all our budget or our cousins.
</span><span class="cx">     if (!shareElement)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><span class="cx">     // Can't share if sibling rules apply. This is checked at the end as it should rarely fail.
</span><span class="cx">     if (styleSharingCandidateMatchesRuleSet(m_ruleSets.sibling()))
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     // Can't share if attribute rules apply.
</span><span class="cx">     if (styleSharingCandidateMatchesRuleSet(m_ruleSets.uncommonAttribute()))
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     // Tracking child index requires unique style for each node. This may get set by the sibling rule match above.
</span><span class="cx">     if (parentElementPreventsSharing(state.element()-&gt;parentElement()))
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     return shareElement-&gt;renderStyle();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentStyleSheetCollectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DocumentStyleSheetCollection.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DocumentStyleSheetCollection.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/dom/DocumentStyleSheetCollection.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -280,7 +280,7 @@
</span><span class="cx">                 return;
</span><span class="cx">             }
</span><span class="cx"> #endif
</span><del>-        } else if ((node-&gt;isHTMLElement() &amp;&amp; (toHTMLElement(*node).hasTagName(linkTag) || toHTMLElement(*node).hasTagName(styleTag))) || (node-&gt;isSVGElement() &amp;&amp; toSVGElement(*node).hasTagName(SVGNames::styleTag))) {
</del><ins>+        } else if ((node-&gt;isHTMLElement() &amp;&amp; (toHTMLElement(*node).hasTagName(linkTag) || toHTMLElement(*node).hasTagName(styleTag))) || (node-&gt;isSVGElement() &amp;&amp; downcast&lt;SVGElement&gt;(*node).hasTagName(SVGNames::styleTag))) {
</ins><span class="cx">             Element&amp; element = toElement(*node);
</span><span class="cx">             AtomicString title = element.fastGetAttribute(titleAttr);
</span><span class="cx">             bool enabledViaScript = false;
</span><span class="lines">@@ -306,7 +306,7 @@
</span><span class="cx">             // Get the current preferred styleset. This is the
</span><span class="cx">             // set of sheets that will be enabled.
</span><span class="cx">             if (isSVGStyleElement(element))
</span><del>-                sheet = toSVGStyleElement(element).sheet();
</del><ins>+                sheet = downcast&lt;SVGStyleElement&gt;(element).sheet();
</ins><span class="cx">             else if (isHTMLLinkElement(element))
</span><span class="cx">                 sheet = toHTMLLinkElement(element).sheet();
</span><span class="cx">             else
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/dom/Element.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -383,7 +383,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (elementData()-&gt;animatedSVGAttributesAreDirty()) {
</span><span class="cx">         ASSERT(isSVGElement());
</span><del>-        toSVGElement(this)-&gt;synchronizeAnimatedSVGAttribute(anyQName());
</del><ins>+        downcast&lt;SVGElement&gt;(*this).synchronizeAnimatedSVGAttribute(anyQName());
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -399,7 +399,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (UNLIKELY(elementData()-&gt;animatedSVGAttributesAreDirty())) {
</span><span class="cx">         ASSERT(isSVGElement());
</span><del>-        toSVGElement(this)-&gt;synchronizeAnimatedSVGAttribute(name);
</del><ins>+        downcast&lt;SVGElement&gt;(*this).synchronizeAnimatedSVGAttribute(name);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -418,7 +418,7 @@
</span><span class="cx">     if (elementData()-&gt;animatedSVGAttributesAreDirty()) {
</span><span class="cx">         // We're not passing a namespace argument on purpose. SVGNames::*Attr are defined w/o namespaces as well.
</span><span class="cx">         ASSERT_WITH_SECURITY_IMPLICATION(isSVGElement());
</span><del>-        toSVGElement(this)-&gt;synchronizeAnimatedSVGAttribute(QualifiedName(nullAtom, localName, nullAtom));
</del><ins>+        downcast&lt;SVGElement&gt;(*this).synchronizeAnimatedSVGAttribute(QualifiedName(nullAtom, localName, nullAtom));
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -860,9 +860,9 @@
</span><span class="cx"> 
</span><span class="cx">     if (isSVGElement() &amp;&amp; renderer()) {
</span><span class="cx">         // Get the bounding rectangle from the SVG model.
</span><del>-        SVGElement* svgElement = toSVGElement(this);
</del><ins>+        SVGElement&amp; svgElement = downcast&lt;SVGElement&gt;(*this);
</ins><span class="cx">         FloatRect localRect;
</span><del>-        if (svgElement-&gt;getBoundingBox(localRect))
</del><ins>+        if (svgElement.getBoundingBox(localRect))
</ins><span class="cx">             quads.append(renderer()-&gt;localToAbsoluteQuad(localRect));
</span><span class="cx">     } else {
</span><span class="cx">         // Get the bounding rectangle from the box model.
</span><span class="lines">@@ -905,9 +905,9 @@
</span><span class="cx">     Vector&lt;FloatQuad&gt; quads;
</span><span class="cx">     if (isSVGElement() &amp;&amp; renderer() &amp;&amp; !renderer()-&gt;isSVGRoot()) {
</span><span class="cx">         // Get the bounding rectangle from the SVG model.
</span><del>-        SVGElement* svgElement = toSVGElement(this);
</del><ins>+        SVGElement&amp; svgElement = downcast&lt;SVGElement&gt;(*this);
</ins><span class="cx">         FloatRect localRect;
</span><del>-        if (svgElement-&gt;getBoundingBox(localRect))
</del><ins>+        if (svgElement.getBoundingBox(localRect))
</ins><span class="cx">             quads.append(renderer()-&gt;localToAbsoluteQuad(localRect));
</span><span class="cx">     } else {
</span><span class="cx">         // Get the bounding rectangle from the box model.
</span><span class="lines">@@ -2404,7 +2404,8 @@
</span><span class="cx">     // Only create renderers for SVG elements whose parents are SVG elements, or for proper &lt;svg xmlns=&quot;svgNS&quot;&gt; subdocuments.
</span><span class="cx">     if (child.isSVGElement()) {
</span><span class="cx">         ASSERT(!isSVGElement());
</span><del>-        return child.hasTagName(SVGNames::svgTag) &amp;&amp; toSVGElement(child).isValid();
</del><ins>+        const SVGElement&amp; childElement = downcast&lt;SVGElement&gt;(child);
+        return isSVGSVGElement(childElement) &amp;&amp; childElement.isValid();
</ins><span class="cx">     }
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -2562,7 +2563,7 @@
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (isSVGElement())
</span><del>-        return !toSVGElement(this)-&gt;isAnimatableAttribute(name);
</del><ins>+        return !downcast&lt;SVGElement&gt;(*this).isAnimatableAttribute(name);
</ins><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventDispatchercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventDispatcher.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventDispatcher.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/dom/EventDispatcher.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -221,8 +221,8 @@
</span><span class="cx">     // At this time, SVG nodes are not supported in non-&lt;use&gt; shadow trees.
</span><span class="cx">     if (!shadowHostElement || !shadowHostElement-&gt;hasTagName(SVGNames::useTag))
</span><span class="cx">         return referenceNode;
</span><del>-    SVGUseElement* useElement = toSVGUseElement(shadowHostElement);
-    if (SVGElementInstance* instance = useElement-&gt;instanceForShadowTreeElement(&amp;referenceNode))
</del><ins>+    SVGUseElement&amp; useElement = downcast&lt;SVGUseElement&gt;(*shadowHostElement);
+    if (SVGElementInstance* instance = useElement.instanceForShadowTreeElement(&amp;referenceNode))
</ins><span class="cx">         return *instance;
</span><span class="cx"> 
</span><span class="cx">     return referenceNode;
</span></span></pre></div>
<a id="trunkSourceWebCoredomScriptElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ScriptElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ScriptElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/dom/ScriptElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -386,9 +386,9 @@
</span><span class="cx">         return toHTMLScriptElement(element);
</span><span class="cx"> 
</span><span class="cx">     if (isSVGScriptElement(element))
</span><del>-        return toSVGScriptElement(element);
</del><ins>+        return downcast&lt;SVGScriptElement&gt;(element);
</ins><span class="cx"> 
</span><del>-    return 0;
</del><ins>+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoredommake_namespl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/make_names.pl (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/make_names.pl        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/dom/make_names.pl        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -664,13 +664,16 @@
</span><span class="cx"> struct ElementTypeCastTraits&lt;const $class, ArgType&gt; {
</span><span class="cx">     static bool is(ArgType&amp; node) { return $checkHelper(node); }
</span><span class="cx"> };
</span><del>-
</del><ins>+END
+        ;
+        if ($parameters{namespace} eq &quot;HTML&quot;) {
+            print F &lt;&lt;END
</ins><span class="cx"> // FIXME: Remove these macros once the code has been ported to using
</span><span class="cx"> // downcast&lt;*Element&gt;().
</span><span class="cx"> #define to$class(x) WebCore::downcast&lt;WebCore::$class&gt;(x)
</span><span class="cx"> END
</span><del>-        ;
-
</del><ins>+            ;
+        }
</ins><span class="cx">         print F &quot;\n&quot;;
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFrameOwnerElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFrameOwnerElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFrameOwnerElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/html/HTMLFrameOwnerElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -113,12 +113,12 @@
</span><span class="cx"> 
</span><span class="cx"> SVGDocument* HTMLFrameOwnerElement::getSVGDocument(ExceptionCode&amp; ec) const
</span><span class="cx"> {
</span><del>-    Document* doc = contentDocument();
-    if (doc &amp;&amp; doc-&gt;isSVGDocument())
-        return toSVGDocument(doc);
</del><ins>+    Document* document = contentDocument();
+    if (document &amp;&amp; document-&gt;isSVGDocument())
+        return downcast&lt;SVGDocument&gt;(document);
</ins><span class="cx">     // Spec: http://www.w3.org/TR/SVG/struct.html#InterfaceGetSVGDocument
</span><span class="cx">     ec = NOT_SUPPORTED_ERR;
</span><del>-    return 0;
</del><ins>+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc(StyleChangeType changeType)
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorCSSAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -977,7 +977,7 @@
</span><span class="cx">     if (styleElement-&gt;isHTMLElement())
</span><span class="cx">         cssStyleSheet = toHTMLStyleElement(styleElement.get())-&gt;sheet();
</span><span class="cx">     else if (styleElement-&gt;isSVGElement())
</span><del>-        cssStyleSheet = toSVGStyleElement(styleElement.get())-&gt;sheet();
</del><ins>+        cssStyleSheet = downcast&lt;SVGStyleElement&gt;(*styleElement).sheet();
</ins><span class="cx"> 
</span><span class="cx">     if (!cssStyleSheet)
</span><span class="cx">         return nullptr;
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlMathMLElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/MathMLElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/MathMLElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/mathml/MathMLElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -84,12 +84,12 @@
</span><span class="cx">         return node.isTextNode();
</span><span class="cx"> 
</span><span class="cx">     if (node.isMathMLElement()) {
</span><del>-        auto&amp; mathmlElement = toMathMLElement(node);
</del><ins>+        auto&amp; mathmlElement = downcast&lt;MathMLElement&gt;(node);
</ins><span class="cx">         return mathmlElement.hasTagName(MathMLNames::mathTag);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (node.isSVGElement()) {
</span><del>-        auto&amp; svgElement = toSVGElement(node);
</del><ins>+        auto&amp; svgElement = downcast&lt;SVGElement&gt;(node);
</ins><span class="cx">         return svgElement.hasTagName(SVGNames::svgTag);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -269,12 +269,12 @@
</span><span class="cx">         // See annotation-xml.model.mathml, annotation-xml.model.svg and annotation-xml.model.xhtml in the HTML5 RelaxNG schema.
</span><span class="cx"> 
</span><span class="cx">         if (child.isMathMLElement() &amp;&amp; (MathMLSelectElement::isMathMLEncoding(value) || MathMLSelectElement::isHTMLEncoding(value))) {
</span><del>-            auto&amp; mathmlElement = toMathMLElement(child);
</del><ins>+            auto&amp; mathmlElement = downcast&lt;MathMLElement&gt;(child);
</ins><span class="cx">             return mathmlElement.hasTagName(MathMLNames::mathTag);
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (child.isSVGElement() &amp;&amp; (MathMLSelectElement::isSVGEncoding(value) || MathMLSelectElement::isHTMLEncoding(value))) {
</span><del>-            auto&amp; svgElement = toSVGElement(child);
</del><ins>+            auto&amp; svgElement = downcast&lt;SVGElement&gt;(child);
</ins><span class="cx">             return svgElement.hasTagName(SVGNames::svgTag);
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -295,7 +295,7 @@
</span><span class="cx">     if (isSemanticAnnotation() &amp;&amp; (name == MathMLNames::srcAttr || name == MathMLNames::encodingAttr)) {
</span><span class="cx">         Element* parent = parentElement();
</span><span class="cx">         if (parent &amp;&amp; parent-&gt;isMathMLElement() &amp;&amp; parent-&gt;hasTagName(semanticsTag))
</span><del>-            toMathMLElement(parent)-&gt;updateSelectedChild();
</del><ins>+            downcast&lt;MathMLElement&gt;(*parent).updateSelectedChild();
</ins><span class="cx">     }
</span><span class="cx">     StyledElement::attributeChanged(name, oldValue, newValue, reason);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlMathMLElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/MathMLElement.h (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/MathMLElement.h        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/mathml/MathMLElement.h        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> 
</span><span class="cx"> inline bool Node::hasTagName(const MathMLQualifiedName&amp; name) const
</span><span class="cx"> {
</span><del>-    return isMathMLElement() &amp;&amp; toMathMLElement(*this).hasTagName(name);
</del><ins>+    return isMathMLElement() &amp;&amp; downcast&lt;MathMLElement&gt;(*this).hasTagName(name);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoremathmlMathMLSelectElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/mathml/MathMLSelectElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/mathml/MathMLSelectElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/mathml/MathMLSelectElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -155,12 +155,12 @@
</span><span class="cx"> 
</span><span class="cx">     Element* child = firstElementChild();
</span><span class="cx">     if (!child)
</span><del>-        return child;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><del>-    if (!child-&gt;isMathMLElement() || !toMathMLElement(child)-&gt;isPresentationMathML()) { 
</del><ins>+    if (!child-&gt;isMathMLElement() || !downcast&lt;MathMLElement&gt;(*child).isPresentationMathML()) {
</ins><span class="cx">         // The first child is not a presentation MathML element. Hence we move to the second child and start searching an annotation child that could be displayed.
</span><span class="cx">         child = child-&gt;nextElementSibling();
</span><del>-    } else if (!toMathMLElement(child)-&gt;isSemanticAnnotation()) {
</del><ins>+    } else if (!downcast&lt;MathMLElement&gt;(*child).isSemanticAnnotation()) {
</ins><span class="cx">         // The first child is a presentation MathML but not an annotation, so we can just display it.
</span><span class="cx">         return child;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorepageEventHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EventHandler.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EventHandler.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/page/EventHandler.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -760,10 +760,10 @@
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="cx">     if (m_frame.document()-&gt;isSVGDocument()
</span><del>-        &amp;&amp; toSVGDocument(m_frame.document())-&gt;zoomAndPanEnabled()) {
</del><ins>+        &amp;&amp; downcast&lt;SVGDocument&gt;(*m_frame.document()).zoomAndPanEnabled()) {
</ins><span class="cx">         if (event.event().shiftKey() &amp;&amp; singleClick) {
</span><span class="cx">             m_svgPan = true;
</span><del>-            toSVGDocument(m_frame.document())-&gt;startPan(m_frame.view()-&gt;windowToContents(event.event().position()));
</del><ins>+            downcast&lt;SVGDocument&gt;(*m_frame.document()).startPan(m_frame.view()-&gt;windowToContents(event.event().position()));
</ins><span class="cx">             return true;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -1896,7 +1896,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     if (m_svgPan) {
</span><del>-        toSVGDocument(m_frame.document())-&gt;updatePan(m_frame.view()-&gt;windowToContents(m_lastKnownMousePosition));
</del><ins>+        downcast&lt;SVGDocument&gt;(m_frame.document())-&gt;updatePan(m_frame.view()-&gt;windowToContents(m_lastKnownMousePosition));
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -2040,7 +2040,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (m_svgPan) {
</span><span class="cx">         m_svgPan = false;
</span><del>-        toSVGDocument(m_frame.document())-&gt;updatePan(m_frame.view()-&gt;windowToContents(m_lastKnownMousePosition));
</del><ins>+        downcast&lt;SVGDocument&gt;(m_frame.document())-&gt;updatePan(m_frame.view()-&gt;windowToContents(m_lastKnownMousePosition));
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -2356,17 +2356,17 @@
</span><span class="cx"> static inline SVGElementInstance* instanceAssociatedWithShadowTreeElement(Node* referenceNode)
</span><span class="cx"> {
</span><span class="cx">     if (!referenceNode || !referenceNode-&gt;isSVGElement())
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><span class="cx">     ShadowRoot* shadowRoot = referenceNode-&gt;containingShadowRoot();
</span><span class="cx">     if (!shadowRoot)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><span class="cx">     Element* shadowTreeParentElement = shadowRoot-&gt;hostElement();
</span><span class="cx">     if (!shadowTreeParentElement || !shadowTreeParentElement-&gt;hasTagName(useTag))
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><del>-    return toSVGUseElement(shadowTreeParentElement)-&gt;instanceForShadowTreeElement(referenceNode);
</del><ins>+    return downcast&lt;SVGUseElement&gt;(*shadowTreeParentElement).instanceForShadowTreeElement(referenceNode);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static RenderElement* nearestCommonHoverAncestor(RenderElement* obj1, RenderElement* obj2)
</span></span></pre></div>
<a id="trunkSourceWebCorepageFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Frame.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Frame.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/page/Frame.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -968,7 +968,7 @@
</span><span class="cx">     // Respect SVGs zoomAndPan=&quot;disabled&quot; property in standalone SVG documents.
</span><span class="cx">     // FIXME: How to handle compound documents + zoomAndPan=&quot;disabled&quot;? Needs SVG WG clarification.
</span><span class="cx">     if (document-&gt;isSVGDocument()) {
</span><del>-        if (!toSVGDocument(document)-&gt;zoomAndPanEnabled())
</del><ins>+        if (!downcast&lt;SVGDocument&gt;(*document).zoomAndPanEnabled())
</ins><span class="cx">             return;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/page/FrameView.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -1961,7 +1961,7 @@
</span><span class="cx">     frame().document()-&gt;setCSSTarget(anchorElement);
</span><span class="cx"> 
</span><span class="cx">     if (frame().document()-&gt;isSVGDocument()) {
</span><del>-        if (SVGSVGElement* svg = toSVGDocument(frame().document())-&gt;rootElement()) {
</del><ins>+        if (SVGSVGElement* svg = downcast&lt;SVGDocument&gt;(*frame().document()).rootElement()) {
</ins><span class="cx">             svg-&gt;setupInitialView(name, anchorElement);
</span><span class="cx">             if (!anchorElement)
</span><span class="cx">                 return true;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTableCellcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTableCell.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTableCell.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/RenderTableCell.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx">         return std::min&lt;unsigned&gt;(toHTMLTableCellElement(element())-&gt;colSpan(), maxColumnIndex);
</span><span class="cx"> #if ENABLE(MATHML)
</span><span class="cx">     if (element()-&gt;hasTagName(MathMLNames::mtdTag))
</span><del>-        return std::min&lt;unsigned&gt;(toMathMLElement(element())-&gt;colSpan(), maxColumnIndex);
</del><ins>+        return std::min&lt;unsigned&gt;(downcast&lt;MathMLElement&gt;(*element()).colSpan(), maxColumnIndex);
</ins><span class="cx"> #endif
</span><span class="cx">     return 1;
</span><span class="cx"> }
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx">         return std::min&lt;unsigned&gt;(toHTMLTableCellElement(element())-&gt;rowSpan(), maxRowIndex);
</span><span class="cx"> #if ENABLE(MATHML)
</span><span class="cx">     if (element()-&gt;hasTagName(MathMLNames::mtdTag))
</span><del>-        return std::min&lt;unsigned&gt;(toMathMLElement(element())-&gt;rowSpan(), maxRowIndex);
</del><ins>+        return std::min&lt;unsigned&gt;(downcast&lt;MathMLElement&gt;(*element()).rowSpan(), maxRowIndex);
</ins><span class="cx"> #endif
</span><span class="cx">     return 1;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLMenclosecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> 
</span><span class="cx"> void RenderMathMLMenclose::addChild(RenderObject* newChild, RenderObject* beforeChild)
</span><span class="cx"> {
</span><del>-    MathMLMencloseElement* menclose = toMathMLMencloseElement(element());
</del><ins>+    MathMLMencloseElement* menclose = downcast&lt;MathMLMencloseElement&gt;(element());
</ins><span class="cx">     // Allow an anonymous RenderMathMLSquareRoot to handle drawing the radical
</span><span class="cx">     // notation, rather than duplicating the code needed to paint a root.
</span><span class="cx">     if (!firstChild() &amp;&amp; menclose-&gt;isRadical())        
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx">     RenderMathMLBlock::computePreferredLogicalWidths();
</span><span class="cx">     const int paddingTop = 6;
</span><span class="cx"> 
</span><del>-    MathMLMencloseElement* menclose = toMathMLMencloseElement(element());
</del><ins>+    MathMLMencloseElement* menclose = downcast&lt;MathMLMencloseElement&gt;(element());
</ins><span class="cx">     const Vector&lt;String&gt;&amp; notationValues = menclose-&gt;notationValues();
</span><span class="cx">     size_t notationalValueSize = notationValues.size();
</span><span class="cx">     for (size_t i = 0; i &lt; notationalValueSize; i++) {
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx"> 
</span><span class="cx"> void RenderMathMLMenclose::updateLogicalHeight()
</span><span class="cx"> {
</span><del>-    MathMLMencloseElement* menclose = toMathMLMencloseElement(element());
</del><ins>+    MathMLMencloseElement* menclose = downcast&lt;MathMLMencloseElement&gt;(element());
</ins><span class="cx">     const Vector&lt;String&gt;&amp; notationValues = menclose-&gt;notationValues();
</span><span class="cx">     size_t notationalValueSize = notationValues.size();
</span><span class="cx">     for (size_t i = 0; i &lt; notationalValueSize; i++)
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx">     if (info.context-&gt;paintingDisabled() || info.phase != PaintPhaseForeground || style().visibility() != VISIBLE)
</span><span class="cx">         return;
</span><span class="cx">     
</span><del>-    MathMLMencloseElement* menclose = toMathMLMencloseElement(element());
</del><ins>+    MathMLMencloseElement* menclose = downcast&lt;MathMLMencloseElement&gt;(element());
</ins><span class="cx">     const Vector&lt;String&gt;&amp; notationValues = menclose-&gt;notationValues();
</span><span class="cx">     size_t notationalValueSize = notationValues.size();
</span><span class="cx">     bool isDefaultLongDiv = menclose-&gt;isDefaultLongDiv();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGBlock.h (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGBlock.h        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGBlock.h        2014-09-23 00:55:05 UTC (rev 173859)
</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="trunkSourceWebCorerenderingsvgRenderSVGForeignObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx"> 
</span><span class="cx"> SVGForeignObjectElement&amp; RenderSVGForeignObject::foreignObjectElement() const
</span><span class="cx"> {
</span><del>-    return toSVGForeignObjectElement(RenderSVGBlock::graphicsElement());
</del><ins>+    return downcast&lt;SVGForeignObjectElement&gt;(RenderSVGBlock::graphicsElement());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderSVGForeignObject::paint(PaintInfo&amp; paintInfo, const LayoutPoint&amp;)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGGradientStopcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> SVGGradientElement* RenderSVGGradientStop::gradientElement()
</span><span class="cx"> {
</span><span class="cx">     if (element().parentElement() &amp;&amp; isSVGGradientElement(*element().parentElement()))
</span><del>-        return &amp;toSVGGradientElement(*element().parentElement());
</del><ins>+        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="trunkSourceWebCorerenderingsvgRenderSVGGradientStoph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.h (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.h        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.h        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx">     RenderSVGGradientStop(SVGStopElement&amp;, PassRef&lt;RenderStyle&gt;);
</span><span class="cx">     virtual ~RenderSVGGradientStop();
</span><span class="cx"> 
</span><del>-    SVGStopElement&amp; element() const { return toSVGStopElement(RenderObject::nodeForNonAnonymous()); }
</del><ins>+    SVGStopElement&amp; element() const { return downcast&lt;SVGStopElement&gt;(RenderObject::nodeForNonAnonymous()); }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGImage.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGImage.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGImage.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx"> 
</span><span class="cx"> SVGImageElement&amp; RenderSVGImage::imageElement() const
</span><span class="cx"> {
</span><del>-    return toSVGImageElement(RenderSVGModelObject::element());
</del><ins>+    return downcast&lt;SVGImageElement&gt;(RenderSVGModelObject::element());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool RenderSVGImage::updateImageViewport()
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGInlineh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGInline.h (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGInline.h        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGInline.h        2014-09-23 00:55:05 UTC (rev 173859)
</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="trunkSourceWebCorerenderingsvgRenderSVGModelObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -124,11 +124,11 @@
</span><span class="cx">     Node* current = element;
</span><span class="cx"> 
</span><span class="cx">     while (current &amp;&amp; current-&gt;isSVGElement()) {
</span><del>-        SVGElement* currentElement = toSVGElement(current);
-        localTransform = currentElement-&gt;renderer()-&gt;localToParentTransform();
</del><ins>+        SVGElement&amp; currentElement = downcast&lt;SVGElement&gt;(*current);
+        localTransform = currentElement.renderer()-&gt;localToParentTransform();
</ins><span class="cx">         transform = localTransform.multiply(transform);
</span><span class="cx">         // For getCTM() computation, stop at the nearest viewport element
</span><del>-        if (currentElement == stopAtElement)
</del><ins>+        if (&amp;currentElement == stopAtElement)
</ins><span class="cx">             break;
</span><span class="cx"> 
</span><span class="cx">         current = current-&gt;parentOrShadowHostNode();
</span><span class="lines">@@ -171,7 +171,7 @@
</span><span class="cx">     if (!isGraphicsElement(*renderer))
</span><span class="cx">         return false;
</span><span class="cx">     AffineTransform ctm;
</span><del>-    SVGElement* svgElement = toSVGElement(renderer-&gt;element());
</del><ins>+    SVGElement* svgElement = downcast&lt;SVGElement&gt;(renderer-&gt;element());
</ins><span class="cx">     getElementCTM(svgElement, ctm);
</span><span class="cx">     ASSERT(svgElement-&gt;renderer());
</span><span class="cx">     return intersectsAllowingEmpty(rect, ctm.mapRect(svgElement-&gt;renderer()-&gt;repaintRectInLocalCoordinates()));
</span><span class="lines">@@ -184,7 +184,7 @@
</span><span class="cx">     if (!isGraphicsElement(*renderer))
</span><span class="cx">         return false;
</span><span class="cx">     AffineTransform ctm;
</span><del>-    SVGElement* svgElement = toSVGElement(renderer-&gt;element());
</del><ins>+    SVGElement* svgElement = downcast&lt;SVGElement&gt;(renderer-&gt;element());
</ins><span class="cx">     getElementCTM(svgElement, ctm);
</span><span class="cx">     ASSERT(svgElement-&gt;renderer());
</span><span class="cx">     return rect.contains(ctm.mapRect(svgElement-&gt;renderer()-&gt;repaintRectInLocalCoordinates()));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGModelObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.h (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.h        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.h        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx">     bool hasSVGShadow() const { return m_hasSVGShadow; }
</span><span class="cx">     void setHasSVGShadow(bool hasShadow) { m_hasSVGShadow = hasShadow; }
</span><span class="cx"> 
</span><del>-    SVGElement&amp; element() const { return toSVGElement(nodeForNonAnonymous()); }
</del><ins>+    SVGElement&amp; element() const { return downcast&lt;SVGElement&gt;(nodeForNonAnonymous()); }
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     RenderSVGModelObject(SVGElement&amp;, PassRef&lt;RenderStyle&gt;);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGRectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRect.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGRect.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRect.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> 
</span><span class="cx"> SVGRectElement&amp; RenderSVGRect::rectElement() const
</span><span class="cx"> {
</span><del>-    return toSVGRectElement(RenderSVGShape::graphicsElement());
</del><ins>+    return downcast&lt;SVGRectElement&gt;(RenderSVGShape::graphicsElement());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderSVGRect::updateShapeFromElement()
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGResourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -169,7 +169,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (!renderer.element() || !renderer.element()-&gt;isSVGElement())
</span><span class="cx">         return;
</span><del>-    HashSet&lt;SVGElement*&gt;* dependencies = renderer.document().accessSVGExtensions()-&gt;setOfElementsReferencingTarget(toSVGElement(renderer.element()));
</del><ins>+    HashSet&lt;SVGElement*&gt;* dependencies = renderer.document().accessSVGExtensions()-&gt;setOfElementsReferencingTarget(downcast&lt;SVGElement&gt;(renderer.element()));
</ins><span class="cx">     if (!dependencies)
</span><span class="cx">         return;
</span><span class="cx">     for (auto* element : *dependencies) {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGResourceClippercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -94,9 +94,9 @@
</span><span class="cx">         // Only shapes or paths are supported for direct clipping. We need to fallback to masking for texts.
</span><span class="cx">         if (renderer-&gt;isSVGText())
</span><span class="cx">             return false;
</span><del>-        if (!childNode-&gt;isSVGElement() || !toSVGElement(childNode)-&gt;isSVGGraphicsElement())
</del><ins>+        if (!childNode-&gt;isSVGElement() || !downcast&lt;SVGElement&gt;(*childNode).isSVGGraphicsElement())
</ins><span class="cx">             continue;
</span><del>-        SVGGraphicsElement* 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 class="lines">@@ -106,7 +106,7 @@
</span><span class="cx">             return false;
</span><span class="cx">         // Fallback to masking, if there is more than one clipping path.
</span><span class="cx">         if (clipPath.isEmpty()) {
</span><del>-            styled-&gt;toClipPath(clipPath);
</del><ins>+            styled.toClipPath(clipPath);
</ins><span class="cx">             clipRule = svgStyle.clipRule();
</span><span class="cx">         } else
</span><span class="cx">             return false;
</span><span class="lines">@@ -222,7 +222,7 @@
</span><span class="cx">         WindRule newClipRule = style.svgStyle().clipRule();
</span><span class="cx">         bool isUseElement = child.hasTagName(SVGNames::useTag);
</span><span class="cx">         if (isUseElement) {
</span><del>-            SVGUseElement&amp; useElement = toSVGUseElement(child);
</del><ins>+            SVGUseElement&amp; useElement = downcast&lt;SVGUseElement&gt;(child);
</ins><span class="cx">             renderer = useElement.rendererClipChild();
</span><span class="cx">             if (!renderer)
</span><span class="cx">                 continue;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGResourceClipperh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.h (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.h        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.h        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx">     RenderSVGResourceClipper(SVGClipPathElement&amp;, PassRef&lt;RenderStyle&gt;);
</span><span class="cx">     virtual ~RenderSVGResourceClipper();
</span><span class="cx"> 
</span><del>-    SVGClipPathElement&amp; clipPathElement() const { return toSVGClipPathElement(nodeForNonAnonymous()); }
</del><ins>+    SVGClipPathElement&amp; clipPathElement() const { return downcast&lt;SVGClipPathElement&gt;(nodeForNonAnonymous()); }
</ins><span class="cx"> 
</span><span class="cx">     virtual void removeAllClientsFromCache(bool markForInvalidation = true) override;
</span><span class="cx">     virtual void removeClientFromCache(RenderElement&amp;, bool markForInvalidation = true) override;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGResourceContainercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -212,7 +212,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="trunkSourceWebCorerenderingsvgRenderSVGResourceFilterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.h (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.h        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.h        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx">     RenderSVGResourceFilter(SVGFilterElement&amp;, PassRef&lt;RenderStyle&gt;);
</span><span class="cx">     virtual ~RenderSVGResourceFilter();
</span><span class="cx"> 
</span><del>-    SVGFilterElement&amp; filterElement() const { return toSVGFilterElement(RenderSVGResourceContainer::element()); }
</del><ins>+    SVGFilterElement&amp; filterElement() const { return downcast&lt;SVGFilterElement&gt;(RenderSVGResourceContainer::element()); }
</ins><span class="cx"> 
</span><span class="cx">     virtual void removeAllClientsFromCache(bool markForInvalidation = true) override;
</span><span class="cx">     virtual void removeClientFromCache(RenderElement&amp;, bool markForInvalidation = true) override;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGResourceLinearGradienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceLinearGradient.h (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceLinearGradient.h        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceLinearGradient.h        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx">     RenderSVGResourceLinearGradient(SVGLinearGradientElement&amp;, PassRef&lt;RenderStyle&gt;);
</span><span class="cx">     virtual ~RenderSVGResourceLinearGradient();
</span><span class="cx"> 
</span><del>-    SVGLinearGradientElement&amp; linearGradientElement() const { return toSVGLinearGradientElement(RenderSVGResourceGradient::gradientElement()); }
</del><ins>+    SVGLinearGradientElement&amp; linearGradientElement() const { return downcast&lt;SVGLinearGradientElement&gt;(RenderSVGResourceGradient::gradientElement()); }
</ins><span class="cx"> 
</span><span class="cx">     virtual RenderSVGResourceType resourceType() const { return s_resourceType; }
</span><span class="cx">     static RenderSVGResourceType s_resourceType;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGResourceMarkerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceMarker.h (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceMarker.h        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceMarker.h        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx">     RenderSVGResourceMarker(SVGMarkerElement&amp;, PassRef&lt;RenderStyle&gt;);
</span><span class="cx">     virtual ~RenderSVGResourceMarker();
</span><span class="cx"> 
</span><del>-    SVGMarkerElement&amp; markerElement() const { return toSVGMarkerElement(RenderSVGResourceContainer::element()); }
</del><ins>+    SVGMarkerElement&amp; markerElement() const { return downcast&lt;SVGMarkerElement&gt;(RenderSVGResourceContainer::element()); }
</ins><span class="cx"> 
</span><span class="cx">     virtual void removeAllClientsFromCache(bool markForInvalidation = true) override;
</span><span class="cx">     virtual void removeClientFromCache(RenderElement&amp;, bool markForInvalidation = true) override;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGResourceMaskerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceMasker.h (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceMasker.h        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceMasker.h        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">     RenderSVGResourceMasker(SVGMaskElement&amp;, PassRef&lt;RenderStyle&gt;);
</span><span class="cx">     virtual ~RenderSVGResourceMasker();
</span><span class="cx"> 
</span><del>-    SVGMaskElement&amp; maskElement() const { return toSVGMaskElement(RenderSVGResourceContainer::element()); }
</del><ins>+    SVGMaskElement&amp; maskElement() const { return downcast&lt;SVGMaskElement&gt;(RenderSVGResourceContainer::element()); }
</ins><span class="cx"> 
</span><span class="cx">     virtual void removeAllClientsFromCache(bool markForInvalidation = true) override;
</span><span class="cx">     virtual void removeClientFromCache(RenderElement&amp;, bool markForInvalidation = true) override;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGResourcePatterncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx"> 
</span><span class="cx"> SVGPatternElement&amp; RenderSVGResourcePattern::patternElement() const
</span><span class="cx"> {
</span><del>-    return toSVGPatternElement(RenderSVGResourceContainer::element());
</del><ins>+    return downcast&lt;SVGPatternElement&gt;(RenderSVGResourceContainer::element());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderSVGResourcePattern::removeAllClientsFromCache(bool markForInvalidation)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGResourceRadialGradienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceRadialGradient.h (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceRadialGradient.h        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceRadialGradient.h        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">     RenderSVGResourceRadialGradient(SVGRadialGradientElement&amp;, PassRef&lt;RenderStyle&gt;);
</span><span class="cx">     virtual ~RenderSVGResourceRadialGradient();
</span><span class="cx"> 
</span><del>-    SVGRadialGradientElement&amp; radialGradientElement() const { return toSVGRadialGradientElement(RenderSVGResourceGradient::gradientElement()); }
</del><ins>+    SVGRadialGradientElement&amp; radialGradientElement() const { return downcast&lt;SVGRadialGradientElement&gt;(RenderSVGResourceGradient::gradientElement()); }
</ins><span class="cx"> 
</span><span class="cx">     virtual RenderSVGResourceType resourceType() const { return s_resourceType; }
</span><span class="cx">     static RenderSVGResourceType s_resourceType;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGRootcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx"> 
</span><span class="cx"> SVGSVGElement&amp; RenderSVGRoot::svgSVGElement() const
</span><span class="cx"> {
</span><del>-    return toSVGSVGElement(nodeForNonAnonymous());
</del><ins>+    return downcast&lt;SVGSVGElement&gt;(nodeForNonAnonymous());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderSVGRoot::computeIntrinsicRatioInformation(FloatSize&amp; intrinsicSize, double&amp; intrinsicRatio) const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGShapeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGShape.h (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGShape.h        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGShape.h        2014-09-23 00:55:05 UTC (rev 173859)
</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="trunkSourceWebCorerenderingsvgRenderSVGTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> 
</span><span class="cx"> SVGTextElement&amp; RenderSVGText::textElement() const
</span><span class="cx"> {
</span><del>-    return toSVGTextElement(RenderSVGBlock::graphicsElement());
</del><ins>+    return downcast&lt;SVGTextElement&gt;(RenderSVGBlock::graphicsElement());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool RenderSVGText::isChildAllowed(const RenderObject&amp; child, const RenderStyle&amp;) const
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGTextPathcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGTextPath.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGTextPath.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGTextPath.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> 
</span><span class="cx"> SVGTextPathElement&amp; RenderSVGTextPath::textPathElement() const
</span><span class="cx"> {
</span><del>-    return toSVGTextPathElement(RenderSVGInline::graphicsElement());
</del><ins>+    return downcast&lt;SVGTextPathElement&gt;(RenderSVGInline::graphicsElement());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Path RenderSVGTextPath::layoutPath() const
</span><span class="lines">@@ -48,17 +48,17 @@
</span><span class="cx">     if (!targetElement || !targetElement-&gt;hasTagName(SVGNames::pathTag))
</span><span class="cx">         return Path();
</span><span class="cx">     
</span><del>-    SVGPathElement* pathElement = toSVGPathElement(targetElement);
</del><ins>+    SVGPathElement&amp; pathElement = downcast&lt;SVGPathElement&gt;(*targetElement);
</ins><span class="cx">     
</span><span class="cx">     Path pathData;
</span><del>-    updatePathFromGraphicsElement(pathElement, pathData);
</del><ins>+    updatePathFromGraphicsElement(&amp;pathElement, pathData);
</ins><span class="cx"> 
</span><span class="cx">     // Spec:  The transform attribute on the referenced 'path' element represents a
</span><span class="cx">     // supplemental transformation relative to the current user coordinate system for
</span><span class="cx">     // the current 'text' element, including any adjustments to the current user coordinate
</span><span class="cx">     // system due to a possible transform attribute on the current 'text' element.
</span><span class="cx">     // http://www.w3.org/TR/SVG/text.html#TextPathElement
</span><del>-    pathData.transform(pathElement-&gt;animatedLocalTransform());
</del><ins>+    pathData.transform(pathElement.animatedLocalTransform());
</ins><span class="cx">     return pathData;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGTransformableContainercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGTransformableContainer.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGTransformableContainer.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGTransformableContainer.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -41,13 +41,13 @@
</span><span class="cx">     // If we're either the renderer for a &lt;use&gt; element, or for any &lt;g&gt; element inside the shadow
</span><span class="cx">     // tree, that was created during the use/symbol/svg expansion in SVGUseElement. These containers
</span><span class="cx">     // need to respect the translations induced by their corresponding use elements x/y attributes.
</span><del>-    SVGUseElement* useElement = 0;
</del><ins>+    SVGUseElement* useElement = nullptr;
</ins><span class="cx">     if (isSVGUseElement(element))
</span><del>-        useElement = &amp;toSVGUseElement(element);
</del><ins>+        useElement = &amp;downcast&lt;SVGUseElement&gt;(element);
</ins><span class="cx">     else if (element.isInShadowTree() &amp;&amp; isSVGGElement(element)) {
</span><span class="cx">         SVGElement* correspondingElement = element.correspondingElement();
</span><span class="cx">         if (correspondingElement &amp;&amp; isSVGUseElement(correspondingElement))
</span><del>-            useElement = toSVGUseElement(correspondingElement);
</del><ins>+            useElement = downcast&lt;SVGUseElement&gt;(correspondingElement);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (useElement) {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGTransformableContainerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGTransformableContainer.h (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGTransformableContainer.h        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGTransformableContainer.h        2014-09-23 00:55:05 UTC (rev 173859)
</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="trunkSourceWebCorerenderingsvgRenderSVGViewportContainercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGViewportContainer.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGViewportContainer.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGViewportContainer.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> 
</span><span class="cx"> SVGSVGElement&amp; RenderSVGViewportContainer::svgSVGElement() const
</span><span class="cx"> {
</span><del>-    return toSVGSVGElement(RenderSVGContainer::element());
</del><ins>+    return downcast&lt;SVGSVGElement&gt;(RenderSVGContainer::element());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderSVGViewportContainer::determineIfLayoutSizeChanged()
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGPathDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGPathData.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGPathData.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/SVGPathData.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx"> 
</span><span class="cx"> static void updatePathFromLineElement(SVGElement* element, Path&amp; path)
</span><span class="cx"> {
</span><del>-    SVGLineElement* line = toSVGLineElement(element);
</del><ins>+    SVGLineElement* line = downcast&lt;SVGLineElement&gt;(element);
</ins><span class="cx"> 
</span><span class="cx">     SVGLengthContext lengthContext(element);
</span><span class="cx">     path.moveTo(FloatPoint(line-&gt;x1().value(lengthContext), line-&gt;y1().value(lengthContext)));
</span><span class="lines">@@ -83,12 +83,12 @@
</span><span class="cx"> 
</span><span class="cx"> static void updatePathFromPathElement(SVGElement* element, Path&amp; path)
</span><span class="cx"> {
</span><del>-    buildPathFromByteStream(toSVGPathElement(element)-&gt;pathByteStream(), path);
</del><ins>+    buildPathFromByteStream(downcast&lt;SVGPathElement&gt;(element)-&gt;pathByteStream(), path);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void updatePathFromPolygonElement(SVGElement* element, Path&amp; path)
</span><span class="cx"> {
</span><del>-    SVGPointList&amp; points = toSVGPolygonElement(element)-&gt;animatedPoints()-&gt;values();
</del><ins>+    SVGPointList&amp; points = downcast&lt;SVGPolygonElement&gt;(element)-&gt;animatedPoints()-&gt;values();
</ins><span class="cx">     if (points.isEmpty())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -103,7 +103,7 @@
</span><span class="cx"> 
</span><span class="cx"> static void updatePathFromPolylineElement(SVGElement* element, Path&amp; path)
</span><span class="cx"> {
</span><del>-    SVGPointList&amp; points = toSVGPolylineElement(element)-&gt;animatedPoints()-&gt;values();
</del><ins>+    SVGPointList&amp; points = downcast&lt;SVGPolylineElement&gt;(element)-&gt;animatedPoints()-&gt;values();
</ins><span class="cx">     if (points.isEmpty())
</span><span class="cx">         return;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGRenderSupportcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -252,7 +252,7 @@
</span><span class="cx"> 
</span><span class="cx">         if (layoutSizeChanged) {
</span><span class="cx">             // When selfNeedsLayout is false and the layout size changed, we have to check whether this child uses relative lengths
</span><del>-            if (SVGElement* element = child-&gt;node()-&gt;isSVGElement() ? toSVGElement(child-&gt;node()) : 0) {
</del><ins>+            if (SVGElement* element = child-&gt;node()-&gt;isSVGElement() ? downcast&lt;SVGElement&gt;(child-&gt;node()) : nullptr) {
</ins><span class="cx">                 if (element-&gt;hasRelativeLengths()) {
</span><span class="cx">                     // When the layout size changed and when using relative values tell the RenderSVGShape to update its shape object
</span><span class="cx">                     if (child-&gt;isSVGShape())
</span><span class="lines">@@ -409,7 +409,7 @@
</span><span class="cx"> 
</span><span class="cx">     const SVGRenderStyle&amp; svgStyle = style.svgStyle();
</span><span class="cx"> 
</span><del>-    SVGLengthContext lengthContext(toSVGElement(renderer.element()));
</del><ins>+    SVGLengthContext lengthContext(downcast&lt;SVGElement&gt;(renderer.element()));
</ins><span class="cx">     context-&gt;setStrokeThickness(lengthContext.valueForLength(svgStyle.strokeWidth()));
</span><span class="cx">     context-&gt;setLineCap(svgStyle.capStyle());
</span><span class="cx">     context-&gt;setLineJoin(svgStyle.joinStyle());
</span><span class="lines">@@ -460,11 +460,11 @@
</span><span class="cx"> 
</span><span class="cx">     bool maskedAncestorShouldIsolateBlending = renderer.style().hasBlendMode();
</span><span class="cx">     for (auto* ancestor = renderer.element()-&gt;parentElement(); ancestor &amp;&amp; ancestor-&gt;isSVGElement(); ancestor = ancestor-&gt;parentElement()) {
</span><del>-        if (!toSVGElement(ancestor)-&gt;isSVGGraphicsElement() || !isolatesBlending(*ancestor-&gt;computedStyle()))
</del><ins>+        if (!downcast&lt;SVGElement&gt;(*ancestor).isSVGGraphicsElement() || !isolatesBlending(*ancestor-&gt;computedStyle()))
</ins><span class="cx">             continue;
</span><span class="cx"> 
</span><span class="cx">         if (ancestor-&gt;computedStyle()-&gt;svgStyle().hasMasker())
</span><del>-            toSVGGraphicsElement(ancestor)-&gt;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 (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -321,33 +321,33 @@
</span><span class="cx">     SVGLengthContext lengthContext(&amp;svgElement);
</span><span class="cx"> 
</span><span class="cx">     if (isSVGRectElement(svgElement)) {
</span><del>-        const SVGRectElement&amp; element = toSVGRectElement(svgElement);
</del><ins>+        const SVGRectElement&amp; element = downcast&lt;SVGRectElement&gt;(svgElement);
</ins><span class="cx">         writeNameValuePair(ts, &quot;x&quot;, element.x().value(lengthContext));
</span><span class="cx">         writeNameValuePair(ts, &quot;y&quot;, element.y().value(lengthContext));
</span><span class="cx">         writeNameValuePair(ts, &quot;width&quot;, element.width().value(lengthContext));
</span><span class="cx">         writeNameValuePair(ts, &quot;height&quot;, element.height().value(lengthContext));
</span><span class="cx">     } else if (isSVGLineElement(svgElement)) {
</span><del>-        const SVGLineElement&amp; element = toSVGLineElement(svgElement);
</del><ins>+        const SVGLineElement&amp; element = downcast&lt;SVGLineElement&gt;(svgElement);
</ins><span class="cx">         writeNameValuePair(ts, &quot;x1&quot;, element.x1().value(lengthContext));
</span><span class="cx">         writeNameValuePair(ts, &quot;y1&quot;, element.y1().value(lengthContext));
</span><span class="cx">         writeNameValuePair(ts, &quot;x2&quot;, element.x2().value(lengthContext));
</span><span class="cx">         writeNameValuePair(ts, &quot;y2&quot;, element.y2().value(lengthContext));
</span><span class="cx">     } else if (isSVGEllipseElement(svgElement)) {
</span><del>-        const SVGEllipseElement&amp; element = toSVGEllipseElement(svgElement);
</del><ins>+        const SVGEllipseElement&amp; element = downcast&lt;SVGEllipseElement&gt;(svgElement);
</ins><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;rx&quot;, element.rx().value(lengthContext));
</span><span class="cx">         writeNameValuePair(ts, &quot;ry&quot;, element.ry().value(lengthContext));
</span><span class="cx">     } else if (isSVGCircleElement(svgElement)) {
</span><del>-        const SVGCircleElement&amp; element = toSVGCircleElement(svgElement);
</del><ins>+        const SVGCircleElement&amp; element = downcast&lt;SVGCircleElement&gt;(svgElement);
</ins><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><span class="cx">     } else if (svgElement.hasTagName(SVGNames::polygonTag) || svgElement.hasTagName(SVGNames::polylineTag)) {
</span><del>-        const SVGPolyElement&amp; element = toSVGPolyElement(svgElement);
</del><ins>+        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 (isSVGPathElement(svgElement)) {
</span><del>-        const SVGPathElement&amp; element = toSVGPathElement(svgElement);
</del><ins>+        const SVGPathElement&amp; element = downcast&lt;SVGPathElement&gt;(svgElement);
</ins><span class="cx">         String pathString;
</span><span class="cx">         // FIXME: We should switch to UnalteredParsing here - this will affect the path dumping output of dozens of tests.
</span><span class="cx">         buildStringFromByteStream(element.pathByteStream(), pathString, NormalizedParsing);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGRenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</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; toSVGElement(renderer.element())-&gt;isSVGGraphicsElement()) {
-        SVGGraphicsElement&amp; graphicsElement = *toSVGGraphicsElement(renderer.element());
</del><ins>+    if (svgStyle.hasMasker() &amp;&amp; downcast&lt;SVGElement&gt;(renderer.element())-&gt;isSVGGraphicsElement()) {
+        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 class="lines">@@ -144,7 +144,7 @@
</span><span class="cx">             referenceBox = renderer.strokeBoundingBox();
</span><span class="cx">         else if (clipPath.referenceBox() == ViewBox &amp;&amp; renderer.element()) {
</span><span class="cx">             FloatSize viewportSize;
</span><del>-            SVGLengthContext(toSVGElement(renderer.element())).determineViewport(viewportSize);
</del><ins>+            SVGLengthContext(downcast&lt;SVGElement&gt;(renderer.element())).determineViewport(viewportSize);
</ins><span class="cx">             referenceBox.setWidth(viewportSize.width());
</span><span class="cx">             referenceBox.setHeight(viewportSize.height());
</span><span class="cx">         } else
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGResourcescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGResources.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGResources.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/SVGResources.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -142,11 +142,11 @@
</span><span class="cx"> {
</span><span class="cx">     String target;
</span><span class="cx">     if (isSVGPatternElement(element))
</span><del>-        target = toSVGPatternElement(element).href();
</del><ins>+        target = downcast&lt;SVGPatternElement&gt;(element).href();
</ins><span class="cx">     else if (isSVGGradientElement(element))
</span><del>-        target = toSVGGradientElement(element).href();
</del><ins>+        target = downcast&lt;SVGGradientElement&gt;(element).href();
</ins><span class="cx">     else if (isSVGFilterElement(element))
</span><del>-        target = toSVGFilterElement(element).href();
</del><ins>+        target = downcast&lt;SVGFilterElement&gt;(element).href();
</ins><span class="cx">     else
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx"> 
</span><span class="lines">@@ -185,7 +185,7 @@
</span><span class="cx">     if (!renderer.element())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    auto&amp; element = toSVGElement(*renderer.element());
</del><ins>+    auto&amp; element = downcast&lt;SVGElement&gt;(*renderer.element());
</ins><span class="cx"> 
</span><span class="cx">     Document&amp; document = element.document();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGTextLayoutEnginecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -423,10 +423,11 @@
</span><span class="cx">     if (m_inPathLayout &amp;&amp; m_textPath.isEmpty())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    SVGElement* lengthContext = toSVGElement(text-&gt;parent()-&gt;element());
</del><ins>+    RenderElement* textParent = text-&gt;parent();
+    ASSERT(textParent);
+    SVGElement* lengthContext = downcast&lt;SVGElement&gt;(textParent-&gt;element());
</ins><span class="cx">     
</span><del>-    RenderObject* textParent = text-&gt;parent();
-    bool definesTextLength = textParent ? parentDefinesTextLength(textParent) : false;
</del><ins>+    bool definesTextLength = parentDefinesTextLength(textParent);
</ins><span class="cx"> 
</span><span class="cx">     const SVGRenderStyle&amp; svgStyle = style-&gt;svgStyle();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGAElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -140,7 +140,7 @@
</span><span class="cx"> 
</span><span class="cx"> RenderPtr&lt;RenderElement&gt; SVGAElement::createElementRenderer(PassRef&lt;RenderStyle&gt; style)
</span><span class="cx"> {
</span><del>-    if (parentNode() &amp;&amp; parentNode()-&gt;isSVGElement() &amp;&amp; toSVGElement(parentNode())-&gt;isTextContent())
</del><ins>+    if (parentNode() &amp;&amp; parentNode()-&gt;isSVGElement() &amp;&amp; downcast&lt;SVGElement&gt;(*parentNode()).isTextContent())
</ins><span class="cx">         return createRenderer&lt;RenderSVGInline&gt;(*this, WTF::move(style));
</span><span class="cx"> 
</span><span class="cx">     return createRenderer&lt;RenderSVGTransformableContainer&gt;(*this, WTF::move(style));
</span><span class="lines">@@ -161,7 +161,7 @@
</span><span class="cx">             if (url[0] == '#') {
</span><span class="cx">                 Element* targetElement = treeScope().getElementById(url.substringSharingImpl(1));
</span><span class="cx">                 if (targetElement &amp;&amp; isSVGSMILElement(*targetElement)) {
</span><del>-                    toSVGSMILElement(*targetElement).beginByLinkActivation();
</del><ins>+                    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="trunkSourceWebCoresvgSVGAltGlyphDefElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAltGlyphDefElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAltGlyphDefElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGAltGlyphDefElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx">             fountFirstGlyphRef = true;
</span><span class="cx">             String referredGlyphName;
</span><span class="cx"> 
</span><del>-            if (toSVGGlyphRefElement(child).hasValidGlyphElement(referredGlyphName))
</del><ins>+            if (downcast&lt;SVGGlyphRefElement&gt;(child).hasValidGlyphElement(referredGlyphName))
</ins><span class="cx">                 glyphNames.append(referredGlyphName);
</span><span class="cx">             else {
</span><span class="cx">                 // As the spec says &quot;If any of the referenced glyphs are unavailable,
</span><span class="lines">@@ -109,7 +109,7 @@
</span><span class="cx"> 
</span><span class="cx">             // As the spec says &quot;The first 'altGlyphItem' in which all referenced glyphs
</span><span class="cx">             // are available is chosen.&quot;
</span><del>-            if (toSVGAltGlyphItemElement(child).hasValidGlyphElements(glyphNames) &amp;&amp; !glyphNames.isEmpty())
</del><ins>+            if (downcast&lt;SVGAltGlyphItemElement&gt;(child).hasValidGlyphElements(glyphNames) &amp;&amp; !glyphNames.isEmpty())
</ins><span class="cx">                 return true;
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAltGlyphElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAltGlyphElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAltGlyphElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGAltGlyphElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (isSVGAltGlyphDefElement(element)
</span><del>-        &amp;&amp; toSVGAltGlyphDefElement(element)-&gt;hasValidGlyphElements(glyphNames))
</del><ins>+        &amp;&amp; downcast&lt;SVGAltGlyphDefElement&gt;(*element).hasValidGlyphElements(glyphNames))
</ins><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="cx">     return false;
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimateElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimateElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimateElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGAnimateElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -110,9 +110,9 @@
</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* resultAnimationElement = toSVGAnimateElement(resultElement);
-    ASSERT(resultAnimationElement-&gt;m_animatedType);
-    ASSERT(resultAnimationElement-&gt;m_animatedPropertyType == m_animatedPropertyType);
</del><ins>+    SVGAnimateElement&amp; resultAnimationElement = downcast&lt;SVGAnimateElement&gt;(*resultElement);
+    ASSERT(resultAnimationElement.m_animatedType);
+    ASSERT(resultAnimationElement.m_animatedPropertyType == m_animatedPropertyType);
</ins><span class="cx"> 
</span><span class="cx">     if (hasTagName(SVGNames::setTag))
</span><span class="cx">         percentage = 1;
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Values-animation accumulates using the last values entry corresponding to the end of duration time.
</span><span class="cx">     SVGAnimatedType* toAtEndOfDurationType = m_toAtEndOfDurationType ? m_toAtEndOfDurationType.get() : m_toType.get();
</span><del>-    m_animator-&gt;calculateAnimatedValue(percentage, repeatCount, m_fromType.get(), m_toType.get(), toAtEndOfDurationType, resultAnimationElement-&gt;m_animatedType.get());
</del><ins>+    m_animator-&gt;calculateAnimatedValue(percentage, repeatCount, m_fromType.get(), m_toType.get(), toAtEndOfDurationType, resultAnimationElement.m_animatedType.get());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool SVGAnimateElement::calculateToAtEndOfDurationValue(const String&amp; toAtEndOfDurationString)
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimatedTransformListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimatedTransformList.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimatedTransformList.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGAnimatedTransformList.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> 
</span><span class="cx"> SVGAnimatedTransformListAnimator::SVGAnimatedTransformListAnimator(SVGAnimationElement* animationElement, SVGElement* contextElement)
</span><span class="cx">     : SVGAnimatedTypeAnimator(AnimatedTransformList, animationElement, contextElement)
</span><del>-    , m_transformTypeString(SVGTransform::transformTypePrefixForParsing(toSVGAnimateTransformElement(animationElement)-&gt;transformType()))
</del><ins>+    , m_transformTypeString(SVGTransform::transformTypePrefixForParsing(downcast&lt;SVGAnimateTransformElement&gt;(animationElement)-&gt;transformType()))
</ins><span class="cx"> {
</span><span class="cx">     // Only &lt;animateTransform&gt; uses this animator, as &lt;animate&gt; doesn't allow to animate transform lists directly.
</span><span class="cx">     ASSERT(animationElement-&gt;hasTagName(SVGNames::animateTransformTag));
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimationElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimationElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimationElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGAnimationElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</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)-&gt;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 class="lines">@@ -663,8 +663,8 @@
</span><span class="cx">     if (!parent || !parent-&gt;isSVGElement())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    SVGElement* svgParent = toSVGElement(parent);
-    computeCSSPropertyValue(svgParent, cssPropertyID(attributeName.localName()), value);
</del><ins>+    SVGElement&amp; svgParent = downcast&lt;SVGElement&gt;(*parent);
+    computeCSSPropertyValue(&amp;svgParent, cssPropertyID(attributeName.localName()), value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static bool inheritsFromProperty(SVGElement*, const QualifiedName&amp; attributeName, const String&amp; value)
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGDocument.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGDocument.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGDocument.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -41,11 +41,11 @@
</span><span class="cx"> 
</span><span class="cx"> SVGSVGElement* SVGDocument::rootElement() const
</span><span class="cx"> {
</span><del>-    Element* elem = documentElement();
-    if (elem &amp;&amp; elem-&gt;hasTagName(SVGNames::svgTag))
-        return toSVGSVGElement(elem);
</del><ins>+    Element* element = documentElement();
+    if (element &amp;&amp; isSVGSVGElement(element))
+        return downcast&lt;SVGSVGElement&gt;(element);
</ins><span class="cx"> 
</span><del>-    return 0;
</del><ins>+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool SVGDocument::zoomAndPanEnabled() const
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -394,30 +394,30 @@
</span><span class="cx"> 
</span><span class="cx"> SVGSVGElement* SVGElement::ownerSVGElement() const
</span><span class="cx"> {
</span><del>-    ContainerNode* n = parentOrShadowHostNode();
-    while (n) {
-        if (n-&gt;hasTagName(SVGNames::svgTag))
-            return toSVGSVGElement(n);
</del><ins>+    ContainerNode* node = parentOrShadowHostNode();
+    while (node) {
+        if (isSVGSVGElement(node))
+            return downcast&lt;SVGSVGElement&gt;(node);
</ins><span class="cx"> 
</span><del>-        n = n-&gt;parentOrShadowHostNode();
</del><ins>+        node = node-&gt;parentOrShadowHostNode();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return 0;
</del><ins>+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> SVGElement* SVGElement::viewportElement() const
</span><span class="cx"> {
</span><span class="cx">     // This function needs shadow tree support - as RenderSVGContainer uses this function
</span><span class="cx">     // to determine the &quot;overflow&quot; property. &lt;use&gt; on &lt;symbol&gt; wouldn't work otherwhise.
</span><del>-    ContainerNode* n = parentOrShadowHostNode();
-    while (n) {
-        if (n-&gt;hasTagName(SVGNames::svgTag) || isSVGImageElement(n) || n-&gt;hasTagName(SVGNames::symbolTag))
-            return toSVGElement(n);
</del><ins>+    ContainerNode* node = parentOrShadowHostNode();
+    while (node) {
+        if (isSVGSVGElement(node) || isSVGImageElement(node) || node-&gt;hasTagName(SVGNames::symbolTag))
+            return downcast&lt;SVGElement&gt;(node);
</ins><span class="cx"> 
</span><del>-        n = n-&gt;parentOrShadowHostNode();
</del><ins>+        node = node-&gt;parentOrShadowHostNode();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return 0;
</del><ins>+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> SVGDocumentExtensions* SVGElement::accessDocumentSVGExtensions()
</span><span class="lines">@@ -460,7 +460,7 @@
</span><span class="cx"> bool SVGElement::getBoundingBox(FloatRect&amp; rect, SVGLocatable::StyleUpdateStrategy styleUpdateStrategy)
</span><span class="cx"> {
</span><span class="cx">     if (isSVGGraphicsElement()) {
</span><del>-        rect = toSVGGraphicsElement(this)-&gt;getBBox(styleUpdateStrategy);
</del><ins>+        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 class="lines">@@ -730,7 +730,7 @@
</span><span class="cx">         invalidTextContent.get().add(SVGNames::tspanTag);
</span><span class="cx">     }
</span><span class="cx">     if (child.isSVGElement()) {
</span><del>-        const SVGElement&amp; svgChild = toSVGElement(child);
</del><ins>+        const SVGElement&amp; svgChild = downcast&lt;SVGElement&gt;(child);
</ins><span class="cx">         if (invalidTextContent.get().contains(svgChild.tagQName()))
</span><span class="cx">             return false;
</span><span class="cx"> 
</span><span class="lines">@@ -970,10 +970,10 @@
</span><span class="cx">         // that do enable SVG in a shadow tree.
</span><span class="cx">         ASSERT(!shadowHostElement || shadowHostElement-&gt;hasTagName(SVGNames::useTag));
</span><span class="cx">         if (shadowHostElement &amp;&amp; shadowHostElement-&gt;hasTagName(SVGNames::useTag)) {
</span><del>-            SVGUseElement* useElement = toSVGUseElement(shadowHostElement);
</del><ins>+            SVGUseElement&amp; useElement = downcast&lt;SVGUseElement&gt;(*shadowHostElement);
</ins><span class="cx"> 
</span><span class="cx">             // If the &lt;use&gt; title is not empty we found the title to use.
</span><del>-            String useTitle(useElement-&gt;title());
</del><ins>+            String useTitle(useElement.title());
</ins><span class="cx">             if (!useTitle.isEmpty())
</span><span class="cx">                 return useTitle;
</span><span class="cx">         }
</span><span class="lines">@@ -1173,7 +1173,7 @@
</span><span class="cx">             break;
</span><span class="cx"> 
</span><span class="cx">         // Register us in the parent element map.
</span><del>-        toSVGElement(node)-&gt;updateRelativeLengthsInformation(hasRelativeLengths, this);
</del><ins>+        downcast&lt;SVGElement&gt;(*node).updateRelativeLengthsInformation(hasRelativeLengths, this);
</ins><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGElement.h (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGElement.h        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGElement.h        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -235,7 +235,7 @@
</span><span class="cx"> 
</span><span class="cx"> inline bool Node::hasTagName(const SVGQualifiedName&amp; name) const
</span><span class="cx"> {
</span><del>-    return isSVGElement() &amp;&amp; toSVGElement(*this).hasTagName(name);
</del><ins>+    return isSVGElement() &amp;&amp; downcast&lt;SVGElement&gt;(*this).hasTagName(name);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFEComponentTransferElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFEComponentTransferElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFEComponentTransferElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGFEComponentTransferElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -91,13 +91,13 @@
</span><span class="cx"> 
</span><span class="cx">     for (auto&amp; child : childrenOfType&lt;SVGElement&gt;(*this)) {
</span><span class="cx">         if (isSVGFEFuncRElement(child))
</span><del>-            red = toSVGFEFuncRElement(child).transferFunction();
</del><ins>+            red = downcast&lt;SVGFEFuncRElement&gt;(child).transferFunction();
</ins><span class="cx">         else if (isSVGFEFuncGElement(child))
</span><del>-            green = toSVGFEFuncGElement(child).transferFunction();
</del><ins>+            green = downcast&lt;SVGFEFuncGElement&gt;(child).transferFunction();
</ins><span class="cx">         else if (isSVGFEFuncBElement(child))
</span><del>-            blue = toSVGFEFuncBElement(child).transferFunction();
</del><ins>+            blue = downcast&lt;SVGFEFuncBElement&gt;(child).transferFunction();
</ins><span class="cx">         else if (isSVGFEFuncAElement(child))
</span><del>-            alpha = toSVGFEFuncAElement(child).transferFunction();
</del><ins>+            alpha = downcast&lt;SVGFEFuncAElement&gt;(child).transferFunction();
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     RefPtr&lt;FilterEffect&gt; effect = FEComponentTransfer::create(filter, red, green, blue, alpha);
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFEImageElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFEImageElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFEImageElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGFEImageElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -106,7 +106,7 @@
</span><span class="cx">     } else if (target-&gt;isSVGElement()) {
</span><span class="cx">         // Register us with the target in the dependencies map. Any change of hrefElement
</span><span class="cx">         // that leads to relayout/repainting now informs us, so we can react to it.
</span><del>-        document().accessSVGExtensions()-&gt;addElementReferencingTarget(this, toSVGElement(target));
</del><ins>+        document().accessSVGExtensions()-&gt;addElementReferencingTarget(this, downcast&lt;SVGElement&gt;(target));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     invalidate();
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFilterElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFilterElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFilterElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGFilterElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -200,7 +200,7 @@
</span><span class="cx">     if (!child.isSVGElement())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    const SVGElement&amp; svgElement = toSVGElement(child);
</del><ins>+    const SVGElement&amp; svgElement = downcast&lt;SVGElement&gt;(child);
</ins><span class="cx"> 
</span><span class="cx">     static NeverDestroyed&lt;HashSet&lt;QualifiedName&gt;&gt; allowedChildElementTags;
</span><span class="cx">     if (allowedChildElementTags.get().isEmpty()) {
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFilterPrimitiveStandardAttributesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx"> 
</span><span class="cx"> void isSVGFilterPrimitiveStandardAttributes(const SVGFilterPrimitiveStandardAttributes&amp;); // Catch unnecessary runtime check of type known at compile time.
</span><span class="cx"> inline bool isSVGFilterPrimitiveStandardAttributes(const SVGElement&amp; element) { return element.isFilterEffect(); }
</span><del>-inline bool isSVGFilterPrimitiveStandardAttributes(const Node&amp; node) { return node.isSVGElement() &amp;&amp; toSVGElement(node).isFilterEffect(); }
</del><ins>+inline bool isSVGFilterPrimitiveStandardAttributes(const Node&amp; node) { return node.isSVGElement() &amp;&amp; downcast&lt;SVGElement&gt;(node).isFilterEffect(); }
</ins><span class="cx"> 
</span><span class="cx"> template &lt;typename ArgType&gt;
</span><span class="cx"> struct ElementTypeCastTraits&lt;const SVGFilterPrimitiveStandardAttributes, ArgType&gt; {
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontData.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontData.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGFontData.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -160,8 +160,8 @@
</span><span class="cx">             language = parentRendererElement-&gt;getAttribute(XMLNames::langAttr);
</span><span class="cx"> 
</span><span class="cx">             if (isSVGAltGlyphElement(parentRendererElement)) {
</span><del>-                SVGAltGlyphElement* altGlyph = toSVGAltGlyphElement(parentRendererElement);
-                if (!altGlyph-&gt;hasValidGlyphElements(altGlyphNames))
</del><ins>+                SVGAltGlyphElement&amp; altGlyph = downcast&lt;SVGAltGlyphElement&gt;(*parentRendererElement);
+                if (!altGlyph.hasValidGlyphElements(altGlyphNames))
</ins><span class="cx">                     altGlyphNames.clear();
</span><span class="cx">             }
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGFontElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx">     Vector&lt;String&gt; ligatures;
</span><span class="cx">     for (auto&amp; child : childrenOfType&lt;SVGElement&gt;(*this)) {
</span><span class="cx">         if (isSVGGlyphElement(child)) {
</span><del>-            SVGGlyphElement&amp; glyph = toSVGGlyphElement(child);
</del><ins>+            SVGGlyphElement&amp; glyph = downcast&lt;SVGGlyphElement&gt;(child);
</ins><span class="cx">             AtomicString unicode = glyph.fastGetAttribute(SVGNames::unicodeAttr);
</span><span class="cx">             AtomicString glyphId = glyph.getIdAttribute();
</span><span class="cx">             if (glyphId.isEmpty() &amp;&amp; unicode.isEmpty())
</span><span class="lines">@@ -132,17 +132,17 @@
</span><span class="cx">             if (unicode.length() &gt; 1 &amp;&amp; !U16_IS_SURROGATE(unicode[0]))
</span><span class="cx">                 ligatures.append(unicode.string());
</span><span class="cx">         } else if (isSVGHKernElement(child)) {
</span><del>-            SVGHKernElement&amp; hkern = toSVGHKernElement(child);
</del><ins>+            SVGHKernElement&amp; hkern = downcast&lt;SVGHKernElement&gt;(child);
</ins><span class="cx">             SVGKerningPair kerningPair;
</span><span class="cx">             if (hkern.buildHorizontalKerningPair(kerningPair))
</span><span class="cx">                 m_horizontalKerningMap.insert(kerningPair);
</span><span class="cx">         } else if (isSVGVKernElement(child)) {
</span><del>-            SVGVKernElement&amp; vkern = toSVGVKernElement(child);
</del><ins>+            SVGVKernElement&amp; vkern = downcast&lt;SVGVKernElement&gt;(child);
</ins><span class="cx">             SVGKerningPair kerningPair;
</span><span class="cx">             if (vkern.buildVerticalKerningPair(kerningPair))
</span><span class="cx">                 m_verticalKerningMap.insert(kerningPair);
</span><span class="cx">         } else if (isSVGMissingGlyphElement(child) &amp;&amp; !firstMissingGlyphElement)
</span><del>-            firstMissingGlyphElement = &amp;toSVGMissingGlyphElement(child);
</del><ins>+            firstMissingGlyphElement = &amp;downcast&lt;SVGMissingGlyphElement&gt;(child);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Register each character of each ligature, if needed.
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontFaceElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontFaceElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontFaceElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGFontFaceElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -234,12 +234,12 @@
</span><span class="cx">     RefPtr&lt;CSSValueList&gt; list;
</span><span class="cx"> 
</span><span class="cx">     if (describesParentFont) {
</span><del>-        m_fontElement = toSVGFontElement(parentNode());
</del><ins>+        m_fontElement = downcast&lt;SVGFontElement&gt;(parentNode());
</ins><span class="cx"> 
</span><span class="cx">         list = CSSValueList::createCommaSeparated();
</span><span class="cx">         list-&gt;append(CSSFontFaceSrcValue::createLocal(fontFamily()));
</span><span class="cx">     } else {
</span><del>-        m_fontElement = 0;
</del><ins>+        m_fontElement = nullptr;
</ins><span class="cx">         if (srcElement)
</span><span class="cx">             list = srcElement-&gt;srcValue();
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontFaceFormatElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontFaceFormatElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontFaceFormatElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGFontFaceFormatElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">     
</span><span class="cx">     ancestor = ancestor-&gt;parentNode();
</span><span class="cx">     if (ancestor &amp;&amp; ancestor-&gt;hasTagName(font_faceTag))
</span><del>-        toSVGFontFaceElement(ancestor)-&gt;rebuildFontFace();
</del><ins>+        downcast&lt;SVGFontFaceElement&gt;(*ancestor).rebuildFontFace();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontFaceSrcElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontFaceSrcElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontFaceSrcElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGFontFaceSrcElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -51,9 +51,9 @@
</span><span class="cx">     for (auto&amp; child : childrenOfType&lt;SVGElement&gt;(*this)) {
</span><span class="cx">         RefPtr&lt;CSSFontFaceSrcValue&gt; srcValue;
</span><span class="cx">         if (isSVGFontFaceUriElement(child))
</span><del>-            srcValue = toSVGFontFaceUriElement(child).srcValue();
</del><ins>+            srcValue = downcast&lt;SVGFontFaceUriElement&gt;(child).srcValue();
</ins><span class="cx">         else if (isSVGFontFaceNameElement(child))
</span><del>-            srcValue = toSVGFontFaceNameElement(child).srcValue();
</del><ins>+            srcValue = downcast&lt;SVGFontFaceNameElement&gt;(child).srcValue();
</ins><span class="cx">         if (srcValue &amp;&amp; srcValue-&gt;resource().length())
</span><span class="cx">             list-&gt;append(srcValue.releaseNonNull());
</span><span class="cx">     }
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> {
</span><span class="cx">     SVGElement::childrenChanged(change);
</span><span class="cx">     if (parentNode() &amp;&amp; isSVGFontFaceElement(parentNode()))
</span><del>-        toSVGFontFaceElement(parentNode())-&gt;rebuildFontFace();
</del><ins>+        downcast&lt;SVGFontFaceElement&gt;(*parentNode()).rebuildFontFace();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFontFaceUriElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFontFaceUriElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFontFaceUriElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGFontFaceUriElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx">     
</span><span class="cx">     ContainerNode* grandparent = parentNode()-&gt;parentNode();
</span><span class="cx">     if (grandparent &amp;&amp; grandparent-&gt;hasTagName(font_faceTag))
</span><del>-        toSVGFontFaceElement(grandparent)-&gt;rebuildFontFace();
</del><ins>+        downcast&lt;SVGFontFaceElement&gt;(*grandparent).rebuildFontFace();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Node::InsertionNotificationRequest SVGFontFaceUriElement::insertedInto(ContainerNode&amp; rootParent)
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGGlyphElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGGlyphElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGGlyphElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGGlyphElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> {
</span><span class="cx">     ContainerNode* fontNode = parentNode();
</span><span class="cx">     if (fontNode &amp;&amp; isSVGFontElement(fontNode))
</span><del>-        toSVGFontElement(fontNode)-&gt;invalidateGlyphCache();
</del><ins>+        downcast&lt;SVGFontElement&gt;(*fontNode).invalidateGlyphCache();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SVGGlyphElement::parseAttribute(const QualifiedName&amp; name, const AtomicString&amp; value)
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGGraphicsElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGGraphicsElement.h (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGGraphicsElement.h        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGGraphicsElement.h        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx"> 
</span><span class="cx"> void isSVGGraphicsElement(const SVGGraphicsElement&amp;); // Catch unnecessary runtime check of type known at compile time.
</span><span class="cx"> inline bool isSVGGraphicsElement(const SVGElement&amp; element) { return element.isSVGGraphicsElement(); }
</span><del>-inline bool isSVGGraphicsElement(const Node&amp; node) { return node.isSVGElement() &amp;&amp; toSVGElement(node).isSVGGraphicsElement(); }
</del><ins>+inline bool isSVGGraphicsElement(const Node&amp; node) { return node.isSVGElement() &amp;&amp; downcast&lt;SVGElement&gt;(node).isSVGGraphicsElement(); }
</ins><span class="cx"> NODE_TYPE_CASTS(SVGGraphicsElement)
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGHKernElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGHKernElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGHKernElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGHKernElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> {
</span><span class="cx">     ContainerNode* fontNode = parentNode();
</span><span class="cx">     if (fontNode &amp;&amp; isSVGFontElement(fontNode))
</span><del>-        toSVGFontElement(fontNode)-&gt;invalidateGlyphCache();
</del><ins>+        downcast&lt;SVGFontElement&gt;(*fontNode).invalidateGlyphCache();
</ins><span class="cx"> 
</span><span class="cx">     return SVGElement::insertedInto(rootParent);
</span><span class="cx"> }
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx"> {
</span><span class="cx">     ContainerNode* fontNode = parentNode();
</span><span class="cx">     if (fontNode &amp;&amp; isSVGFontElement(fontNode))
</span><del>-        toSVGFontElement(fontNode)-&gt;invalidateGlyphCache();
</del><ins>+        downcast&lt;SVGFontElement&gt;(*fontNode).invalidateGlyphCache();
</ins><span class="cx"> 
</span><span class="cx">     SVGElement::removedFrom(rootParent);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGImageLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGImageLoader.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGImageLoader.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGImageLoader.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -43,8 +43,8 @@
</span><span class="cx">     if (image()-&gt;errorOccurred())
</span><span class="cx">         element().dispatchEvent(Event::create(eventNames().errorEvent, false, false));
</span><span class="cx">     else {
</span><del>-        if (toSVGImageElement(element()).externalResourcesRequiredBaseValue())
-            toSVGImageElement(ImageLoader::element()).sendSVGLoadEventIfPossible(true);
</del><ins>+        if (downcast&lt;SVGImageElement&gt;(element()).externalResourcesRequiredBaseValue())
+            downcast&lt;SVGImageElement&gt;(ImageLoader::element()).sendSVGLoadEventIfPossible(true);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGLengthContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGLengthContext.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGLengthContext.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGLengthContext.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -312,7 +312,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Root &lt;svg&gt; element lengths are resolved against the top level viewport.
</span><span class="cx">     if (m_context-&gt;isOutermostSVGSVGElement()) {
</span><del>-        viewportSize = toSVGSVGElement(m_context)-&gt;currentViewportSize();
</del><ins>+        viewportSize = downcast&lt;SVGSVGElement&gt;(*m_context).currentViewportSize();
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -321,10 +321,10 @@
</span><span class="cx">     if (!viewportElement || !isSVGSVGElement(viewportElement))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    const SVGSVGElement* svg = toSVGSVGElement(viewportElement);
-    viewportSize = svg-&gt;currentViewBoxRect().size();
</del><ins>+    const SVGSVGElement&amp; svg = downcast&lt;SVGSVGElement&gt;(*viewportElement);
+    viewportSize = svg.currentViewBoxRect().size();
</ins><span class="cx">     if (viewportSize.isEmpty())
</span><del>-        viewportSize = svg-&gt;currentViewportSize();
</del><ins>+        viewportSize = svg.currentViewportSize();
</ins><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGLinearGradientElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGLinearGradientElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGLinearGradientElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGLinearGradientElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -143,19 +143,19 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (isLinear) {
</span><del>-        SVGLinearGradientElement* linear = toSVGLinearGradientElement(&amp;element);
</del><ins>+        SVGLinearGradientElement&amp; linear = downcast&lt;SVGLinearGradientElement&gt;(element);
</ins><span class="cx"> 
</span><span class="cx">         if (!attributes.hasX1() &amp;&amp; element.hasAttribute(SVGNames::x1Attr))
</span><del>-            attributes.setX1(linear-&gt;x1());
</del><ins>+            attributes.setX1(linear.x1());
</ins><span class="cx"> 
</span><span class="cx">         if (!attributes.hasY1() &amp;&amp; element.hasAttribute(SVGNames::y1Attr))
</span><del>-            attributes.setY1(linear-&gt;y1());
</del><ins>+            attributes.setY1(linear.y1());
</ins><span class="cx"> 
</span><span class="cx">         if (!attributes.hasX2() &amp;&amp; element.hasAttribute(SVGNames::x2Attr))
</span><del>-            attributes.setX2(linear-&gt;x2());
</del><ins>+            attributes.setX2(linear.x2());
</ins><span class="cx"> 
</span><span class="cx">         if (!attributes.hasY2() &amp;&amp; element.hasAttribute(SVGNames::y2Attr))
</span><del>-            attributes.setY2(linear-&gt;y2());
</del><ins>+            attributes.setY2(linear.y2());
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -174,7 +174,7 @@
</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><span class="cx">         if (refNode &amp;&amp; isSVGGradientElement(*refNode)) {
</span><del>-            current = toSVGGradientElement(refNode);
</del><ins>+            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 (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGLocatable.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGLocatable.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -44,19 +44,19 @@
</span><span class="cx">     ASSERT(element);
</span><span class="cx">     for (Element* current = element-&gt;parentOrShadowHostElement(); current; current = current-&gt;parentOrShadowHostElement()) {
</span><span class="cx">         if (isViewportElement(current))
</span><del>-            return toSVGElement(current);
</del><ins>+            return downcast&lt;SVGElement&gt;(current);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return 0;
</del><ins>+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> SVGElement* SVGLocatable::farthestViewportElement(const SVGElement* element)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(element);
</span><del>-    SVGElement* farthest = 0;
</del><ins>+    SVGElement* farthest = nullptr;
</ins><span class="cx">     for (Element* current = element-&gt;parentOrShadowHostElement(); current; current = current-&gt;parentOrShadowHostElement()) {
</span><span class="cx">         if (isViewportElement(current))
</span><del>-            farthest = toSVGElement(current);
</del><ins>+            farthest = downcast&lt;SVGElement&gt;(current);
</ins><span class="cx">     }
</span><span class="cx">     return farthest;
</span><span class="cx"> }
</span><span class="lines">@@ -82,12 +82,12 @@
</span><span class="cx"> 
</span><span class="cx">     AffineTransform ctm;
</span><span class="cx"> 
</span><del>-    SVGElement* stopAtElement = mode == NearestViewportScope ? nearestViewportElement(element) : 0;
</del><ins>+    SVGElement* stopAtElement = mode == NearestViewportScope ? nearestViewportElement(element) : nullptr;
</ins><span class="cx">     for (Element* currentElement = element; currentElement; currentElement = currentElement-&gt;parentOrShadowHostElement()) {
</span><span class="cx">         if (!currentElement-&gt;isSVGElement())
</span><span class="cx">             break;
</span><span class="cx"> 
</span><del>-        ctm = toSVGElement(currentElement)-&gt;localCoordinateSpaceTransform(mode).multiply(ctm);
</del><ins>+        ctm = downcast&lt;SVGElement&gt;(*currentElement).localCoordinateSpaceTransform(mode).multiply(ctm);
</ins><span class="cx"> 
</span><span class="cx">         // For getCTM() computation, stop at the nearest viewport element
</span><span class="cx">         if (currentElement == stopAtElement)
</span><span class="lines">@@ -102,7 +102,7 @@
</span><span class="cx">     AffineTransform ctm = getCTM(styleUpdateStrategy);
</span><span class="cx"> 
</span><span class="cx">     if (target &amp;&amp; target-&gt;isSVGGraphicsElement()) {
</span><del>-        AffineTransform targetCTM = toSVGGraphicsElement(target)-&gt;getCTM(styleUpdateStrategy);
</del><ins>+        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="trunkSourceWebCoresvgSVGMPathElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGMPathElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGMPathElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGMPathElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx">     } else if (target-&gt;isSVGElement()) {
</span><span class="cx">         // Register us with the target in the dependencies map. Any change of hrefElement
</span><span class="cx">         // that leads to relayout/repainting now informs us, so we can react to it.
</span><del>-        document().accessSVGExtensions()-&gt;addElementReferencingTarget(this, toSVGElement(target));
</del><ins>+        document().accessSVGExtensions()-&gt;addElementReferencingTarget(this, downcast&lt;SVGElement&gt;(target));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     targetPathChanged();
</span><span class="lines">@@ -156,9 +156,9 @@
</span><span class="cx"> SVGPathElement* SVGMPathElement::pathElement()
</span><span class="cx"> {
</span><span class="cx">     Element* target = targetElementFromIRIString(href(), document());
</span><del>-    if (target &amp;&amp; target-&gt;hasTagName(SVGNames::pathTag))
-        return toSVGPathElement(target);
-    return 0;
</del><ins>+    if (target &amp;&amp; isSVGPathElement(target))
+        return downcast&lt;SVGPathElement&gt;(target);
+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SVGMPathElement::targetPathChanged()
</span><span class="lines">@@ -169,7 +169,7 @@
</span><span class="cx"> void SVGMPathElement::notifyParentOfPathChange(ContainerNode* parent)
</span><span class="cx"> {
</span><span class="cx">     if (parent &amp;&amp; isSVGAnimateMotionElement(parent))
</span><del>-        toSVGAnimateMotionElement(parent)-&gt;updateAnimationPath();
</del><ins>+        downcast&lt;SVGAnimateMotionElement&gt;(*parent).updateAnimationPath();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGMarkerElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGMarkerElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGMarkerElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGMarkerElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -229,24 +229,24 @@
</span><span class="cx"> void SVGMarkerElement::synchronizeOrientType(SVGElement* contextElement)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(contextElement);
</span><del>-    SVGMarkerElement* ownerType = toSVGMarkerElement(contextElement);
-    if (!ownerType-&gt;m_orientType.shouldSynchronize)
</del><ins>+    SVGMarkerElement&amp; ownerType = downcast&lt;SVGMarkerElement&gt;(*contextElement);
+    if (!ownerType.m_orientType.shouldSynchronize)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // If orient is not auto, the previous call to synchronizeOrientAngle already set the orientAttr to the right angle.
</span><del>-    if (ownerType-&gt;m_orientType.value != SVGMarkerOrientAuto)
</del><ins>+    if (ownerType.m_orientType.value != SVGMarkerOrientAuto)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     DEPRECATED_DEFINE_STATIC_LOCAL(AtomicString, autoString, (&quot;auto&quot;, AtomicString::ConstructFromLiteral));
</span><del>-    ownerType-&gt;m_orientType.synchronize(ownerType, orientTypePropertyInfo()-&gt;attributeName, autoString);
</del><ins>+    ownerType.m_orientType.synchronize(&amp;ownerType, orientTypePropertyInfo()-&gt;attributeName, autoString);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;SVGAnimatedProperty&gt; SVGMarkerElement::lookupOrCreateOrientTypeWrapper(SVGElement* contextElement)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(contextElement);
</span><del>-    SVGMarkerElement* ownerType = toSVGMarkerElement(contextElement);
</del><ins>+    SVGMarkerElement&amp; ownerType = downcast&lt;SVGMarkerElement&gt;(*contextElement);
</ins><span class="cx">     return SVGAnimatedProperty::lookupOrCreateWrapper&lt;SVGMarkerElement, SVGAnimatedEnumerationPropertyTearOff&lt;SVGMarkerOrientType&gt;, SVGMarkerOrientType&gt;
</span><del>-           (ownerType, orientTypePropertyInfo(), ownerType-&gt;m_orientType.value);
</del><ins>+        (&amp;ownerType, orientTypePropertyInfo(), ownerType.m_orientType.value);
</ins><span class="cx"> }
</span><span class="cx">   
</span><span class="cx"> PassRefPtr&lt;SVGAnimatedEnumerationPropertyTearOff&lt;SVGMarkerOrientType&gt;&gt; SVGMarkerElement::orientTypeAnimated()
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGPathElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGPathElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGPathElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGPathElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -286,8 +286,8 @@
</span><span class="cx">     // markForLayoutAndParentResourceInvalidation so we update any mpath dependencies manually.
</span><span class="cx">     if (HashSet&lt;SVGElement*&gt;* dependencies = document().accessSVGExtensions()-&gt;setOfElementsReferencingTarget(this)) {
</span><span class="cx">         for (auto* element : *dependencies) {
</span><del>-            if (element-&gt;hasTagName(SVGNames::mpathTag))
-                toSVGMPathElement(element)-&gt;targetPathChanged();
</del><ins>+            if (isSVGMPathElement(element))
+                downcast&lt;SVGMPathElement&gt;(*element).targetPathChanged();
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -316,25 +316,25 @@
</span><span class="cx"> PassRefPtr&lt;SVGAnimatedProperty&gt; SVGPathElement::lookupOrCreateDWrapper(SVGElement* contextElement)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(contextElement);
</span><del>-    SVGPathElement* ownerType = toSVGPathElement(contextElement);
</del><ins>+    SVGPathElement&amp; ownerType = downcast&lt;SVGPathElement&gt;(*contextElement);
</ins><span class="cx"> 
</span><del>-    if (SVGAnimatedProperty* property = SVGAnimatedProperty::lookupWrapper&lt;SVGPathElement, SVGAnimatedPathSegListPropertyTearOff&gt;(ownerType, dPropertyInfo()))
</del><ins>+    if (SVGAnimatedProperty* property = SVGAnimatedProperty::lookupWrapper&lt;SVGPathElement, SVGAnimatedPathSegListPropertyTearOff&gt;(&amp;ownerType, dPropertyInfo()))
</ins><span class="cx">         return property;
</span><span class="cx"> 
</span><span class="cx">     // Build initial SVGPathSegList.
</span><del>-    buildSVGPathSegListFromByteStream(ownerType-&gt;m_pathByteStream.get(), ownerType, ownerType-&gt;m_pathSegList.value, UnalteredParsing);
</del><ins>+    buildSVGPathSegListFromByteStream(ownerType.m_pathByteStream.get(), &amp;ownerType, ownerType.m_pathSegList.value, UnalteredParsing);
</ins><span class="cx"> 
</span><span class="cx">     return SVGAnimatedProperty::lookupOrCreateWrapper&lt;SVGPathElement, SVGAnimatedPathSegListPropertyTearOff, SVGPathSegList&gt;
</span><del>-           (ownerType, dPropertyInfo(), ownerType-&gt;m_pathSegList.value);
</del><ins>+        (&amp;ownerType, dPropertyInfo(), ownerType.m_pathSegList.value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SVGPathElement::synchronizeD(SVGElement* contextElement)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(contextElement);
</span><del>-    SVGPathElement* ownerType = toSVGPathElement(contextElement);
-    if (!ownerType-&gt;m_pathSegList.shouldSynchronize)
</del><ins>+    SVGPathElement&amp; ownerType = downcast&lt;SVGPathElement&gt;(*contextElement);
+    if (!ownerType.m_pathSegList.shouldSynchronize)
</ins><span class="cx">         return;
</span><del>-    ownerType-&gt;m_pathSegList.synchronize(ownerType, dPropertyInfo()-&gt;attributeName, ownerType-&gt;m_pathSegList.value.valueAsString());
</del><ins>+    ownerType.m_pathSegList.synchronize(&amp;ownerType, dPropertyInfo()-&gt;attributeName, ownerType.m_pathSegList.value.valueAsString());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> SVGPathSegListPropertyTearOff* SVGPathElement::pathSegList()
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGPathSegListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGPathSegList.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGPathSegList.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGPathSegList.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> void SVGPathSegList::commitChange(SVGElement* contextElement, ListModification listModification)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(contextElement);
</span><del>-    toSVGPathElement(contextElement)-&gt;pathSegListChanged(m_role, listModification);
</del><ins>+    downcast&lt;SVGPathElement&gt;(contextElement)-&gt;pathSegListChanged(m_role, listModification);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGPatternElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGPatternElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGPatternElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGPatternElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -237,7 +237,7 @@
</span><span class="cx">         // Respect xlink:href, take attributes from referenced element
</span><span class="cx">         Element* refElement = SVGURIReference::targetElementFromIRIString(current-&gt;href(), document());
</span><span class="cx">         if (refElement &amp;&amp; isSVGPatternElement(refElement)) {
</span><del>-            current = toSVGPatternElement(refElement);
</del><ins>+            current = downcast&lt;SVGPatternElement&gt;(refElement);
</ins><span class="cx"> 
</span><span class="cx">             // Cycle detection
</span><span class="cx">             if (processedPatterns.contains(current))
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGPolyElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGPolyElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGPolyElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGPolyElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -132,18 +132,18 @@
</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);
-    if (!ownerType-&gt;m_points.shouldSynchronize)
</del><ins>+    SVGPolyElement&amp; ownerType = downcast&lt;SVGPolyElement&gt;(*contextElement);
+    if (!ownerType.m_points.shouldSynchronize)
</ins><span class="cx">         return;
</span><del>-    ownerType-&gt;m_points.synchronize(ownerType, pointsPropertyInfo()-&gt;attributeName, ownerType-&gt;m_points.value.valueAsString());
</del><ins>+    ownerType.m_points.synchronize(&amp;ownerType, pointsPropertyInfo()-&gt;attributeName, ownerType.m_points.value.valueAsString());
</ins><span class="cx"> }
</span><span class="cx"> 
</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* 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><del>-           (ownerType, pointsPropertyInfo(), ownerType-&gt;m_points.value);
</del><ins>+        (&amp;ownerType, pointsPropertyInfo(), ownerType.m_points.value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> SVGListPropertyTearOff&lt;SVGPointList&gt;* SVGPolyElement::points()
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGRadialGradientElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGRadialGradientElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGRadialGradientElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGRadialGradientElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -155,25 +155,25 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (isRadial) {
</span><del>-        SVGRadialGradientElement* radial = toSVGRadialGradientElement(&amp;element);
</del><ins>+        SVGRadialGradientElement&amp; radial = downcast&lt;SVGRadialGradientElement&gt;(element);
</ins><span class="cx"> 
</span><span class="cx">         if (!attributes.hasCx() &amp;&amp; element.hasAttribute(SVGNames::cxAttr))
</span><del>-            attributes.setCx(radial-&gt;cx());
</del><ins>+            attributes.setCx(radial.cx());
</ins><span class="cx"> 
</span><span class="cx">         if (!attributes.hasCy() &amp;&amp; element.hasAttribute(SVGNames::cyAttr))
</span><del>-            attributes.setCy(radial-&gt;cy());
</del><ins>+            attributes.setCy(radial.cy());
</ins><span class="cx"> 
</span><span class="cx">         if (!attributes.hasR() &amp;&amp; element.hasAttribute(SVGNames::rAttr))
</span><del>-            attributes.setR(radial-&gt;r());
</del><ins>+            attributes.setR(radial.r());
</ins><span class="cx"> 
</span><span class="cx">         if (!attributes.hasFx() &amp;&amp; element.hasAttribute(SVGNames::fxAttr))
</span><del>-            attributes.setFx(radial-&gt;fx());
</del><ins>+            attributes.setFx(radial.fx());
</ins><span class="cx"> 
</span><span class="cx">         if (!attributes.hasFy() &amp;&amp; element.hasAttribute(SVGNames::fyAttr))
</span><del>-            attributes.setFy(radial-&gt;fy());
</del><ins>+            attributes.setFy(radial.fy());
</ins><span class="cx"> 
</span><span class="cx">         if (!attributes.hasFr() &amp;&amp; element.hasAttribute(SVGNames::frAttr))
</span><del>-            attributes.setFr(radial-&gt;fr());
</del><ins>+            attributes.setFr(radial.fr());
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -192,7 +192,7 @@
</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><span class="cx">         if (refNode &amp;&amp; isSVGGradientElement(*refNode)) {
</span><del>-            current = toSVGGradientElement(refNode);
</del><ins>+            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="trunkSourceWebCoresvgSVGSVGElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGSVGElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGSVGElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGSVGElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -662,15 +662,14 @@
</span><span class="cx">     // Any view specification attributes included on the given ‘view’ element override the corresponding view specification
</span><span class="cx">     // attributes on the closest ancestor ‘svg’ element.
</span><span class="cx">     if (anchorNode &amp;&amp; isSVGViewElement(anchorNode)) {
</span><del>-        if (SVGViewElement* viewElement = toSVGViewElement(anchorNode)) {
-            SVGElement* element = SVGLocatable::nearestViewportElement(viewElement);
-            if (element-&gt;hasTagName(SVGNames::svgTag)) {
-                SVGSVGElement* svg = toSVGSVGElement(element);
-                svg-&gt;inheritViewAttributes(viewElement);
</del><ins>+        SVGViewElement&amp; viewElement = downcast&lt;SVGViewElement&gt;(*anchorNode);
+        SVGElement* element = SVGLocatable::nearestViewportElement(&amp;viewElement);
+        if (isSVGSVGElement(element)) {
+            SVGSVGElement&amp; svg = downcast&lt;SVGSVGElement&gt;(*element);
+            svg.inheritViewAttributes(&amp;viewElement);
</ins><span class="cx"> 
</span><del>-                if (RenderElement* renderer = svg-&gt;renderer())
-                    RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
-            }
</del><ins>+            if (RenderElement* renderer = svg.renderer())
+                RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
</ins><span class="cx">         }
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGTextContentElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGTextContentElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGTextContentElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGTextContentElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -75,19 +75,19 @@
</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);
-    if (!ownerType-&gt;m_textLength.shouldSynchronize)
</del><ins>+    SVGTextContentElement&amp; ownerType = downcast&lt;SVGTextContentElement&gt;(*contextElement);
+    if (!ownerType.m_textLength.shouldSynchronize)
</ins><span class="cx">         return;
</span><del>-    AtomicString value(SVGPropertyTraits&lt;SVGLength&gt;::toString(ownerType-&gt;m_specifiedTextLength));
-    ownerType-&gt;m_textLength.synchronize(ownerType, textLengthPropertyInfo()-&gt;attributeName, value);
</del><ins>+    AtomicString value(SVGPropertyTraits&lt;SVGLength&gt;::toString(ownerType.m_specifiedTextLength));
+    ownerType.m_textLength.synchronize(&amp;ownerType, textLengthPropertyInfo()-&gt;attributeName, value);
</ins><span class="cx"> }
</span><span class="cx"> 
</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* 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><del>-           (ownerType, textLengthPropertyInfo(), ownerType-&gt;m_textLength.value);
</del><ins>+        (&amp;ownerType, textLengthPropertyInfo(), ownerType.m_textLength.value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;SVGAnimatedLength&gt; SVGTextContentElement::textLengthAnimated()
</span><span class="lines">@@ -288,18 +288,18 @@
</span><span class="cx"> SVGTextContentElement* SVGTextContentElement::elementFromRenderer(RenderObject* renderer)
</span><span class="cx"> {
</span><span class="cx">     if (!renderer)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><span class="cx">     if (!renderer-&gt;isSVGText() &amp;&amp; !renderer-&gt;isSVGInline())
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><del>-    SVGElement* element = toSVGElement(renderer-&gt;node());
</del><ins>+    SVGElement* element = downcast&lt;SVGElement&gt;(renderer-&gt;node());
</ins><span class="cx">     ASSERT(element);
</span><span class="cx"> 
</span><span class="cx">     if (!element-&gt;isTextContent())
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><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 (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGTextContentElement.h        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGTextContentElement.h        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -121,7 +121,7 @@
</span><span class="cx"> 
</span><span class="cx"> void isSVGTextContentElement(const SVGTextContentElement&amp;); // Catch unnecessary runtime check of type known at compile time.
</span><span class="cx"> inline bool isSVGTextContentElement(const SVGElement&amp; element) { return element.isTextContent(); }
</span><del>-inline bool isSVGTextContentElement(const Node&amp; node) { return node.isSVGElement() &amp;&amp; toSVGElement(node).isTextContent(); }
</del><ins>+inline bool isSVGTextContentElement(const Node&amp; node) { return node.isSVGElement() &amp;&amp; downcast&lt;SVGElement&gt;(node).isTextContent(); }
</ins><span class="cx"> NODE_TYPE_CASTS(SVGTextContentElement)
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGTextPathElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGTextPathElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGTextPathElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGTextPathElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx">     } else if (target-&gt;hasTagName(SVGNames::pathTag)) {
</span><span class="cx">         // Register us with the target in the dependencies map. Any change of hrefElement
</span><span class="cx">         // that leads to relayout/repainting now informs us, so we can react to it.
</span><del>-        document().accessSVGExtensions()-&gt;addElementReferencingTarget(this, toSVGElement(target));
</del><ins>+        document().accessSVGExtensions()-&gt;addElementReferencingTarget(this, downcast&lt;SVGElement&gt;(target));
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGUseElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGUseElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGUseElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGUseElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -282,8 +282,8 @@
</span><span class="cx">     SVGElement* element = targetInstance-&gt;correspondingElement();
</span><span class="cx">     ASSERT(element);
</span><span class="cx"> 
</span><del>-    if (element-&gt;hasTagName(SVGNames::useTag)) {
-        if (toSVGUseElement(element)-&gt;cachedDocumentIsStillLoading())
</del><ins>+    if (isSVGUseElement(element)) {
+        if (downcast&lt;SVGUseElement&gt;(*element).cachedDocumentIsStillLoading())
</ins><span class="cx">             return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -417,7 +417,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (target-&gt;isSVGElement()) {
</span><del>-        buildShadowAndInstanceTree(toSVGElement(target));
</del><ins>+        buildShadowAndInstanceTree(downcast&lt;SVGElement&gt;(target));
</ins><span class="cx">         invalidateDependentShadowTrees();
</span><span class="cx">     }
</span><span class="cx"> 
</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* n = m_targetElementInstance ? m_targetElementInstance-&gt;shadowTreeElement() : 0;
-    if (!n)
</del><ins>+    Node* node = m_targetElementInstance ? m_targetElementInstance-&gt;shadowTreeElement() : nullptr;
+    if (!node)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (n-&gt;isSVGElement() &amp;&amp; toSVGElement(*n).isSVGGraphicsElement()) {
-        if (!isDirectReference(toSVGElement(*n))) {
</del><ins>+    if (node-&gt;isSVGElement() &amp;&amp; downcast&lt;SVGElement&gt;(*node).isSVGGraphicsElement()) {
+        if (!isDirectReference(downcast&lt;SVGElement&gt;(*node))) {
</ins><span class="cx">             // Spec: Indirect references are an error (14.3.5)
</span><span class="cx">             document().accessSVGExtensions()-&gt;reportError(&quot;Not allowed to use indirect reference in &lt;clip-path&gt;&quot;);
</span><span class="cx">         } else {
</span><del>-            toSVGGraphicsElement(*n).toClipPath(path);
</del><ins>+            downcast&lt;SVGGraphicsElement&gt;(*node).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 class="lines">@@ -584,9 +584,9 @@
</span><span class="cx">     // Spec: If the referenced object is itself a 'use', or if there are 'use' subelements within the referenced
</span><span class="cx">     // object, the instance tree will contain recursive expansion of the indirect references to form a complete tree.
</span><span class="cx">     bool targetHasUseTag = target-&gt;hasTagName(SVGNames::useTag);
</span><del>-    SVGElement* newTarget = 0;
</del><ins>+    SVGElement* newTarget = nullptr;
</ins><span class="cx">     if (targetHasUseTag) {
</span><del>-        foundProblem = hasCycleUseReferencing(toSVGUseElement(target), targetInstance, newTarget);
</del><ins>+        foundProblem = hasCycleUseReferencing(downcast&lt;SVGUseElement&gt;(target), targetInstance, newTarget);
</ins><span class="cx">         if (foundProblem)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><span class="lines">@@ -627,7 +627,7 @@
</span><span class="cx">     if (!targetHasUseTag || !newTarget)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    RefPtr&lt;SVGElementInstance&gt; newInstance = SVGElementInstance::create(this, toSVGUseElement(target), newTarget);
</del><ins>+    RefPtr&lt;SVGElementInstance&gt; newInstance = SVGElementInstance::create(this, downcast&lt;SVGUseElement&gt;(target), newTarget);
</ins><span class="cx">     SVGElementInstance* newInstancePtr = newInstance.get();
</span><span class="cx">     targetInstance-&gt;appendChild(newInstance.release());
</span><span class="cx">     buildInstanceTree(newTarget, newInstancePtr, foundProblem, foundUse);
</span><span class="lines">@@ -637,9 +637,9 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(referencedDocument());
</span><span class="cx">     Element* targetElement = SVGURIReference::targetElementFromIRIString(use-&gt;href(), *referencedDocument());
</span><del>-    newTarget = 0;
</del><ins>+    newTarget = nullptr;
</ins><span class="cx">     if (targetElement &amp;&amp; targetElement-&gt;isSVGElement())
</span><del>-        newTarget = toSVGElement(targetElement);
</del><ins>+        newTarget = downcast&lt;SVGElement&gt;(targetElement);
</ins><span class="cx"> 
</span><span class="cx">     if (!newTarget)
</span><span class="cx">         return false;
</span><span class="lines">@@ -710,24 +710,24 @@
</span><span class="cx">     // contains &lt;use&gt; tags, we'd miss them. So once we're done with settin' up the
</span><span class="cx">     // actual shadow tree (after the special case modification for svg/symbol) we have
</span><span class="cx">     // to walk it completely and expand all &lt;use&gt; elements.
</span><del>-    if (element-&gt;hasTagName(SVGNames::useTag)) {
-        SVGUseElement* use = toSVGUseElement(element);
-        ASSERT(!use-&gt;cachedDocumentIsStillLoading());
</del><ins>+    if (isSVGUseElement(element)) {
+        SVGUseElement&amp; use = downcast&lt;SVGUseElement&gt;(*element);
+        ASSERT(!use.cachedDocumentIsStillLoading());
</ins><span class="cx"> 
</span><span class="cx">         ASSERT(referencedDocument());
</span><del>-        Element* targetElement = SVGURIReference::targetElementFromIRIString(use-&gt;href(), *referencedDocument());
-        SVGElement* target = 0;
</del><ins>+        Element* targetElement = SVGURIReference::targetElementFromIRIString(use.href(), *referencedDocument());
+        SVGElement* target = nullptr;
</ins><span class="cx">         if (targetElement &amp;&amp; targetElement-&gt;isSVGElement())
</span><del>-            target = toSVGElement(targetElement);
</del><ins>+            target = downcast&lt;SVGElement&gt;(targetElement);
</ins><span class="cx"> 
</span><span class="cx">         // Don't ASSERT(target) here, it may be &quot;pending&quot;, too.
</span><span class="cx">         // Setup sub-shadow tree root node
</span><span class="cx">         RefPtr&lt;SVGGElement&gt; cloneParent = SVGGElement::create(SVGNames::gTag, *referencedDocument());
</span><del>-        use-&gt;cloneChildNodes(cloneParent.get());
</del><ins>+        use.cloneChildNodes(cloneParent.get());
</ins><span class="cx"> 
</span><span class="cx">         // Spec: In the generated content, the 'use' will be replaced by 'g', where all attributes from the
</span><span class="cx">         // 'use' element except for x, y, width, height and xlink:href are transferred to the generated 'g' element.
</span><del>-        transferUseAttributesToReplacedElement(use, cloneParent.get());
</del><ins>+        transferUseAttributesToReplacedElement(&amp;use, cloneParent.get());
</ins><span class="cx"> 
</span><span class="cx">         if (target &amp;&amp; !isDisallowedElement(*target)) {
</span><span class="cx">             RefPtr&lt;Element&gt; newChild = target-&gt;cloneElementWithChildren();
</span><span class="lines">@@ -746,8 +746,8 @@
</span><span class="cx">         RefPtr&lt;Node&gt; replacingElement(cloneParent.get());
</span><span class="cx"> 
</span><span class="cx">         // Replace &lt;use&gt; with referenced content.
</span><del>-        ASSERT(use-&gt;parentNode());
-        use-&gt;parentNode()-&gt;replaceChild(cloneParent.release(), use);
</del><ins>+        ASSERT(use.parentNode());
+        use.parentNode()-&gt;replaceChild(cloneParent.release(), &amp;use);
</ins><span class="cx"> 
</span><span class="cx">         // Expand the siblings because the *element* is replaced and we will
</span><span class="cx">         // lose the sibling chain when we are back from recursion.
</span><span class="lines">@@ -837,9 +837,9 @@
</span><span class="cx">     } else
</span><span class="cx">         ASSERT(target-&gt;nodeName() == originalElement-&gt;nodeName());
</span><span class="cx"> 
</span><del>-    SVGElement* element = 0;
</del><ins>+    SVGElement* element = nullptr;
</ins><span class="cx">     if (target-&gt;isSVGElement())
</span><del>-        element = toSVGElement(target);
</del><ins>+        element = downcast&lt;SVGElement&gt;(target);
</ins><span class="cx"> 
</span><span class="cx">     ASSERT(!targetInstance-&gt;shadowTreeElement());
</span><span class="cx">     targetInstance-&gt;setShadowTreeElement(element);
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGVKernElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGVKernElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGVKernElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGVKernElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx">     if (rootParent.inDocument()) {
</span><span class="cx">         ContainerNode* fontNode = parentNode();
</span><span class="cx">         if (fontNode &amp;&amp; isSVGFontElement(fontNode))
</span><del>-            toSVGFontElement(fontNode)-&gt;invalidateGlyphCache();
</del><ins>+            downcast&lt;SVGFontElement&gt;(*fontNode).invalidateGlyphCache();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return SVGElement::insertedInto(rootParent);
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx"> {
</span><span class="cx">     ContainerNode* fontNode = parentNode();
</span><span class="cx">     if (fontNode &amp;&amp; isSVGFontElement(fontNode))
</span><del>-        toSVGFontElement(fontNode)-&gt;invalidateGlyphCache();
</del><ins>+        downcast&lt;SVGFontElement&gt;(*fontNode).invalidateGlyphCache();
</ins><span class="cx"> 
</span><span class="cx">     SVGElement::removedFrom(rootParent);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGViewSpeccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGViewSpec.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGViewSpec.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/SVGViewSpec.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -139,11 +139,11 @@
</span><span class="cx"> SVGElement* SVGViewSpec::viewTarget() const
</span><span class="cx"> {
</span><span class="cx">     if (!m_contextElement)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     Element* element = m_contextElement-&gt;treeScope().getElementById(m_viewTargetString);
</span><span class="cx">     if (!element || !element-&gt;isSVGElement())
</span><del>-        return 0;
-    return toSVGElement(element);
</del><ins>+        return nullptr;
+    return downcast&lt;SVGElement&gt;(element);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> SVGTransformListPropertyTearOff* SVGViewSpec::transform()
</span></span></pre></div>
<a id="trunkSourceWebCoresvganimationSVGSMILElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -165,13 +165,13 @@
</span><span class="cx">     String href = getAttribute(XLinkNames::hrefAttr);
</span><span class="cx">     Element* target;
</span><span class="cx">     if (href.isEmpty())
</span><del>-        target = parentNode() &amp;&amp; parentNode()-&gt;isElementNode() ? toElement(parentNode()) : 0;
</del><ins>+        target = parentNode() &amp;&amp; parentNode()-&gt;isElementNode() ? toElement(parentNode()) : nullptr;
</ins><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() ? toSVGElement(target) : 0;
</del><ins>+    SVGElement* svgTarget = target &amp;&amp; target-&gt;isSVGElement() ? downcast&lt;SVGElement&gt;(target) : nullptr;
</ins><span class="cx"> 
</span><span class="cx">     if (svgTarget &amp;&amp; !svgTarget-&gt;inDocument())
</span><del>-        svgTarget = 0;
</del><ins>+        svgTarget = nullptr;
</ins><span class="cx"> 
</span><span class="cx">     if (svgTarget != targetElement())
</span><span class="cx">         setTargetElement(svgTarget);
</span><span class="lines">@@ -540,7 +540,7 @@
</span><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">@@ -565,12 +565,12 @@
</span><span class="cx">             if (eventBase)
</span><span class="cx">                 eventBase-&gt;removeEventListener(condition.m_name, condition.m_eventListener.get(), false);
</span><span class="cx">             condition.m_eventListener-&gt;disconnectAnimation();
</span><del>-            condition.m_eventListener = 0;
</del><ins>+            condition.m_eventListener = nullptr;
</ins><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><del>-        condition.m_syncbase = 0;
</del><ins>+        condition.m_syncbase = nullptr;
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvganimationSVGSMILElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.h (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/animation/SVGSMILElement.h        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.h        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -239,7 +239,7 @@
</span><span class="cx"> 
</span><span class="cx"> void isSVGSMILElement(const SVGSMILElement&amp;); // Catch unnecessary runtime check of type known at compile time.
</span><span class="cx"> inline bool isSVGSMILElement(const SVGElement&amp; element) { return element.isSMILElement(); }
</span><del>-inline bool isSVGSMILElement(const Node&amp; node) { return node.isSVGElement() &amp;&amp; toSVGElement(node).isSMILElement(); }
</del><ins>+inline bool isSVGSMILElement(const Node&amp; node) { return node.isSVGElement() &amp;&amp; downcast&lt;SVGElement&gt;(node).isSMILElement(); }
</ins><span class="cx"> 
</span><span class="cx"> template &lt;typename ArgType&gt;
</span><span class="cx"> struct ElementTypeCastTraits&lt;const SVGSMILElement, ArgType&gt; {
</span></span></pre></div>
<a id="trunkSourceWebCoresvggraphicsSVGImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/graphics/SVGImage.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/graphics/SVGImage.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/graphics/SVGImage.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx">     if (!m_page)
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><del>-    SVGSVGElement* rootElement = toSVGDocument(m_page-&gt;mainFrame().document())-&gt;rootElement();
</del><ins>+    SVGSVGElement* rootElement = downcast&lt;SVGDocument&gt;(m_page-&gt;mainFrame().document())-&gt;rootElement();
</ins><span class="cx">     if (!rootElement)
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx">     if (!m_page || !usesContainerSize())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    SVGSVGElement* rootElement = toSVGDocument(m_page-&gt;mainFrame().document())-&gt;rootElement();
</del><ins>+    SVGSVGElement* rootElement = downcast&lt;SVGDocument&gt;(m_page-&gt;mainFrame().document())-&gt;rootElement();
</ins><span class="cx">     if (!rootElement)
</span><span class="cx">         return;
</span><span class="cx">     RenderSVGRoot* renderer = toRenderSVGRoot(rootElement-&gt;renderer());
</span><span class="lines">@@ -103,7 +103,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (!m_page)
</span><span class="cx">         return IntSize();
</span><del>-    SVGSVGElement* rootElement = toSVGDocument(m_page-&gt;mainFrame().document())-&gt;rootElement();
</del><ins>+    SVGSVGElement* rootElement = downcast&lt;SVGDocument&gt;(m_page-&gt;mainFrame().document())-&gt;rootElement();
</ins><span class="cx">     if (!rootElement)
</span><span class="cx">         return IntSize();
</span><span class="cx"> 
</span><span class="lines">@@ -264,7 +264,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (!m_page)
</span><span class="cx">         return 0;
</span><del>-    SVGSVGElement* rootElement = toSVGDocument(m_page-&gt;mainFrame().document())-&gt;rootElement();
</del><ins>+    SVGSVGElement* rootElement = downcast&lt;SVGDocument&gt;(m_page-&gt;mainFrame().document())-&gt;rootElement();
</ins><span class="cx">     if (!rootElement)
</span><span class="cx">         return 0;
</span><span class="cx">     return toRenderBox(rootElement-&gt;renderer());
</span><span class="lines">@@ -281,7 +281,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (!m_page)
</span><span class="cx">         return false;
</span><del>-    SVGSVGElement* rootElement = toSVGDocument(m_page-&gt;mainFrame().document())-&gt;rootElement();
</del><ins>+    SVGSVGElement* rootElement = downcast&lt;SVGDocument&gt;(m_page-&gt;mainFrame().document())-&gt;rootElement();
</ins><span class="cx">     if (!rootElement)
</span><span class="cx">         return false;
</span><span class="cx">     return rootElement-&gt;intrinsicWidth().isPercent();
</span><span class="lines">@@ -291,7 +291,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (!m_page)
</span><span class="cx">         return false;
</span><del>-    SVGSVGElement* rootElement = toSVGDocument(m_page-&gt;mainFrame().document())-&gt;rootElement();
</del><ins>+    SVGSVGElement* rootElement = downcast&lt;SVGDocument&gt;(m_page-&gt;mainFrame().document())-&gt;rootElement();
</ins><span class="cx">     if (!rootElement)
</span><span class="cx">         return false;
</span><span class="cx">     return rootElement-&gt;intrinsicHeight().isPercent();
</span><span class="lines">@@ -301,7 +301,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (!m_page)
</span><span class="cx">         return;
</span><del>-    SVGSVGElement* rootElement = toSVGDocument(m_page-&gt;mainFrame().document())-&gt;rootElement();
</del><ins>+    SVGSVGElement* rootElement = downcast&lt;SVGDocument&gt;(m_page-&gt;mainFrame().document())-&gt;rootElement();
</ins><span class="cx">     if (!rootElement)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -320,7 +320,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (!m_page)
</span><span class="cx">         return;
</span><del>-    SVGSVGElement* rootElement = toSVGDocument(m_page-&gt;mainFrame().document())-&gt;rootElement();
</del><ins>+    SVGSVGElement* rootElement = downcast&lt;SVGDocument&gt;(m_page-&gt;mainFrame().document())-&gt;rootElement();
</ins><span class="cx">     if (!rootElement)
</span><span class="cx">         return;
</span><span class="cx">     rootElement-&gt;unpauseAnimations();
</span><span class="lines">@@ -331,7 +331,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (!m_page)
</span><span class="cx">         return;
</span><del>-    SVGSVGElement* rootElement = toSVGDocument(m_page-&gt;mainFrame().document())-&gt;rootElement();
</del><ins>+    SVGSVGElement* rootElement = downcast&lt;SVGDocument&gt;(m_page-&gt;mainFrame().document())-&gt;rootElement();
</ins><span class="cx">     if (!rootElement)
</span><span class="cx">         return;
</span><span class="cx">     rootElement-&gt;pauseAnimations();
</span></span></pre></div>
<a id="trunkSourceWebCoresvggraphicsfiltersSVGFEImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -119,7 +119,7 @@
</span><span class="cx">         const AffineTransform&amp; absoluteTransform = filter().absoluteTransform();
</span><span class="cx">         resultImage-&gt;context()-&gt;concatCTM(absoluteTransform);
</span><span class="cx"> 
</span><del>-        SVGElement* contextNode = toSVGElement(renderer-&gt;element());
</del><ins>+        SVGElement* contextNode = downcast&lt;SVGElement&gt;(renderer-&gt;element());
</ins><span class="cx">         if (contextNode-&gt;hasRelativeLengths()) {
</span><span class="cx">             SVGLengthContext lengthContext(contextNode);
</span><span class="cx">             FloatSize viewportSize;
</span></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAnimatedPathSegListPropertyTearOffh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/properties/SVGAnimatedPathSegListPropertyTearOff.h (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAnimatedPathSegListPropertyTearOff.h        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/properties/SVGAnimatedPathSegListPropertyTearOff.h        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx">     void animValDidChange()
</span><span class="cx">     {
</span><span class="cx">         ASSERT(m_animatedPathByteStream);
</span><del>-        SVGPathElement* pathElement = toSVGPathElement(contextElement());
</del><ins>+        SVGPathElement* pathElement = downcast&lt;SVGPathElement&gt;(contextElement());
</ins><span class="cx"> 
</span><span class="cx">         // If the animVal is observed from JS, we have to update it on each animation step.
</span><span class="cx">         // This is an expensive operation and only done, if someone actually observes the animatedPathSegList() while an animation is running.
</span></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGPathSegListPropertyTearOffcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/properties/SVGPathSegListPropertyTearOff.cpp (173858 => 173859)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGPathSegListPropertyTearOff.cpp        2014-09-23 00:47:06 UTC (rev 173858)
+++ trunk/Source/WebCore/svg/properties/SVGPathSegListPropertyTearOff.cpp        2014-09-23 00:55:05 UTC (rev 173859)
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx"> {
</span><span class="cx">     SVGElement* contextElement = m_animatedProperty-&gt;contextElement();
</span><span class="cx">     ASSERT(contextElement);
</span><del>-    return toSVGPathElement(contextElement);
</del><ins>+    return downcast&lt;SVGPathElement&gt;(contextElement);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool SVGPathSegListPropertyTearOff::processIncomingListItemValue(const ListItemType&amp; newItem, unsigned* indexToModify)
</span></span></pre>
</div>
</div>

</body>
</html>