<!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>[173325] 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/173325">173325</a></dd>
<dt>Author</dt> <dd>akling@apple.com</dd>
<dt>Date</dt> <dd>2014-09-05 12:25:57 -0700 (Fri, 05 Sep 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>CTTE: SVGResourcesCache should only allow RenderElements.
&lt;https://webkit.org/b/136578&gt;

Only RenderElement subclasses can use SVG resources.
Codify this by making SVGResourcesCache::m_cache keyed on RenderElement.

Reviewed by Antti Koivisto.

* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::selfWillPaint):
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::imageChanged):
* rendering/svg/RenderSVGResource.cpp:
(WebCore::requestPaintingResource):
(WebCore::removeFromCacheAndInvalidateDependencies):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyClippingToContext):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paintReplaced):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::shouldGenerateMarkerPositions):
(WebCore::RenderSVGShape::markerRect):
(WebCore::RenderSVGShape::drawMarkers):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::invalidateResourcesOfChildren):
(WebCore::SVGRenderSupport::intersectRepaintRectWithResources):
(WebCore::SVGRenderSupport::filtersForceContainerLayout):
(WebCore::SVGRenderSupport::pointInClippingArea):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):
* rendering/svg/SVGResourcesCache.cpp:
(WebCore::resourcesCacheFromRenderer):
(WebCore::SVGResourcesCache::cachedResourcesForRenderer):
(WebCore::SVGResourcesCache::clientLayoutChanged):
(WebCore::SVGResourcesCache::clientDestroyed):
(WebCore::SVGResourcesCache::resourceDestroyed):
(WebCore::SVGResourcesCache::cachedResourcesForRenderObject): Deleted.
* rendering/svg/SVGResourcesCache.h:
* rendering/svg/SVGResourcesCycleSolver.cpp:
(WebCore::SVGResourcesCycleSolver::resourceContainsCycles):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGContainercpp">trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGImagecpp">trunk/Source/WebCore/rendering/svg/RenderSVGImage.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="#trunkSourceWebCorerenderingsvgRenderSVGRootcpp">trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGShapecpp">trunk/Source/WebCore/rendering/svg/RenderSVGShape.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGRenderSupportcpp">trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGRenderingContextcpp">trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGResourcesCachecpp">trunk/Source/WebCore/rendering/svg/SVGResourcesCache.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGResourcesCacheh">trunk/Source/WebCore/rendering/svg/SVGResourcesCache.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGResourcesCycleSolvercpp">trunk/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (173324 => 173325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-09-05 19:20:18 UTC (rev 173324)
+++ trunk/Source/WebCore/ChangeLog        2014-09-05 19:25:57 UTC (rev 173325)
</span><span class="lines">@@ -1,3 +1,46 @@
</span><ins>+2014-09-05  Andreas Kling  &lt;akling@apple.com&gt;
+
+        CTTE: SVGResourcesCache should only allow RenderElements.
+        &lt;https://webkit.org/b/136578&gt;
+
+        Only RenderElement subclasses can use SVG resources.
+        Codify this by making SVGResourcesCache::m_cache keyed on RenderElement.
+
+        Reviewed by Antti Koivisto.
+
+        * rendering/svg/RenderSVGContainer.cpp:
+        (WebCore::RenderSVGContainer::selfWillPaint):
+        * rendering/svg/RenderSVGImage.cpp:
+        (WebCore::RenderSVGImage::imageChanged):
+        * rendering/svg/RenderSVGResource.cpp:
+        (WebCore::requestPaintingResource):
+        (WebCore::removeFromCacheAndInvalidateDependencies):
+        * rendering/svg/RenderSVGResourceClipper.cpp:
+        (WebCore::RenderSVGResourceClipper::applyClippingToContext):
+        * rendering/svg/RenderSVGRoot.cpp:
+        (WebCore::RenderSVGRoot::paintReplaced):
+        * rendering/svg/RenderSVGShape.cpp:
+        (WebCore::RenderSVGShape::shouldGenerateMarkerPositions):
+        (WebCore::RenderSVGShape::markerRect):
+        (WebCore::RenderSVGShape::drawMarkers):
+        * rendering/svg/SVGRenderSupport.cpp:
+        (WebCore::invalidateResourcesOfChildren):
+        (WebCore::SVGRenderSupport::intersectRepaintRectWithResources):
+        (WebCore::SVGRenderSupport::filtersForceContainerLayout):
+        (WebCore::SVGRenderSupport::pointInClippingArea):
+        * rendering/svg/SVGRenderingContext.cpp:
+        (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
+        * rendering/svg/SVGResourcesCache.cpp:
+        (WebCore::resourcesCacheFromRenderer):
+        (WebCore::SVGResourcesCache::cachedResourcesForRenderer):
+        (WebCore::SVGResourcesCache::clientLayoutChanged):
+        (WebCore::SVGResourcesCache::clientDestroyed):
+        (WebCore::SVGResourcesCache::resourceDestroyed):
+        (WebCore::SVGResourcesCache::cachedResourcesForRenderObject): Deleted.
+        * rendering/svg/SVGResourcesCache.h:
+        * rendering/svg/SVGResourcesCycleSolver.cpp:
+        (WebCore::SVGResourcesCycleSolver::resourceContainsCycles):
+
</ins><span class="cx"> 2014-09-05  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         IDB version changed events should have a valid eventType()
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGContainercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp (173324 => 173325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp        2014-09-05 19:20:18 UTC (rev 173324)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp        2014-09-05 19:25:57 UTC (rev 173325)
</span><span class="lines">@@ -102,7 +102,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool RenderSVGContainer::selfWillPaint()
</span><span class="cx"> {
</span><del>-    SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(*this);
</del><ins>+    auto* resources = SVGResourcesCache::cachedResourcesForRenderer(*this);
</ins><span class="cx">     return resources &amp;&amp; resources-&gt;filter();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGImage.cpp (173324 => 173325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGImage.cpp        2014-09-05 19:20:18 UTC (rev 173324)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGImage.cpp        2014-09-05 19:25:57 UTC (rev 173325)
</span><span class="lines">@@ -204,7 +204,7 @@
</span><span class="cx"> {
</span><span class="cx">     // The image resource defaults to nullImage until the resource arrives.
</span><span class="cx">     // This empty image may be cached by SVG resources which must be invalidated.
</span><del>-    if (SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(*this))
</del><ins>+    if (auto* resources = SVGResourcesCache::cachedResourcesForRenderer(*this))
</ins><span class="cx">         resources-&gt;removeClientFromCache(*this);
</span><span class="cx"> 
</span><span class="cx">     // Eventually notify parent resources, that we've changed.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGResourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp (173324 => 173325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp        2014-09-05 19:20:18 UTC (rev 173324)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp        2014-09-05 19:25:57 UTC (rev 173325)
</span><span class="lines">@@ -111,7 +111,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // If no resources are associated with the given renderer, return the color resource.
</span><del>-    SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(renderer);
</del><ins>+    auto* resources = SVGResourcesCache::cachedResourcesForRenderer(renderer);
</ins><span class="cx">     if (!resources) {
</span><span class="cx">         if (paintType == SVGPaint::SVG_PAINTTYPE_URI_NONE || !inheritColorFromParentStyleIfNeeded(renderer, applyToFill, color))
</span><span class="cx">             return nullptr;
</span><span class="lines">@@ -156,7 +156,7 @@
</span><span class="cx"> 
</span><span class="cx"> static inline void removeFromCacheAndInvalidateDependencies(RenderElement&amp; renderer, bool needsLayout)
</span><span class="cx"> {
</span><del>-    if (SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(renderer)) {
</del><ins>+    if (auto* resources = SVGResourcesCache::cachedResourcesForRenderer(renderer)) {
</ins><span class="cx"> #if ENABLE(FILTERS)
</span><span class="cx">         if (RenderSVGResourceFilter* filter = resources-&gt;filter())
</span><span class="cx">             filter-&gt;removeClientFromCache(renderer);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGResourceClippercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp (173324 => 173325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp        2014-09-05 19:20:18 UTC (rev 173324)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp        2014-09-05 19:25:57 UTC (rev 173325)
</span><span class="lines">@@ -158,7 +158,7 @@
</span><span class="cx">         maskContext-&gt;concatCTM(animatedLocalTransform);
</span><span class="cx"> 
</span><span class="cx">         // clipPath can also be clipped by another clipPath.
</span><del>-        SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(*this);
</del><ins>+        auto* resources = SVGResourcesCache::cachedResourcesForRenderer(*this);
</ins><span class="cx">         RenderSVGResourceClipper* clipper;
</span><span class="cx">         bool succeeded;
</span><span class="cx">         if (resources &amp;&amp; (clipper = resources-&gt;clipper())) {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGRootcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp (173324 => 173325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp        2014-09-05 19:20:18 UTC (rev 173324)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp        2014-09-05 19:25:57 UTC (rev 173325)
</span><span class="lines">@@ -247,7 +247,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Don't paint if we don't have kids, except if we have filters we should paint those.
</span><span class="cx">     if (!firstChild()) {
</span><del>-        SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(*this);
</del><ins>+        auto* resources = SVGResourcesCache::cachedResourcesForRenderer(*this);
</ins><span class="cx">         if (!resources || !resources-&gt;filter()) {
</span><span class="cx">             if (page &amp;&amp; paintInfo.phase == PaintPhaseForeground)
</span><span class="cx">                 page-&gt;addRelevantUnpaintedObject(this, visualOverflowRect());
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGShapecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGShape.cpp (173324 => 173325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGShape.cpp        2014-09-05 19:20:18 UTC (rev 173324)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGShape.cpp        2014-09-05 19:25:57 UTC (rev 173325)
</span><span class="lines">@@ -218,7 +218,7 @@
</span><span class="cx">     if (!graphicsElement().supportsMarkers())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(*this);
</del><ins>+    auto* resources = SVGResourcesCache::cachedResourcesForRenderer(*this);
</ins><span class="cx">     if (!resources)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -372,7 +372,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_markerPositions.isEmpty());
</span><span class="cx"> 
</span><del>-    SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(*this);
</del><ins>+    auto* resources = SVGResourcesCache::cachedResourcesForRenderer(*this);
</ins><span class="cx">     ASSERT(resources);
</span><span class="cx"> 
</span><span class="cx">     RenderSVGResourceMarker* markerStart = resources-&gt;markerStart();
</span><span class="lines">@@ -448,7 +448,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_markerPositions.isEmpty());
</span><span class="cx"> 
</span><del>-    SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(*this);
</del><ins>+    auto* resources = SVGResourcesCache::cachedResourcesForRenderer(*this);
</ins><span class="cx">     if (!resources)
</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 (173324 => 173325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp        2014-09-05 19:20:18 UTC (rev 173324)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp        2014-09-05 19:25:57 UTC (rev 173325)
</span><span class="lines">@@ -190,7 +190,7 @@
</span><span class="cx"> static inline void invalidateResourcesOfChildren(RenderElement&amp; renderer)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!renderer.needsLayout());
</span><del>-    if (SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(renderer))
</del><ins>+    if (auto* resources = SVGResourcesCache::cachedResourcesForRenderer(renderer))
</ins><span class="cx">         resources-&gt;removeClientFromCache(renderer, false);
</span><span class="cx"> 
</span><span class="cx">     for (auto&amp; child : childrenOfType&lt;RenderElement&gt;(renderer))
</span><span class="lines">@@ -359,7 +359,7 @@
</span><span class="cx"> 
</span><span class="cx"> void SVGRenderSupport::intersectRepaintRectWithResources(const RenderElement&amp; renderer, FloatRect&amp; repaintRect)
</span><span class="cx"> {
</span><del>-    SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(renderer);
</del><ins>+    auto* resources = SVGResourcesCache::cachedResourcesForRenderer(renderer);
</ins><span class="cx">     if (!resources)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -382,7 +382,7 @@
</span><span class="cx">     if (!renderer.normalChildNeedsLayout())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(renderer);
</del><ins>+    auto* resources = SVGResourcesCache::cachedResourcesForRenderer(renderer);
</ins><span class="cx">     if (!resources || !resources-&gt;filter())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -393,7 +393,7 @@
</span><span class="cx"> {
</span><span class="cx">     // We just take clippers into account to determine if a point is on the node. The Specification may
</span><span class="cx">     // change later and we also need to check maskers.
</span><del>-    SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(renderer);
</del><ins>+    auto* resources = SVGResourcesCache::cachedResourcesForRenderer(renderer);
</ins><span class="cx">     if (!resources)
</span><span class="cx">         return true;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGRenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp (173324 => 173325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp        2014-09-05 19:20:18 UTC (rev 173324)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp        2014-09-05 19:25:57 UTC (rev 173325)
</span><span class="lines">@@ -156,7 +156,7 @@
</span><span class="cx">         m_paintInfo-&gt;context-&gt;clipPath(clipPath.pathForReferenceRect(referenceBox), clipPath.windRule());
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(*m_renderer);
</del><ins>+    auto* resources = SVGResourcesCache::cachedResourcesForRenderer(*m_renderer);
</ins><span class="cx">     if (!resources) {
</span><span class="cx"> #if ENABLE(FILTERS)
</span><span class="cx">         if (svgStyle.hasFilter())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGResourcesCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGResourcesCache.cpp (173324 => 173325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGResourcesCache.cpp        2014-09-05 19:20:18 UTC (rev 173324)
+++ trunk/Source/WebCore/rendering/svg/SVGResourcesCache.cpp        2014-09-05 19:25:57 UTC (rev 173325)
</span><span class="lines">@@ -75,21 +75,21 @@
</span><span class="cx">         resourceContainer-&gt;removeClient(renderer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline SVGResourcesCache&amp; resourcesCacheFromRenderer(const RenderObject&amp; renderer)
</del><ins>+static inline SVGResourcesCache&amp; resourcesCacheFromRenderer(const RenderElement&amp; renderer)
</ins><span class="cx"> {
</span><span class="cx">     SVGDocumentExtensions* extensions = renderer.document().accessSVGExtensions();
</span><span class="cx">     ASSERT(extensions);
</span><span class="cx">     return extensions-&gt;resourcesCache();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-SVGResources* SVGResourcesCache::cachedResourcesForRenderObject(const RenderObject&amp; renderer)
</del><ins>+SVGResources* SVGResourcesCache::cachedResourcesForRenderer(const RenderElement&amp; renderer)
</ins><span class="cx"> {
</span><span class="cx">     return resourcesCacheFromRenderer(renderer).m_cache.get(&amp;renderer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SVGResourcesCache::clientLayoutChanged(RenderElement&amp; renderer)
</span><span class="cx"> {
</span><del>-    SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(renderer);
</del><ins>+    auto* resources = SVGResourcesCache::cachedResourcesForRenderer(renderer);
</ins><span class="cx">     if (!resources)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -156,8 +156,7 @@
</span><span class="cx"> 
</span><span class="cx"> void SVGResourcesCache::clientDestroyed(RenderElement&amp; renderer)
</span><span class="cx"> {
</span><del>-    SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(renderer);
-    if (resources)
</del><ins>+    if (auto* resources = SVGResourcesCache::cachedResourcesForRenderer(renderer))
</ins><span class="cx">         resources-&gt;removeClientFromCache(renderer);
</span><span class="cx"> 
</span><span class="cx">     resourcesCacheFromRenderer(renderer).removeResourcesFromRenderer(renderer);
</span><span class="lines">@@ -175,7 +174,7 @@
</span><span class="cx"> 
</span><span class="cx">         // Mark users of destroyed resources as pending resolution based on the id of the old resource.
</span><span class="cx">         Element&amp; resourceElement = resource.element();
</span><del>-        Element* clientElement = toElement(it.key-&gt;node());
</del><ins>+        Element* clientElement = it.key-&gt;element();
</ins><span class="cx">         SVGDocumentExtensions* extensions = clientElement-&gt;document().accessSVGExtensions();
</span><span class="cx"> 
</span><span class="cx">         extensions-&gt;addPendingResource(resourceElement.getIdAttribute(), clientElement);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGResourcesCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGResourcesCache.h (173324 => 173325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGResourcesCache.h        2014-09-05 19:20:18 UTC (rev 173324)
+++ trunk/Source/WebCore/rendering/svg/SVGResourcesCache.h        2014-09-05 19:25:57 UTC (rev 173325)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx">     SVGResourcesCache();
</span><span class="cx">     ~SVGResourcesCache();
</span><span class="cx"> 
</span><del>-    static SVGResources* cachedResourcesForRenderObject(const RenderObject&amp;);
</del><ins>+    static SVGResources* cachedResourcesForRenderer(const RenderElement&amp;);
</ins><span class="cx"> 
</span><span class="cx">     // Called from all SVG renderers addChild() methods.
</span><span class="cx">     static void clientWasAddedToTree(RenderObject&amp;);
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx">     void addResourcesFromRenderer(RenderElement&amp;, const RenderStyle&amp;);
</span><span class="cx">     void removeResourcesFromRenderer(RenderElement&amp;);
</span><span class="cx"> 
</span><del>-    typedef HashMap&lt;const RenderObject*, std::unique_ptr&lt;SVGResources&gt;&gt; CacheMap;
</del><ins>+    typedef HashMap&lt;const RenderElement*, std::unique_ptr&lt;SVGResources&gt;&gt; CacheMap;
</ins><span class="cx">     CacheMap m_cache;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGResourcesCycleSolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp (173324 => 173325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp        2014-09-05 19:20:18 UTC (rev 173324)
+++ trunk/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp        2014-09-05 19:25:57 UTC (rev 173325)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx">     // First operate on the resources of the given renderer.
</span><span class="cx">     // &lt;marker id=&quot;a&quot;&gt; &lt;path marker-start=&quot;url(#b)&quot;/&gt; ...
</span><span class="cx">     // &lt;marker id=&quot;b&quot; marker-start=&quot;url(#a)&quot;/&gt;
</span><del>-    if (SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(renderer)) {
</del><ins>+    if (auto* resources = SVGResourcesCache::cachedResourcesForRenderer(renderer)) {
</ins><span class="cx">         HashSet&lt;RenderSVGResourceContainer*&gt; resourceSet;
</span><span class="cx">         resources-&gt;buildSetOfResources(resourceSet);
</span><span class="cx"> 
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx">     // &lt;marker id=&quot;a&quot;&gt; &lt;path marker-start=&quot;url(#b)&quot;/&gt; ...
</span><span class="cx">     // &lt;marker id=&quot;b&quot;&gt; &lt;path marker-start=&quot;url(#a)&quot;/&gt; ...
</span><span class="cx">     for (auto&amp; child : childrenOfType&lt;RenderElement&gt;(renderer)) {
</span><del>-        SVGResources* childResources = SVGResourcesCache::cachedResourcesForRenderObject(child);
</del><ins>+        auto* childResources = SVGResourcesCache::cachedResourcesForRenderer(child);
</ins><span class="cx">         if (!childResources)
</span><span class="cx">             continue;
</span><span class="cx">         
</span></span></pre>
</div>
</div>

</body>
</html>