<!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>[174854] 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/174854">174854</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-10-17 17:21:40 -0700 (Fri, 17 Oct 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Use is<>() / downcast<>() for all SVG RenderObjects
https://bugs.webkit.org/show_bug.cgi?id=137840
Reviewed by Benjamin Poulain.
Use is<>() / downcast<>() for all SVG RenderObjects and clean up the
surrounding code.
No new tests, no behaviro change.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::supportsPath):
(WebCore::AccessibilityRenderObject::elementPath):
* page/FrameView.cpp:
(WebCore::FrameView::applyOverflowToViewport):
(WebCore::FrameView::forceLayoutParentViewIfNeeded):
* rendering/RenderLayerFilterInfo.cpp:
(WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients):
* rendering/svg/RenderSVGGradientStop.cpp:
(WebCore::RenderSVGGradientStop::styleDidChange):
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGInlineText.h:
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
* rendering/svg/RenderSVGResourceContainer.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::addResourceForClientInvalidation):
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGShape.h:
* rendering/svg/RenderSVGText.cpp:
(WebCore::collectLayoutAttributes):
(WebCore::RenderSVGText::subtreeChildWillBeRemoved):
(WebCore::RenderSVGText::subtreeTextDidChange):
(WebCore::updateFontInAllDescendants):
* rendering/svg/RenderSVGText.h:
* rendering/svg/SVGInlineTextBox.h:
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::mapLocalToContainer):
(WebCore::SVGRenderSupport::pushMappingToContainer):
(WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeStyle):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::bufferForeground):
* rendering/svg/SVGResourcesCycleSolver.cpp:
(WebCore::SVGResourcesCycleSolver::resolveCycles):
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::renderSVGText):
(WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::svgAttributeChanged):
* svg/SVGElement.cpp:
(WebCore::SVGElement::svgAttributeChanged):
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::svgAttributeChanged):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::svgAttributeChanged):
(WebCore::SVGImageElement::didAttachRenderers):
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::svgAttributeChanged):
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::svgAttributeChanged):
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::svgAttributeChanged):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::localCoordinateSpaceTransform):
(WebCore::SVGSVGElement::currentViewBoxRect):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::setContainerSize):
(WebCore::SVGImage::containerSize):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerFilterInfocpp">trunk/Source/WebCore/rendering/RenderLayerFilterInfo.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGGradientStopcpp">trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGImageh">trunk/Source/WebCore/rendering/svg/RenderSVGImage.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGInlineTexth">trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGResourceContainercpp">trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGResourceContainerh">trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGRootcpp">trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGRooth">trunk/Source/WebCore/rendering/svg/RenderSVGRoot.h</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="#trunkSourceWebCorerenderingsvgRenderSVGTexth">trunk/Source/WebCore/rendering/svg/RenderSVGText.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGInlineTextBoxh">trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGRenderSupportcpp">trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGRenderTreeAsTextcpp">trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGRenderingContextcpp">trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGResourcesCycleSolvercpp">trunk/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGRootInlineBoxcpp">trunk/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGCircleElementcpp">trunk/Source/WebCore/svg/SVGCircleElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGElementcpp">trunk/Source/WebCore/svg/SVGElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGEllipseElementcpp">trunk/Source/WebCore/svg/SVGEllipseElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGImageElementcpp">trunk/Source/WebCore/svg/SVGImageElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGLineElementcpp">trunk/Source/WebCore/svg/SVGLineElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGPolyElementcpp">trunk/Source/WebCore/svg/SVGPolyElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGRectElementcpp">trunk/Source/WebCore/svg/SVGRectElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGSVGElementcpp">trunk/Source/WebCore/svg/SVGSVGElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvggraphicsSVGImagecpp">trunk/Source/WebCore/svg/graphics/SVGImage.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/ChangeLog        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -1,5 +1,78 @@
</span><span class="cx"> 2014-10-17 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><ins>+ Use is<>() / downcast<>() for all SVG RenderObjects
+ https://bugs.webkit.org/show_bug.cgi?id=137840
+
+ Reviewed by Benjamin Poulain.
+
+ Use is<>() / downcast<>() for all SVG RenderObjects and clean up the
+ surrounding code.
+
+ No new tests, no behaviro change.
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::supportsPath):
+ (WebCore::AccessibilityRenderObject::elementPath):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::applyOverflowToViewport):
+ (WebCore::FrameView::forceLayoutParentViewIfNeeded):
+ * rendering/RenderLayerFilterInfo.cpp:
+ (WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients):
+ * rendering/svg/RenderSVGGradientStop.cpp:
+ (WebCore::RenderSVGGradientStop::styleDidChange):
+ * rendering/svg/RenderSVGImage.h:
+ * rendering/svg/RenderSVGInlineText.h:
+ * rendering/svg/RenderSVGResourceContainer.cpp:
+ (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
+ * rendering/svg/RenderSVGResourceContainer.h:
+ * rendering/svg/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::addResourceForClientInvalidation):
+ * rendering/svg/RenderSVGRoot.h:
+ * rendering/svg/RenderSVGShape.h:
+ * rendering/svg/RenderSVGText.cpp:
+ (WebCore::collectLayoutAttributes):
+ (WebCore::RenderSVGText::subtreeChildWillBeRemoved):
+ (WebCore::RenderSVGText::subtreeTextDidChange):
+ (WebCore::updateFontInAllDescendants):
+ * rendering/svg/RenderSVGText.h:
+ * rendering/svg/SVGInlineTextBox.h:
+ * rendering/svg/SVGRenderSupport.cpp:
+ (WebCore::SVGRenderSupport::mapLocalToContainer):
+ (WebCore::SVGRenderSupport::pushMappingToContainer):
+ (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
+ * rendering/svg/SVGRenderTreeAsText.cpp:
+ (WebCore::writeStyle):
+ * rendering/svg/SVGRenderingContext.cpp:
+ (WebCore::SVGRenderingContext::bufferForeground):
+ * rendering/svg/SVGResourcesCycleSolver.cpp:
+ (WebCore::SVGResourcesCycleSolver::resolveCycles):
+ * rendering/svg/SVGRootInlineBox.cpp:
+ (WebCore::SVGRootInlineBox::renderSVGText):
+ (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
+ * svg/SVGCircleElement.cpp:
+ (WebCore::SVGCircleElement::svgAttributeChanged):
+ * svg/SVGElement.cpp:
+ (WebCore::SVGElement::svgAttributeChanged):
+ * svg/SVGEllipseElement.cpp:
+ (WebCore::SVGEllipseElement::svgAttributeChanged):
+ * svg/SVGImageElement.cpp:
+ (WebCore::SVGImageElement::svgAttributeChanged):
+ (WebCore::SVGImageElement::didAttachRenderers):
+ * svg/SVGLineElement.cpp:
+ (WebCore::SVGLineElement::svgAttributeChanged):
+ * svg/SVGPolyElement.cpp:
+ (WebCore::SVGPolyElement::svgAttributeChanged):
+ * svg/SVGRectElement.cpp:
+ (WebCore::SVGRectElement::svgAttributeChanged):
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::localCoordinateSpaceTransform):
+ (WebCore::SVGSVGElement::currentViewBoxRect):
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::setContainerSize):
+ (WebCore::SVGImage::containerSize):
+
+2014-10-17 Chris Dumez <cdumez@apple.com>
+
</ins><span class="cx"> Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms()
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=137836
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -852,16 +852,13 @@
</span><span class="cx">
</span><span class="cx"> bool AccessibilityRenderObject::supportsPath() const
</span><span class="cx"> {
</span><del>- if (m_renderer && m_renderer->isSVGShape())
- return true;
-
- return false;
</del><ins>+ return is<RenderSVGShape>(m_renderer);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Path AccessibilityRenderObject::elementPath() const
</span><span class="cx"> {
</span><del>- if (m_renderer && m_renderer->isSVGShape() && toRenderSVGShape(m_renderer)->hasPath()) {
- Path path = toRenderSVGShape(m_renderer)->path();
</del><ins>+ if (is<RenderSVGShape>(m_renderer) && downcast<RenderSVGShape>(*m_renderer).hasPath()) {
+ Path path = downcast<RenderSVGShape>(*m_renderer).path();
</ins><span class="cx">
</span><span class="cx"> // The SVG path is in terms of the parent's bounding box. The path needs to be offset to frame coordinates.
</span><span class="cx"> if (auto svgRoot = ancestorsOfType<RenderSVGRoot>(*m_renderer).first()) {
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/page/FrameView.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -590,7 +590,7 @@
</span><span class="cx"> setContentsSize(size);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void FrameView::applyOverflowToViewport(RenderElement* o, ScrollbarMode& hMode, ScrollbarMode& vMode)
</del><ins>+void FrameView::applyOverflowToViewport(RenderElement* renderer, ScrollbarMode& hMode, ScrollbarMode& vMode)
</ins><span class="cx"> {
</span><span class="cx"> // Handle the overflow:hidden/scroll case for the body/html elements. WinIE treats
</span><span class="cx"> // overflow:hidden and overflow:scroll on <body> as applying to the document's
</span><span class="lines">@@ -603,13 +603,13 @@
</span><span class="cx">
</span><span class="cx"> bool overrideHidden = frame().isMainFrame() && ((frame().frameScaleFactor() > 1) || headerHeight() || footerHeight());
</span><span class="cx">
</span><del>- EOverflow overflowX = o->style().overflowX();
- EOverflow overflowY = o->style().overflowY();
</del><ins>+ EOverflow overflowX = renderer->style().overflowX();
+ EOverflow overflowY = renderer->style().overflowY();
</ins><span class="cx">
</span><del>- if (o->isSVGRoot()) {
</del><ins>+ if (is<RenderSVGRoot>(*renderer)) {
</ins><span class="cx"> // FIXME: evaluate if we can allow overflow for these cases too.
</span><span class="cx"> // Overflow is always hidden when stand-alone SVG documents are embedded.
</span><del>- if (toRenderSVGRoot(o)->isEmbeddedThroughFrameContainingSVGDocument()) {
</del><ins>+ if (downcast<RenderSVGRoot>(*renderer).isEmbeddedThroughFrameContainingSVGDocument()) {
</ins><span class="cx"> overflowX = OHIDDEN;
</span><span class="cx"> overflowY = OHIDDEN;
</span><span class="cx"> }
</span><span class="lines">@@ -651,7 +651,7 @@
</span><span class="cx"> ;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- m_viewportRenderer = o;
</del><ins>+ m_viewportRenderer = renderer;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void FrameView::applyPaginationToViewport()
</span><span class="lines">@@ -1088,8 +1088,8 @@
</span><span class="cx"> if (!contentBox)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- RenderSVGRoot* svgRoot = toRenderSVGRoot(contentBox);
- if (svgRoot->everHadLayout() && !svgRoot->needsLayout())
</del><ins>+ auto& svgRoot = downcast<RenderSVGRoot>(*contentBox);
+ if (svgRoot.everHadLayout() && !svgRoot.needsLayout())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // If the embedded SVG document appears the first time, the ownerRenderer has already finished
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerFilterInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerFilterInfo.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerFilterInfo.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/rendering/RenderLayerFilterInfo.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -125,14 +125,13 @@
</span><span class="cx">
</span><span class="cx"> void RenderLayer::FilterInfo::removeReferenceFilterClients()
</span><span class="cx"> {
</span><del>- for (size_t i = 0, size = m_externalSVGReferences.size(); i < size; ++i)
- m_externalSVGReferences[i]->removeClient(this);
</del><ins>+ for (auto& resourceHandle : m_externalSVGReferences)
+ resourceHandle->removeClient(this);
</ins><span class="cx"> m_externalSVGReferences.clear();
</span><del>- for (size_t i = 0, size = m_internalSVGReferences.size(); i < size; ++i) {
- Element* filter = m_internalSVGReferences[i].get();
</del><ins>+ for (const auto& filter : m_internalSVGReferences) {
</ins><span class="cx"> if (!filter->renderer())
</span><span class="cx"> continue;
</span><del>- toRenderSVGResourceContainer(*filter->renderer()).removeClientRenderLayer(&m_layer);
</del><ins>+ downcast<RenderSVGResourceContainer>(*filter->renderer()).removeClientRenderLayer(&m_layer);
</ins><span class="cx"> }
</span><span class="cx"> m_internalSVGReferences.clear();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGGradientStopcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -52,11 +52,11 @@
</span><span class="cx"> if (!gradient)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- RenderObject* renderer = gradient->renderer();
</del><ins>+ RenderElement* renderer = gradient->renderer();
</ins><span class="cx"> if (!renderer)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- toRenderSVGResourceContainer(*renderer).removeAllClientsFromCache();
</del><ins>+ downcast<RenderSVGResourceContainer>(*renderer).removeAllClientsFromCache();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderSVGGradientStop::layout()
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGImageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGImage.h (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGImage.h        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGImage.h        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -90,8 +90,6 @@
</span><span class="cx"> std::unique_ptr<ImageBuffer> m_bufferedForeground;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderSVGImage, isSVGImage())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderSVGImage, isSVGImage())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGInlineTexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.h (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.h        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.h        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -69,8 +69,6 @@
</span><span class="cx"> SVGTextLayoutAttributes m_layoutAttributes;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderSVGInlineText, isSVGInlineText())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderSVGInlineText, isSVGInlineText())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGResourceContainercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -96,8 +96,8 @@
</span><span class="cx"> bool markForInvalidation = mode != ParentOnlyInvalidation;
</span><span class="cx">
</span><span class="cx"> for (auto* client : m_clients) {
</span><del>- if (client->isSVGResourceContainer()) {
- toRenderSVGResourceContainer(*client).removeAllClientsFromCache(markForInvalidation);
</del><ins>+ if (is<RenderSVGResourceContainer>(*client)) {
+ downcast<RenderSVGResourceContainer>(*client).removeAllClientsFromCache(markForInvalidation);
</ins><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGResourceContainerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.h (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.h        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.h        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -75,8 +75,6 @@
</span><span class="cx"> HashSet<RenderLayer*> m_clientLayers;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderSVGResourceContainer, isSVGResourceContainer())
-
</del><span class="cx"> inline RenderSVGResourceContainer* getRenderSVGResourceContainerById(Document& document, const AtomicString& id)
</span><span class="cx"> {
</span><span class="cx"> if (id.isEmpty())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGRootcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -441,12 +441,12 @@
</span><span class="cx">
</span><span class="cx"> void RenderSVGRoot::addResourceForClientInvalidation(RenderSVGResourceContainer* resource)
</span><span class="cx"> {
</span><del>- RenderObject* svgRoot = resource->parent();
- while (svgRoot && !svgRoot->isSVGRoot())
</del><ins>+ RenderElement* svgRoot = resource->parent();
+ while (svgRoot && !is<RenderSVGRoot>(*svgRoot))
</ins><span class="cx"> svgRoot = svgRoot->parent();
</span><span class="cx"> if (!svgRoot)
</span><span class="cx"> return;
</span><del>- toRenderSVGRoot(svgRoot)->m_resourcesNeedingToInvalidateClients.add(resource);
</del><ins>+ downcast<RenderSVGRoot>(*svgRoot).m_resourcesNeedingToInvalidateClients.add(resource);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGRooth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRoot.h (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGRoot.h        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRoot.h        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -122,8 +122,6 @@
</span><span class="cx"> bool m_hasBoxDecorations : 1;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderSVGRoot, isSVGRoot())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderSVGRoot, isSVGRoot())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGShapeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGShape.h (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGShape.h        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGShape.h        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -133,8 +133,6 @@
</span><span class="cx"> bool m_needsTransformUpdate : 1;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderSVGShape, isSVGShape())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderSVGShape, isSVGShape())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -117,8 +117,8 @@
</span><span class="cx"> static inline void collectLayoutAttributes(RenderObject* text, Vector<SVGTextLayoutAttributes*>& attributes)
</span><span class="cx"> {
</span><span class="cx"> for (RenderObject* descendant = text; descendant; descendant = descendant->nextInPreOrder(text)) {
</span><del>- if (descendant->isSVGInlineText())
- attributes.append(toRenderSVGInlineText(descendant)->layoutAttributes());
</del><ins>+ if (is<RenderSVGInlineText>(*descendant))
+ attributes.append(downcast<RenderSVGInlineText>(*descendant).layoutAttributes());
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -254,19 +254,19 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // This logic requires that the 'text' child is still inserted in the tree.
</span><del>- RenderSVGInlineText* text = toRenderSVGInlineText(child);
</del><ins>+ auto& text = downcast<RenderSVGInlineText>(*child);
</ins><span class="cx"> bool stopAfterNext = false;
</span><del>- SVGTextLayoutAttributes* previous = 0;
- SVGTextLayoutAttributes* next = 0;
</del><ins>+ SVGTextLayoutAttributes* previous = nullptr;
+ SVGTextLayoutAttributes* next = nullptr;
</ins><span class="cx"> if (!documentBeingDestroyed())
</span><del>- findPreviousAndNextAttributes(this, text, stopAfterNext, previous, next);
</del><ins>+ findPreviousAndNextAttributes(this, &text, stopAfterNext, previous, next);
</ins><span class="cx">
</span><span class="cx"> if (previous)
</span><span class="cx"> affectedAttributes.append(previous);
</span><span class="cx"> if (next)
</span><span class="cx"> affectedAttributes.append(next);
</span><span class="cx">
</span><del>- size_t position = m_layoutAttributes.find(text->layoutAttributes());
</del><ins>+ size_t position = m_layoutAttributes.find(text.layoutAttributes());
</ins><span class="cx"> ASSERT(position != notFound);
</span><span class="cx"> m_layoutAttributes.remove(position);
</span><span class="cx"> }
</span><span class="lines">@@ -326,17 +326,17 @@
</span><span class="cx">
</span><span class="cx"> checkLayoutAttributesConsistency(this, m_layoutAttributes);
</span><span class="cx"> for (RenderObject* descendant = text; descendant; descendant = descendant->nextInPreOrder(text)) {
</span><del>- if (descendant->isSVGInlineText())
- m_layoutAttributesBuilder.buildLayoutAttributesForTextRenderer(toRenderSVGInlineText(*descendant));
</del><ins>+ if (is<RenderSVGInlineText>(*descendant))
+ m_layoutAttributesBuilder.buildLayoutAttributesForTextRenderer(downcast<RenderSVGInlineText>(*descendant));
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline void updateFontInAllDescendants(RenderObject* start, SVGTextLayoutAttributesBuilder* builder = 0)
</del><ins>+static inline void updateFontInAllDescendants(RenderObject* start, SVGTextLayoutAttributesBuilder* builder = nullptr)
</ins><span class="cx"> {
</span><span class="cx"> for (RenderObject* descendant = start; descendant; descendant = descendant->nextInPreOrder(start)) {
</span><del>- if (!descendant->isSVGInlineText())
</del><ins>+ if (!is<RenderSVGInlineText>(*descendant))
</ins><span class="cx"> continue;
</span><del>- RenderSVGInlineText& text = toRenderSVGInlineText(*descendant);
</del><ins>+ auto& text = downcast<RenderSVGInlineText>(*descendant);
</ins><span class="cx"> text.updateScaledFont();
</span><span class="cx"> if (builder)
</span><span class="cx"> builder->rebuildMetricsForTextRenderer(text);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGTexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGText.h (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGText.h        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGText.h        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -105,8 +105,6 @@
</span><span class="cx"> Vector<SVGTextLayoutAttributes*> m_layoutAttributes;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-RENDER_OBJECT_TYPE_CASTS(RenderSVGText, isSVGText())
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderSVGText, isSVGText())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGInlineTextBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.h (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.h        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.h        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> public:
</span><span class="cx"> explicit SVGInlineTextBox(RenderSVGInlineText&);
</span><span class="cx">
</span><del>- RenderSVGInlineText& renderer() const { return toRenderSVGInlineText(InlineTextBox::renderer()); }
</del><ins>+ RenderSVGInlineText& renderer() const { return downcast<RenderSVGInlineText>(InlineTextBox::renderer()); }
</ins><span class="cx">
</span><span class="cx"> virtual float virtualLogicalHeight() const { return m_logicalHeight; }
</span><span class="cx"> void setLogicalHeight(float height) { m_logicalHeight = height; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGRenderSupportcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -91,8 +91,8 @@
</span><span class="cx"> // At the SVG/HTML boundary (aka RenderSVGRoot), we apply the localToBorderBoxTransform
</span><span class="cx"> // to map an element from SVG viewport coordinates to CSS box coordinates.
</span><span class="cx"> // RenderSVGRoot's mapLocalToContainer method expects CSS box coordinates.
</span><del>- if (parent.isSVGRoot())
- transformState.applyTransform(toRenderSVGRoot(parent).localToBorderBoxTransform());
</del><ins>+ if (is<RenderSVGRoot>(parent))
+ transformState.applyTransform(downcast<RenderSVGRoot>(parent).localToBorderBoxTransform());
</ins><span class="cx">
</span><span class="cx"> transformState.applyTransform(renderer.localToParentTransform());
</span><span class="cx">
</span><span class="lines">@@ -110,9 +110,9 @@
</span><span class="cx"> // At the SVG/HTML boundary (aka RenderSVGRoot), we apply the localToBorderBoxTransform
</span><span class="cx"> // to map an element from SVG viewport coordinates to CSS box coordinates.
</span><span class="cx"> // RenderSVGRoot's mapLocalToContainer method expects CSS box coordinates.
</span><del>- if (parent.isSVGRoot()) {
</del><ins>+ if (is<RenderSVGRoot>(parent)) {
</ins><span class="cx"> TransformationMatrix matrix(renderer.localToParentTransform());
</span><del>- matrix.multiply(toRenderSVGRoot(parent).localToBorderBoxTransform());
</del><ins>+ matrix.multiply(downcast<RenderSVGRoot>(parent).localToBorderBoxTransform());
</ins><span class="cx"> geometryMap.push(&renderer, matrix);
</span><span class="cx"> } else
</span><span class="cx"> geometryMap.push(&renderer, renderer.localToParentTransform());
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx"> continue;
</span><span class="cx">
</span><span class="cx"> // Don't include elements in the union that do not render.
</span><del>- if (current->isSVGShape() && toRenderSVGShape(current)->isRenderingDisabled())
</del><ins>+ if (is<RenderSVGShape>(*current) && downcast<RenderSVGShape>(*current).isRenderingDisabled())
</ins><span class="cx"> continue;
</span><span class="cx">
</span><span class="cx"> const AffineTransform& transform = current->localToParentTransform();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGRenderTreeAsTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -258,8 +258,8 @@
</span><span class="cx"> writeNameValuePair(ts, "transform", renderer.localTransform());
</span><span class="cx"> writeIfNotDefault(ts, "image rendering", style.imageRendering(), RenderStyle::initialImageRendering());
</span><span class="cx"> writeIfNotDefault(ts, "opacity", style.opacity(), RenderStyle::initialOpacity());
</span><del>- if (renderer.isSVGShape()) {
- const auto& shape = toRenderSVGShape(renderer);
</del><ins>+ if (is<RenderSVGShape>(renderer)) {
+ const auto& shape = downcast<RenderSVGShape>(renderer);
</ins><span class="cx">
</span><span class="cx"> Color fallbackColor;
</span><span class="cx"> if (RenderSVGResource* strokePaintingResource = RenderSVGResource::strokePaintingResource(const_cast<RenderSVGShape&>(shape), shape.style(), fallbackColor)) {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGRenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -345,7 +345,7 @@
</span><span class="cx"> bool SVGRenderingContext::bufferForeground(std::unique_ptr<ImageBuffer>& imageBuffer)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_paintInfo);
</span><del>- ASSERT(m_renderer->isSVGImage());
</del><ins>+ ASSERT(is<RenderSVGImage>(*m_renderer));
</ins><span class="cx"> FloatRect boundingBox = m_renderer->objectBoundingBox();
</span><span class="cx">
</span><span class="cx"> // Invalidate an existing buffer if the scale is not correct.
</span><span class="lines">@@ -364,7 +364,7 @@
</span><span class="cx"> bufferedRenderingContext->translate(-boundingBox.x(), -boundingBox.y());
</span><span class="cx"> PaintInfo bufferedInfo(*m_paintInfo);
</span><span class="cx"> bufferedInfo.context = bufferedRenderingContext;
</span><del>- toRenderSVGImage(m_renderer)->paintForeground(bufferedInfo);
</del><ins>+ downcast<RenderSVGImage>(*m_renderer).paintForeground(bufferedInfo);
</ins><span class="cx"> } else
</span><span class="cx"> return false;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGResourcesCycleSolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -125,8 +125,8 @@
</span><span class="cx"> m_allResources.add(resource);
</span><span class="cx">
</span><span class="cx"> // If we're a resource, add ourselves to the HashSet.
</span><del>- if (m_renderer.isSVGResourceContainer())
- m_allResources.add(&toRenderSVGResourceContainer(m_renderer));
</del><ins>+ if (is<RenderSVGResourceContainer>(m_renderer))
+ m_allResources.add(&downcast<RenderSVGResourceContainer>(m_renderer));
</ins><span class="cx">
</span><span class="cx"> ASSERT(!m_allResources.isEmpty());
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGRootInlineBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/rendering/svg/SVGRootInlineBox.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx">
</span><span class="cx"> RenderSVGText& SVGRootInlineBox::renderSVGText()
</span><span class="cx"> {
</span><del>- return toRenderSVGText(blockFlow());
</del><ins>+ return downcast<RenderSVGText>(blockFlow());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void SVGRootInlineBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit, LayoutUnit)
</span><span class="lines">@@ -76,14 +76,13 @@
</span><span class="cx">
</span><span class="cx"> void SVGRootInlineBox::computePerCharacterLayoutInformation()
</span><span class="cx"> {
</span><del>- RenderSVGText* textRoot = toRenderSVGText(&blockFlow());
- ASSERT(textRoot);
</del><ins>+ auto& textRoot = downcast<RenderSVGText>(blockFlow());
</ins><span class="cx">
</span><del>- Vector<SVGTextLayoutAttributes*>& layoutAttributes = textRoot->layoutAttributes();
</del><ins>+ Vector<SVGTextLayoutAttributes*>& layoutAttributes = textRoot.layoutAttributes();
</ins><span class="cx"> if (layoutAttributes.isEmpty())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (textRoot->needsReordering())
</del><ins>+ if (textRoot.needsReordering())
</ins><span class="cx"> reorderValueLists(layoutAttributes);
</span><span class="cx">
</span><span class="cx"> // Perform SVG text layout phase two (see SVGTextLayoutEngine for details).
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGCircleElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGCircleElement.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGCircleElement.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/svg/SVGCircleElement.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RenderSVGShape* renderer = toRenderSVGShape(this->renderer());
</del><ins>+ auto* renderer = downcast<RenderSVGShape>(this->renderer());
</ins><span class="cx"> if (!renderer)
</span><span class="cx"> return;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGElement.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGElement.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/svg/SVGElement.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -1052,8 +1052,8 @@
</span><span class="cx"> if (attrName == HTMLNames::idAttr) {
</span><span class="cx"> auto renderer = this->renderer();
</span><span class="cx"> // Notify resources about id changes, this is important as we cache resources by id in SVGDocumentExtensions
</span><del>- if (renderer && renderer->isSVGResourceContainer())
- toRenderSVGResourceContainer(*renderer).idChanged();
</del><ins>+ if (is<RenderSVGResourceContainer>(renderer))
+ downcast<RenderSVGResourceContainer>(*renderer).idChanged();
</ins><span class="cx"> if (inDocument())
</span><span class="cx"> buildPendingResourcesIfNeeded();
</span><span class="cx"> SVGElementInstance::invalidateAllInstancesOfElement(this);
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGEllipseElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGEllipseElement.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGEllipseElement.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/svg/SVGEllipseElement.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -118,7 +118,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RenderSVGShape* renderer = toRenderSVGShape(this->renderer());
</del><ins>+ auto* renderer = downcast<RenderSVGShape>(this->renderer());
</ins><span class="cx"> if (!renderer)
</span><span class="cx"> return;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGImageElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGImageElement.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGImageElement.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/svg/SVGImageElement.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -143,12 +143,12 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- auto renderer = this->renderer();
</del><ins>+ auto* renderer = this->renderer();
</ins><span class="cx"> if (!renderer)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (isLengthAttribute) {
</span><del>- if (toRenderSVGImage(renderer)->updateImageViewport())
</del><ins>+ if (downcast<RenderSVGImage>(*renderer).updateImageViewport())
</ins><span class="cx"> RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -175,7 +175,7 @@
</span><span class="cx">
</span><span class="cx"> void SVGImageElement::didAttachRenderers()
</span><span class="cx"> {
</span><del>- if (RenderSVGImage* imageObj = toRenderSVGImage(renderer())) {
</del><ins>+ if (auto* imageObj = downcast<RenderSVGImage>(renderer())) {
</ins><span class="cx"> if (imageObj->imageResource().hasImage())
</span><span class="cx"> return;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGLineElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGLineElement.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGLineElement.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/svg/SVGLineElement.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -117,7 +117,7 @@
</span><span class="cx"> if (isLengthAttribute)
</span><span class="cx"> updateRelativeLengthsInformation();
</span><span class="cx">
</span><del>- RenderSVGShape* renderer = toRenderSVGShape(this->renderer());
</del><ins>+ auto* renderer = downcast<RenderSVGShape>(this->renderer());
</ins><span class="cx"> if (!renderer)
</span><span class="cx"> return;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGPolyElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGPolyElement.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGPolyElement.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/svg/SVGPolyElement.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -111,7 +111,7 @@
</span><span class="cx">
</span><span class="cx"> SVGElementInstance::InvalidationGuard invalidationGuard(this);
</span><span class="cx">
</span><del>- RenderSVGShape* renderer = toRenderSVGShape(this->renderer());
</del><ins>+ auto* renderer = downcast<RenderSVGShape>(this->renderer());
</ins><span class="cx"> if (!renderer)
</span><span class="cx"> return;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGRectElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGRectElement.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGRectElement.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/svg/SVGRectElement.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -132,7 +132,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RenderSVGShape* renderer = toRenderSVGShape(this->renderer());
</del><ins>+ auto* renderer = downcast<RenderSVGShape>(this->renderer());
</ins><span class="cx"> if (!renderer)
</span><span class="cx"> return;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGSVGElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGSVGElement.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGSVGElement.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/svg/SVGSVGElement.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -423,7 +423,7 @@
</span><span class="cx"> SVGLengthContext lengthContext(this);
</span><span class="cx"> transform.translate(x().value(lengthContext), y().value(lengthContext));
</span><span class="cx"> } else if (mode == SVGLocatable::ScreenScope) {
</span><del>- if (RenderObject* renderer = this->renderer()) {
</del><ins>+ if (RenderElement* renderer = this->renderer()) {
</ins><span class="cx"> FloatPoint location;
</span><span class="cx"> float zoomFactor = 1;
</span><span class="cx">
</span><span class="lines">@@ -431,8 +431,8 @@
</span><span class="cx"> // to map an element from SVG viewport coordinates to CSS box coordinates.
</span><span class="cx"> // RenderSVGRoot's localToAbsolute method expects CSS box coordinates.
</span><span class="cx"> // We also need to adjust for the zoom level factored into CSS coordinates (bug #96361).
</span><del>- if (renderer->isSVGRoot()) {
- location = toRenderSVGRoot(renderer)->localToBorderBoxTransform().mapPoint(location);
</del><ins>+ if (is<RenderSVGRoot>(*renderer)) {
+ location = downcast<RenderSVGRoot>(*renderer).localToBorderBoxTransform().mapPoint(location);
</ins><span class="cx"> zoomFactor = 1 / renderer->style().effectiveZoom();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -546,9 +546,9 @@
</span><span class="cx"> FloatRect useViewBox = viewBox();
</span><span class="cx"> if (!useViewBox.isEmpty())
</span><span class="cx"> return useViewBox;
</span><del>- if (!renderer() || !renderer()->isSVGRoot())
</del><ins>+ if (!is<RenderSVGRoot>(renderer()))
</ins><span class="cx"> return FloatRect();
</span><del>- if (!toRenderSVGRoot(renderer())->isEmbeddedThroughSVGImage())
</del><ins>+ if (!downcast<RenderSVGRoot>(*renderer()).isEmbeddedThroughSVGImage())
</ins><span class="cx"> return FloatRect();
</span><span class="cx">
</span><span class="cx"> Length intrinsicWidth = this->intrinsicWidth();
</span></span></pre></div>
<a id="trunkSourceWebCoresvggraphicsSVGImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/graphics/SVGImage.cpp (174853 => 174854)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/graphics/SVGImage.cpp        2014-10-17 23:59:11 UTC (rev 174853)
+++ trunk/Source/WebCore/svg/graphics/SVGImage.cpp        2014-10-18 00:21:40 UTC (rev 174854)
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx"> SVGSVGElement* rootElement = this->rootElement();
</span><span class="cx"> if (!rootElement)
</span><span class="cx"> return;
</span><del>- RenderSVGRoot* renderer = toRenderSVGRoot(rootElement->renderer());
</del><ins>+ auto* renderer = downcast<RenderSVGRoot>(rootElement->renderer());
</ins><span class="cx"> if (!renderer)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -109,7 +109,7 @@
</span><span class="cx"> if (!rootElement)
</span><span class="cx"> return IntSize();
</span><span class="cx">
</span><del>- RenderSVGRoot* renderer = toRenderSVGRoot(rootElement->renderer());
</del><ins>+ auto* renderer = downcast<RenderSVGRoot>(rootElement->renderer());
</ins><span class="cx"> if (!renderer)
</span><span class="cx"> return IntSize();
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>