<!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>[165546] trunk/Source</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/165546">165546</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2014-03-13 10:51:59 -0700 (Thu, 13 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Avoid copy-prone idiom &quot;for (auto item : collection)&quot;
https://bugs.webkit.org/show_bug.cgi?id=129990

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* heap/CodeBlockSet.h:
(JSC::CodeBlockSet::iterate): Use auto&amp; to be sure we don't copy by accident.
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::dispatchBreakpointActionLog): Use auto* to
make explicit that we are iterating through pointers.
(Inspector::ScriptDebugServer::dispatchBreakpointActionSound): Ditto.
(Inspector::ScriptDebugServer::dispatchBreakpointActionProbe): Ditto.
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::removeBreakpoint): Use auto&amp;, and also
get rid of an unneeded local variable.

Source/WebCore:

Most of these changes have no effect. A few of them get rid of unwanted
copying of the items as we iterate them. Found these with the command
'git grep &quot;for (auto .*:&quot;' or the equivalent.

* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::IDBKeyData): Use auto&amp; to avoid copying the keys.
(WebCore::IDBKeyData::maybeCreateIDBKey): Ditto.
(WebCore::IDBKeyData::isolatedCopy): Ditto.

* dom/Node.cpp:
(WebCore::Document::invalidateNodeListAndCollectionCaches): Use auto*
to make explicit the fact that these are pointers. Stop using &quot;it&quot; for
a variable that is not an iterator. Get rid of unneeded local variables
for the collections themselves.

* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::adoptDocument): Use auto&amp; to make sure we
don't do any unnecessary copying. Stop using &quot;it&quot; for a variable that
is not an iterator.

* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::lastRow): Use auto* to be explicit
that these are pointers.
* inspector/InspectorNodeFinder.cpp:
(WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal): Ditto.
* page/ios/FrameIOS.mm:
(WebCore::Frame::interpretationsForCurrentRoot): Ditto. Also got rid of
an unnecessary local variable.

* platform/FileChooser.cpp:
(WebCore::FileChooser::chooseFiles): Use auto&amp;. Also fix a FIXME.
(WebCore::FileChooser::chooseMediaFiles): Ditto.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::naturalSize): Use auto&amp;.

* rendering/RenderIterator.h: Changed include from RenderObject.h to
RenderElement.h; iterators are based on RenderElement now.

* rendering/svg/RenderSVGResource.cpp:
(WebCore::removeFromCacheAndInvalidateDependencies): Use auto*.

* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation): Use auto*.
(WebCore::RenderSVGResourceContainer::markAllClientLayersForInvalidation): Ditto.
(WebCore::RenderSVGResourceContainer::registerResource): Ditto.

* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::layoutChildren): Updated to use a more specific
type, to use auto* instead of of auto, and to eliminate the slightly sloppily
capitalized and not-so-slightly ungrammatical notlayoutedObjects.
(WebCore::SVGRenderSupport::applyStrokeStyleToContext): Use auto&amp;.
(WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending): Use auto*.

* rendering/svg/SVGResourcesCycleSolver.cpp:
(WebCore::SVGResourcesCycleSolver::resourceContainsCycles): Use auto*.
(WebCore::SVGResourcesCycleSolver::resolveCycles): Ditto. Also lineageOfType.

* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::applyResultsToTarget): Use auto*.
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::invalidateMPathDependencies): Ditto.

Source/WebKit/mac:

* WebView/WebFrame.mm:
(-[WebFrame _documentFragmentWithNodesAsParagraphs:]):
Use auto*. Also removed uneeded ASSERT_NO_EXCEPTION, which is already
the default without specifying it explicitly.

Source/WebKit2:

* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::RemoteLayerTreePropertyApplier::applyProperties): Use auto&amp;.

* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): Use auto&amp;
even though the type is a scalar. This does no harm and makes it easier
to spot uses that trigger unnecessary copying with grep.
(WebKit::RemoteLayerTreeTransaction::decode): Ditto.
(WebKit::dumpChangedLayers): Ditto.
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree): Ditto.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::visitedLinkStateChanged): Ditto.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapCodeBlockSeth">trunk/Source/JavaScriptCore/heap/CodeBlockSet.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorScriptDebugServercpp">trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgentcpp">trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeyDatacpp">trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodecpp">trunk/Source/WebCore/dom/Node.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodeRareDatah">trunk/Source/WebCore/dom/NodeRareData.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLTableRowsCollectioncpp">trunk/Source/WebCore/html/HTMLTableRowsCollection.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorNodeFindercpp">trunk/Source/WebCore/inspector/InspectorNodeFinder.cpp</a></li>
<li><a href="#trunkSourceWebCorepageiosFrameIOSmm">trunk/Source/WebCore/page/ios/FrameIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformFileChoosercpp">trunk/Source/WebCore/platform/FileChooser.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationobjcSourceBufferPrivateAVFObjCmm">trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderIteratorh">trunk/Source/WebCore/rendering/RenderIterator.h</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGResourcecpp">trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGResourceContainercpp">trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGRenderSupportcpp">trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGResourcesCycleSolvercpp">trunk/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimateMotionElementcpp">trunk/Source/WebCore/svg/SVGAnimateMotionElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGPathElementcpp">trunk/Source/WebCore/svg/SVGPathElement.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebFramemm">trunk/Source/WebKit/mac/WebView/WebFrame.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedmacRemoteLayerTreePropertyAppliermm">trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm</a></li>
<li><a href="#trunkSourceWebKit2SharedmacRemoteLayerTreeTransactionmm">trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacRemoteLayerTreeHostmm">trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcesscpp">trunk/Source/WebKit2/WebProcess/WebProcess.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2014-03-10  Darin Adler  &lt;darin@apple.com&gt;
+
+        Avoid copy-prone idiom &quot;for (auto item : collection)&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=129990
+
+        Reviewed by Geoffrey Garen.
+
+        * heap/CodeBlockSet.h:
+        (JSC::CodeBlockSet::iterate): Use auto&amp; to be sure we don't copy by accident.
+        * inspector/ScriptDebugServer.cpp:
+        (Inspector::ScriptDebugServer::dispatchBreakpointActionLog): Use auto* to
+        make explicit that we are iterating through pointers.
+        (Inspector::ScriptDebugServer::dispatchBreakpointActionSound): Ditto.
+        (Inspector::ScriptDebugServer::dispatchBreakpointActionProbe): Ditto.
+        * inspector/agents/InspectorDebuggerAgent.cpp:
+        (Inspector::InspectorDebuggerAgent::removeBreakpoint): Use auto&amp;, and also
+        get rid of an unneeded local variable.
+
</ins><span class="cx"> 2014-03-13  Brian Burg  &lt;bburg@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Remove unused callId parameter from evaluateInWebInspector
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapCodeBlockSeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/CodeBlockSet.h (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/CodeBlockSet.h        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/JavaScriptCore/heap/CodeBlockSet.h        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx">     // visited.
</span><span class="cx">     template&lt;typename Functor&gt; void iterate(Functor&amp; functor)
</span><span class="cx">     {
</span><del>-        for (auto &amp;codeBlock : m_set) {
</del><ins>+        for (auto&amp; codeBlock : m_set) {
</ins><span class="cx">             bool done = functor(codeBlock);
</span><span class="cx">             if (done)
</span><span class="cx">                 break;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorScriptDebugServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.cpp (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.cpp        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.cpp        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -154,7 +154,7 @@
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;ScriptDebugListener*&gt; listenersCopy;
</span><span class="cx">     copyToVector(*listeners, listenersCopy);
</span><del>-    for (auto listener : listenersCopy)
</del><ins>+    for (auto* listener : listenersCopy)
</ins><span class="cx">         listener-&gt;breakpointActionLog(exec, message);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;ScriptDebugListener*&gt; listenersCopy;
</span><span class="cx">     copyToVector(*listeners, listenersCopy);
</span><del>-    for (auto listener : listenersCopy)
</del><ins>+    for (auto* listener : listenersCopy)
</ins><span class="cx">         listener-&gt;breakpointActionSound(breakpointActionIdentifier);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -190,7 +190,7 @@
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;ScriptDebugListener*&gt; listenersCopy;
</span><span class="cx">     copyToVector(*listeners, listenersCopy);
</span><del>-    for (auto listener : listenersCopy)
</del><ins>+    for (auto* listener : listenersCopy)
</ins><span class="cx">         listener-&gt;breakpointActionProbe(exec, action, m_hitCount, sample);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -341,8 +341,7 @@
</span><span class="cx"> {
</span><span class="cx">     m_javaScriptBreakpoints.remove(breakpointIdentifier);
</span><span class="cx"> 
</span><del>-    Vector&lt;JSC::BreakpointID&gt; breakpointIDs = m_breakpointIdentifierToDebugServerBreakpointIDs.take(breakpointIdentifier);
-    for (auto breakpointID : breakpointIDs) {
</del><ins>+    for (JSC::BreakpointID breakpointID : m_breakpointIdentifierToDebugServerBreakpointIDs.take(breakpointIdentifier)) {
</ins><span class="cx">         const Vector&lt;ScriptBreakpointAction&gt;&amp; breakpointActions = scriptDebugServer().getActionsForBreakpoint(breakpointID);
</span><span class="cx">         for (auto&amp; action : breakpointActions)
</span><span class="cx">             m_injectedScriptManager-&gt;releaseObjectGroup(objectGroupForBreakpointAction(action));
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebCore/ChangeLog        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -1,3 +1,73 @@
</span><ins>+2014-03-11  Darin Adler  &lt;darin@apple.com&gt;
+
+        Avoid copy-prone idiom &quot;for (auto item : collection)&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=129990
+
+        Reviewed by Geoffrey Garen.
+
+        Most of these changes have no effect. A few of them get rid of unwanted
+        copying of the items as we iterate them. Found these with the command
+        'git grep &quot;for (auto .*:&quot;' or the equivalent.
+
+        * Modules/indexeddb/IDBKeyData.cpp:
+        (WebCore::IDBKeyData::IDBKeyData): Use auto&amp; to avoid copying the keys.
+        (WebCore::IDBKeyData::maybeCreateIDBKey): Ditto.
+        (WebCore::IDBKeyData::isolatedCopy): Ditto.
+
+        * dom/Node.cpp:
+        (WebCore::Document::invalidateNodeListAndCollectionCaches): Use auto*
+        to make explicit the fact that these are pointers. Stop using &quot;it&quot; for
+        a variable that is not an iterator. Get rid of unneeded local variables
+        for the collections themselves.
+
+        * dom/NodeRareData.h:
+        (WebCore::NodeListsNodeData::adoptDocument): Use auto&amp; to make sure we
+        don't do any unnecessary copying. Stop using &quot;it&quot; for a variable that
+        is not an iterator.
+
+        * html/HTMLTableRowsCollection.cpp:
+        (WebCore::HTMLTableRowsCollection::lastRow): Use auto* to be explicit
+        that these are pointers.
+        * inspector/InspectorNodeFinder.cpp:
+        (WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal): Ditto.
+        * page/ios/FrameIOS.mm:
+        (WebCore::Frame::interpretationsForCurrentRoot): Ditto. Also got rid of
+        an unnecessary local variable.
+
+        * platform/FileChooser.cpp:
+        (WebCore::FileChooser::chooseFiles): Use auto&amp;. Also fix a FIXME.
+        (WebCore::FileChooser::chooseMediaFiles): Ditto.
+
+        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
+        (WebCore::SourceBufferPrivateAVFObjC::naturalSize): Use auto&amp;.
+
+        * rendering/RenderIterator.h: Changed include from RenderObject.h to
+        RenderElement.h; iterators are based on RenderElement now.
+
+        * rendering/svg/RenderSVGResource.cpp:
+        (WebCore::removeFromCacheAndInvalidateDependencies): Use auto*.
+
+        * rendering/svg/RenderSVGResourceContainer.cpp:
+        (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation): Use auto*.
+        (WebCore::RenderSVGResourceContainer::markAllClientLayersForInvalidation): Ditto.
+        (WebCore::RenderSVGResourceContainer::registerResource): Ditto.
+
+        * rendering/svg/SVGRenderSupport.cpp:
+        (WebCore::SVGRenderSupport::layoutChildren): Updated to use a more specific
+        type, to use auto* instead of of auto, and to eliminate the slightly sloppily
+        capitalized and not-so-slightly ungrammatical notlayoutedObjects.
+        (WebCore::SVGRenderSupport::applyStrokeStyleToContext): Use auto&amp;.
+        (WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending): Use auto*.
+
+        * rendering/svg/SVGResourcesCycleSolver.cpp:
+        (WebCore::SVGResourcesCycleSolver::resourceContainsCycles): Use auto*.
+        (WebCore::SVGResourcesCycleSolver::resolveCycles): Ditto. Also lineageOfType.
+
+        * svg/SVGAnimateMotionElement.cpp:
+        (WebCore::SVGAnimateMotionElement::applyResultsToTarget): Use auto*.
+        * svg/SVGPathElement.cpp:
+        (WebCore::SVGPathElement::invalidateMPathDependencies): Ditto.
+
</ins><span class="cx"> 2014-03-13  Brian Burg  &lt;bburg@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Remove unused callId parameter from evaluateInWebInspector
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx">     case IDBKey::InvalidType:
</span><span class="cx">         break;
</span><span class="cx">     case IDBKey::ArrayType:
</span><del>-        for (auto key2 : key-&gt;array())
</del><ins>+        for (auto&amp; key2 : key-&gt;array())
</ins><span class="cx">             arrayValue.append(IDBKeyData(key2.get()));
</span><span class="cx">         break;
</span><span class="cx">     case IDBKey::StringType:
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx">     case IDBKey::ArrayType:
</span><span class="cx">         {
</span><span class="cx">             IDBKey::KeyArray array;
</span><del>-            for (auto keyData : arrayValue) {
</del><ins>+            for (auto&amp; keyData : arrayValue) {
</ins><span class="cx">                 array.append(keyData.maybeCreateIDBKey());
</span><span class="cx">                 ASSERT(array.last());
</span><span class="cx">             }
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx">     case IDBKey::InvalidType:
</span><span class="cx">         return result;
</span><span class="cx">     case IDBKey::ArrayType:
</span><del>-        for (auto key : arrayValue)
</del><ins>+        for (auto&amp; key : arrayValue)
</ins><span class="cx">             result.arrayValue.append(key.isolatedCopy());
</span><span class="cx">         return result;
</span><span class="cx">     case IDBKey::StringType:
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.cpp (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.cpp        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebCore/dom/Node.cpp        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -724,13 +724,10 @@
</span><span class="cx"> #if !ASSERT_DISABLED
</span><span class="cx">     m_inInvalidateNodeListAndCollectionCaches = true;
</span><span class="cx"> #endif
</span><del>-    HashSet&lt;LiveNodeList*&gt; liveNodeLists = std::move(m_listsInvalidatedAtDocument);
-    for (auto it : liveNodeLists)
-        it-&gt;invalidateCache(attrName);
-
-    HashSet&lt;HTMLCollection*&gt; collectionLists = std::move(m_collectionsInvalidatedAtDocument);
-    for (auto it : collectionLists)
-        it-&gt;invalidateCache(attrName);
</del><ins>+    for (auto* list : std::move(m_listsInvalidatedAtDocument))
+        list-&gt;invalidateCache(attrName);
+    for (auto* list : std::move(m_collectionsInvalidatedAtDocument))
+        list-&gt;invalidateCache(attrName);
</ins><span class="cx"> #if !ASSERT_DISABLED
</span><span class="cx">     m_inInvalidateNodeListAndCollectionCaches = false;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeRareDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/NodeRareData.h (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/NodeRareData.h        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebCore/dom/NodeRareData.h        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -33,15 +33,16 @@
</span><span class="cx"> #include &quot;Page.h&quot;
</span><span class="cx"> #include &quot;QualifiedName.h&quot;
</span><span class="cx"> #include &quot;TagNodeList.h&quot;
</span><del>-#if ENABLE(VIDEO_TRACK)
-#include &quot;TextTrack.h&quot;
-#endif
</del><span class="cx"> #include &lt;wtf/HashSet.h&gt;
</span><span class="cx"> #include &lt;wtf/OwnPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/PassOwnPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/text/AtomicString.h&gt;
</span><span class="cx"> #include &lt;wtf/text/StringHash.h&gt;
</span><span class="cx"> 
</span><ins>+#if ENABLE(VIDEO_TRACK)
+#include &quot;TextTrack.h&quot;
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class LabelsNodeList;
</span><span class="lines">@@ -231,27 +232,27 @@
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        for (auto it : m_atomicNameCaches)
-            it.value-&gt;invalidateCache(*oldDocument);
</del><ins>+        for (auto&amp; cache : m_atomicNameCaches.values())
+            cache-&gt;invalidateCache(*oldDocument);
</ins><span class="cx"> 
</span><del>-        for (auto it : m_nameCaches)
-            it.value-&gt;invalidateCache(*oldDocument);
</del><ins>+        for (auto&amp; cache : m_nameCaches.values())
+            cache-&gt;invalidateCache(*oldDocument);
</ins><span class="cx"> 
</span><del>-        for (auto it : m_tagNodeListCacheNS) {
-            LiveNodeList&amp; list = *it.value;
-            ASSERT(!list.isRootedAtDocument());
-            list.invalidateCache(*oldDocument);
</del><ins>+        for (auto&amp; list : m_tagNodeListCacheNS.values()) {
+            ASSERT(!list-&gt;isRootedAtDocument());
+            list-&gt;invalidateCache(*oldDocument);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><del>-        for (auto it : m_cachedCollections)
-            it.value-&gt;invalidateCache(*oldDocument);
</del><ins>+        for (auto&amp; collection : m_cachedCollections.values())
+            collection-&gt;invalidateCache(*oldDocument);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     NodeListsNodeData()
</span><span class="cx">         : m_childNodeList(nullptr)
</span><span class="cx">         , m_emptyChildNodeList(nullptr)
</span><del>-    { }
</del><ins>+    {
+    }
</ins><span class="cx"> 
</span><span class="cx">     std::pair&lt;unsigned char, AtomicString&gt; namedCollectionKey(CollectionType type, const AtomicString&amp; name)
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLTableRowsCollectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLTableRowsCollection.cpp (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLTableRowsCollection.cpp        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebCore/html/HTMLTableRowsCollection.cpp        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -122,25 +122,25 @@
</span><span class="cx"> 
</span><span class="cx"> HTMLTableRowElement* HTMLTableRowsCollection::lastRow(HTMLTableElement* table)
</span><span class="cx"> {
</span><del>-    for (auto child = ElementTraversal::lastChild(table); child; child = ElementTraversal::previousSibling(child)) {
</del><ins>+    for (auto* child = ElementTraversal::lastChild(table); child; child = ElementTraversal::previousSibling(child)) {
</ins><span class="cx">         if (child-&gt;hasTagName(tfootTag)) {
</span><del>-            if (auto row = childrenOfType&lt;HTMLTableRowElement&gt;(*child).last())
</del><ins>+            if (auto* row = childrenOfType&lt;HTMLTableRowElement&gt;(*child).last())
</ins><span class="cx">                 return row;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    for (auto child = ElementTraversal::lastChild(table); child; child = ElementTraversal::previousSibling(child)) {
</del><ins>+    for (auto* child = ElementTraversal::lastChild(table); child; child = ElementTraversal::previousSibling(child)) {
</ins><span class="cx">         if (isHTMLTableRowElement(child))
</span><span class="cx">             return toHTMLTableRowElement(child);
</span><span class="cx">         if (child-&gt;hasTagName(tbodyTag)) {
</span><del>-            if (auto row = childrenOfType&lt;HTMLTableRowElement&gt;(*child).last())
</del><ins>+            if (auto* row = childrenOfType&lt;HTMLTableRowElement&gt;(*child).last())
</ins><span class="cx">                 return row;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    for (auto child = ElementTraversal::lastChild(table); child; child = ElementTraversal::previousSibling(child)) {
</del><ins>+    for (auto* child = ElementTraversal::lastChild(table); child; child = ElementTraversal::previousSibling(child)) {
</ins><span class="cx">         if (child-&gt;hasTagName(theadTag)) {
</span><del>-            if (auto row = childrenOfType&lt;HTMLTableRowElement&gt;(*child).last())
</del><ins>+            if (auto* row = childrenOfType&lt;HTMLTableRowElement&gt;(*child).last())
</ins><span class="cx">                 return row;
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorNodeFindercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorNodeFinder.cpp (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorNodeFinder.cpp        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebCore/inspector/InspectorNodeFinder.cpp        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> void InspectorNodeFinder::searchUsingDOMTreeTraversal(Node* parentNode)
</span><span class="cx"> {
</span><span class="cx">     // Manual plain text search.
</span><del>-    for (auto node = parentNode; node; node = NodeTraversal::next(node, parentNode)) {
</del><ins>+    for (auto* node = parentNode; node; node = NodeTraversal::next(node, parentNode)) {
</ins><span class="cx">         switch (node-&gt;nodeType()) {
</span><span class="cx">         case Node::TEXT_NODE:
</span><span class="cx">         case Node::COMMENT_NODE:
</span></span></pre></div>
<a id="trunkSourceWebCorepageiosFrameIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ios/FrameIOS.mm (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ios/FrameIOS.mm        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebCore/page/ios/FrameIOS.mm        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -759,7 +759,7 @@
</span><span class="cx">     // The number of interpretations will be i1 * i2 * ... * iN, where iX is the number of interpretations for the Xth phrase with alternatives.
</span><span class="cx">     size_t interpretationsCount = 1;
</span><span class="cx"> 
</span><del>-    for (auto marker : markersInRoot)
</del><ins>+    for (auto* marker : markersInRoot)
</ins><span class="cx">         interpretationsCount *= marker-&gt;alternatives().size() + 1;
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;Vector&lt;UChar&gt;&gt; interpretations;
</span><span class="lines">@@ -771,8 +771,7 @@
</span><span class="cx"> 
</span><span class="cx">     Node* pastLastNode = rangeOfRootContents-&gt;pastLastNode();
</span><span class="cx">     for (Node* node = rangeOfRootContents-&gt;firstNode(); node != pastLastNode; node = NodeTraversal::next(node)) {
</span><del>-        const Vector&lt;DocumentMarker*&gt;&amp; markers = document()-&gt;markers().markersFor(node, DocumentMarker::MarkerTypes(DocumentMarker::DictationPhraseWithAlternatives));
-        for (auto marker : markers) {
</del><ins>+        for (auto* marker : document()-&gt;markers().markersFor(node, DocumentMarker::MarkerTypes(DocumentMarker::DictationPhraseWithAlternatives))) {
</ins><span class="cx">             // First, add text that precede the marker.
</span><span class="cx">             if (precedingTextStartPosition != createLegacyEditingPosition(node, marker-&gt;startOffset())) {
</span><span class="cx">                 RefPtr&lt;Range&gt; precedingTextRange = Range::create(*document(), precedingTextStartPosition, createLegacyEditingPosition(node, marker-&gt;startOffset()));
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformFileChoosercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/FileChooser.cpp (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/FileChooser.cpp        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebCore/platform/FileChooser.cpp        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -70,12 +70,13 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;FileChooserFileInfo&gt; files;
</span><del>-    for (unsigned i = 0; i &lt; filenames.size(); ++i)
-        files.append(FileChooserFileInfo(filenames[i]));
</del><ins>+    for (auto&amp; filename : filenames)
+        files.append(FileChooserFileInfo(filename));
</ins><span class="cx">     m_client-&gt;filesChosen(files);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><ins>+
</ins><span class="cx"> // FIXME: This function is almost identical to FileChooser::chooseFiles(). We should merge this function
</span><span class="cx"> // with FileChooser::chooseFiles() and hence remove the PLATFORM(IOS)-guard.
</span><span class="cx"> void FileChooser::chooseMediaFiles(const Vector&lt;String&gt;&amp; filenames, const String&amp; displayString, Icon* icon)
</span><span class="lines">@@ -88,19 +89,20 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;FileChooserFileInfo&gt; files;
</span><del>-    for (auto filename : filenames)
</del><ins>+    for (auto&amp; filename : filenames)
</ins><span class="cx">         files.append(FileChooserFileInfo(filename));
</span><span class="cx">     m_client-&gt;filesChosen(files, displayString, icon);
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> void FileChooser::chooseFiles(const Vector&lt;FileChooserFileInfo&gt;&amp; files)
</span><span class="cx"> {
</span><del>-    // FIXME: This is inelegant. We should not be looking at settings here.
</del><span class="cx">     Vector&lt;String&gt; paths;
</span><del>-    for (unsigned i = 0; i &lt; files.size(); ++i)
-        paths.append(files[i].path);
</del><ins>+    for (auto&amp; file : files)
+        paths.append(file.path);
</ins><span class="cx"> 
</span><ins>+    // FIXME: This is inelegant. We should not be looking at settings here.
</ins><span class="cx">     if (m_settings.selectedFiles == paths)
</span><span class="cx">         return;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationobjcSourceBufferPrivateAVFObjCmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -695,7 +695,7 @@
</span><span class="cx"> 
</span><span class="cx"> IntSize SourceBufferPrivateAVFObjC::naturalSize()
</span><span class="cx"> {
</span><del>-    for (auto videoTrack : m_videoTracks) {
</del><ins>+    for (auto&amp; videoTrack : m_videoTracks) {
</ins><span class="cx">         if (videoTrack-&gt;selected())
</span><span class="cx">             return videoTrack-&gt;naturalSize();
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderIteratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderIterator.h (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderIterator.h        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebCore/rendering/RenderIterator.h        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #ifndef RenderIterator_h
</span><span class="cx"> #define RenderIterator_h
</span><span class="cx"> 
</span><del>-#include &quot;RenderObject.h&quot;
</del><ins>+#include &quot;RenderElement.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGResourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResource.cpp        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -173,8 +173,8 @@
</span><span class="cx">     HashSet&lt;SVGElement*&gt;* dependencies = renderer.document().accessSVGExtensions()-&gt;setOfElementsReferencingTarget(toSVGElement(renderer.element()));
</span><span class="cx">     if (!dependencies)
</span><span class="cx">         return;
</span><del>-    for (auto element : *dependencies) {
-        if (auto renderer = element-&gt;renderer())
</del><ins>+    for (auto* element : *dependencies) {
+        if (auto* renderer = element-&gt;renderer())
</ins><span class="cx">             RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer, needsLayout);
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGResourceContainercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">     bool needsLayout = mode == LayoutAndBoundariesInvalidation;
</span><span class="cx">     bool markForInvalidation = mode != ParentOnlyInvalidation;
</span><span class="cx"> 
</span><del>-    for (auto client : m_clients) {
</del><ins>+    for (auto* client : m_clients) {
</ins><span class="cx">         if (client-&gt;isSVGResourceContainer()) {
</span><span class="cx">             toRenderSVGResourceContainer(*client).removeAllClientsFromCache(markForInvalidation);
</span><span class="cx">             continue;
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx"> void RenderSVGResourceContainer::markAllClientLayersForInvalidation()
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><del>-    for (auto clientLayer : m_clientLayers)
</del><ins>+    for (auto* clientLayer : m_clientLayers)
</ins><span class="cx">         clientLayer-&gt;filterNeedsRepaint();
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="lines">@@ -176,11 +176,10 @@
</span><span class="cx">     extensions.addResource(m_id, this);
</span><span class="cx"> 
</span><span class="cx">     // Update cached resources of pending clients.
</span><del>-    auto end = clients-&gt;end();
-    for (auto it = clients-&gt;begin(); it != end; ++it) {
-        ASSERT((*it)-&gt;hasPendingResources());
-        extensions.clearHasPendingResourcesIfPossible(*it);
-        auto renderer = (*it)-&gt;renderer();
</del><ins>+    for (auto* client : *clients) {
+        ASSERT(client-&gt;hasPendingResources());
+        extensions.clearHasPendingResourcesIfPossible(client);
+        auto* renderer = client-&gt;renderer();
</ins><span class="cx">         if (!renderer)
</span><span class="cx">             continue;
</span><span class="cx">         SVGResourcesCache::clientStyleChanged(*renderer, StyleDifferenceLayout, renderer-&gt;style());
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGRenderSupportcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -226,7 +226,7 @@
</span><span class="cx">     bool transformChanged = transformToRootChanged(&amp;start);
</span><span class="cx">     bool hasSVGShadow = rendererHasSVGShadow(start);
</span><span class="cx">     bool needsBoundariesUpdate = start.needsBoundariesUpdate();
</span><del>-    HashSet&lt;RenderObject*&gt; notlayoutedObjects;
</del><ins>+    HashSet&lt;RenderElement*&gt; elementsThatDidNotReceiveLayout;
</ins><span class="cx"> 
</span><span class="cx">     for (RenderObject* child = start.firstChild(); child; child = child-&gt;nextSibling()) {
</span><span class="cx">         bool needsLayout = selfNeedsLayout;
</span><span class="lines">@@ -274,22 +274,20 @@
</span><span class="cx">             // parent containers call repaint().  (RenderBlock::layout* has similar logic.)
</span><span class="cx">             if (!childEverHadLayout)
</span><span class="cx">                 child-&gt;repaint();
</span><del>-        } else if (layoutSizeChanged)
-            notlayoutedObjects.add(child);
</del><ins>+        } else if (layoutSizeChanged &amp;&amp; child-&gt;isRenderElement())
+            elementsThatDidNotReceiveLayout.add(toRenderElement(child));
</ins><span class="cx"> 
</span><span class="cx">         ASSERT(!child-&gt;needsLayout());
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!layoutSizeChanged) {
</span><del>-        ASSERT(notlayoutedObjects.isEmpty());
</del><ins>+        ASSERT(elementsThatDidNotReceiveLayout.isEmpty());
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // If the layout size changed, invalidate all resources of all children that didn't go through the layout() code path.
</span><del>-    for (auto child : notlayoutedObjects) {
-        if (child-&gt;isRenderElement())
-            invalidateResourcesOfChildren(toRenderElement(*child));
-    }
</del><ins>+    for (auto* element : elementsThatDidNotReceiveLayout)
+        invalidateResourcesOfChildren(*element);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool SVGRenderSupport::isOverflowHidden(const RenderElement&amp; renderer)
</span><span class="lines">@@ -428,8 +426,8 @@
</span><span class="cx">     else {
</span><span class="cx">         DashArray dashArray;
</span><span class="cx">         dashArray.reserveInitialCapacity(dashes.size());
</span><del>-        for (unsigned i = 0, size = dashes.size(); i &lt; size; ++i)
-            dashArray.uncheckedAppend(dashes[i].value(lengthContext));
</del><ins>+        for (auto&amp; dash : dashes)
+            dashArray.uncheckedAppend(dash.value(lengthContext));
</ins><span class="cx"> 
</span><span class="cx">         context-&gt;setLineDash(dashArray, svgStyle.strokeDashOffset().value(lengthContext));
</span><span class="cx">     }
</span><span class="lines">@@ -465,7 +463,7 @@
</span><span class="cx">     ASSERT(renderer.element()-&gt;isSVGElement());
</span><span class="cx"> 
</span><span class="cx">     bool maskedAncestorShouldIsolateBlending = renderer.style().hasBlendMode();
</span><del>-    for (auto ancestor = renderer.element()-&gt;parentElement(); ancestor &amp;&amp; ancestor-&gt;isSVGElement(); ancestor = ancestor-&gt;parentElement()) {
</del><ins>+    for (auto* ancestor = renderer.element()-&gt;parentElement(); ancestor &amp;&amp; ancestor-&gt;isSVGElement(); ancestor = ancestor-&gt;parentElement()) {
</ins><span class="cx">         if (!toSVGElement(ancestor)-&gt;isSVGGraphicsElement() || !isolatesBlending(*ancestor-&gt;computedStyle()))
</span><span class="cx">             continue;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGResourcesCycleSolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx"> // Set to a value &gt; 0, to debug the resource cache.
</span><span class="cx"> #define DEBUG_CYCLE_DETECTION 0
</span><span class="cx"> 
</span><del>-#include &quot;RenderElement.h&quot;
-#include &quot;RenderIterator.h&quot;
</del><ins>+#include &quot;RenderAncestorIterator.h&quot;
</ins><span class="cx"> #include &quot;RenderSVGResourceClipper.h&quot;
</span><span class="cx"> #include &quot;RenderSVGResourceFilter.h&quot;
</span><span class="cx"> #include &quot;RenderSVGResourceMarker.h&quot;
</span><span class="lines">@@ -56,7 +55,7 @@
</span><span class="cx">         resources-&gt;buildSetOfResources(resourceSet);
</span><span class="cx"> 
</span><span class="cx">         // Walk all resources and check wheter they reference any resource contained in the resources set.
</span><del>-        for (auto resource : resourceSet) {
</del><ins>+        for (auto* resource : resourceSet) {
</ins><span class="cx">             if (m_allResources.contains(resource))
</span><span class="cx">                 return true;
</span><span class="cx">         }
</span><span class="lines">@@ -75,7 +74,7 @@
</span><span class="cx">         childResources-&gt;buildSetOfResources(childResourceSet);
</span><span class="cx"> 
</span><span class="cx">         // Walk all child resources and check wheter they reference any resource contained in the resources set.
</span><del>-        for (auto&amp; resource : childResourceSet) {
</del><ins>+        for (auto* resource : childResourceSet) {
</ins><span class="cx">             if (m_allResources.contains(resource))
</span><span class="cx">                 return true;
</span><span class="cx">         }
</span><span class="lines">@@ -103,31 +102,27 @@
</span><span class="cx">     ASSERT(!localResources.isEmpty());
</span><span class="cx"> 
</span><span class="cx">     // Add all parent resource containers to the HashSet.
</span><del>-    HashSet&lt;RenderSVGResourceContainer*&gt; parentResources;
-    auto parent = m_renderer.parent();
-    while (parent) {
-        if (parent-&gt;isSVGResourceContainer())
-            parentResources.add(toRenderSVGResourceContainer(parent));
-        parent = parent-&gt;parent();
-    }
</del><ins>+    HashSet&lt;RenderSVGResourceContainer*&gt; ancestorResources;
+    for (auto&amp; resource : ancestorsOfType&lt;RenderSVGResourceContainer&gt;(m_renderer))
+        ancestorResources.add(&amp;resource);
</ins><span class="cx"> 
</span><span class="cx"> #if DEBUG_CYCLE_DETECTION &gt; 0
</span><span class="cx">     fprintf(stderr, &quot;\nDetecting wheter any resources references any of following objects:\n&quot;);
</span><span class="cx">     {
</span><span class="cx">         fprintf(stderr, &quot;Local resources:\n&quot;);
</span><del>-        for (auto it = localResources.begin(), end = localResources.end(); it != end; ++it)
-            fprintf(stderr, &quot;|&gt; %s: object=%p (node=%p)\n&quot;, (*it)-&gt;renderName(), *it, (*it)-&gt;node());
</del><ins>+        for (auto* resource : localResources)
+            fprintf(stderr, &quot;|&gt; %s: object=%p (node=%p)\n&quot;, resource-&gt;renderName(), resource, resource-&gt;node());
</ins><span class="cx"> 
</span><span class="cx">         fprintf(stderr, &quot;Parent resources:\n&quot;);
</span><del>-        for (auto it = parentResources.begin(), end = parentResources.end(); it != end; ++it)
-            fprintf(stderr, &quot;|&gt; %s: object=%p (node=%p)\n&quot;, (*it)-&gt;renderName(), *it, (*it)-&gt;node());
</del><ins>+        for (auto* resource : ancestorResources)
+            fprintf(stderr, &quot;|&gt; %s: object=%p (node=%p)\n&quot;, resource-&gt;renderName(), resource, resource-&gt;node());
</ins><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     // Build combined set of local and parent resources.
</span><span class="cx">     m_allResources = localResources;
</span><del>-    for (auto it = parentResources.begin(), end = parentResources.end(); it != end; ++it)
-        m_allResources.add(*it);
</del><ins>+    for (auto* resource : ancestorResources)
+        m_allResources.add(resource);
</ins><span class="cx"> 
</span><span class="cx">     // If we're a resource, add ourselves to the HashSet.
</span><span class="cx">     if (m_renderer.isSVGResourceContainer())
</span><span class="lines">@@ -137,10 +132,9 @@
</span><span class="cx"> 
</span><span class="cx">     // The job of this function is to determine wheter any of the 'resources' associated with the given 'renderer'
</span><span class="cx">     // references us (or wheter any of its kids references us) -&gt; that's a cycle, we need to find and break it.
</span><del>-    for (auto it = localResources.begin(), end = localResources.end(); it != end; ++it) {
-        RenderSVGResourceContainer&amp; resource = **it;
-        if (parentResources.contains(&amp;resource) || resourceContainsCycles(resource))
-            breakCycle(resource);
</del><ins>+    for (auto* resource : localResources) {
+        if (ancestorResources.contains(resource) || resourceContainsCycles(*resource))
+            breakCycle(*resource);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if DEBUG_CYCLE_DETECTION &gt; 0
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimateMotionElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimateMotionElement.cpp (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimateMotionElement.cpp        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebCore/svg/SVGAnimateMotionElement.cpp        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -295,7 +295,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     // ...except in case where we have additional instances in &lt;use&gt; trees.
</span><del>-    for (auto instance : targetElement-&gt;instancesForElement()) {
</del><ins>+    for (auto* instance : targetElement-&gt;instancesForElement()) {
</ins><span class="cx">         SVGElement* shadowTreeElement = instance-&gt;shadowTreeElement();
</span><span class="cx">         ASSERT(shadowTreeElement);
</span><span class="cx">         AffineTransform* transform = shadowTreeElement-&gt;supplementalTransform();
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGPathElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGPathElement.cpp (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGPathElement.cpp        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebCore/svg/SVGPathElement.cpp        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -284,7 +284,7 @@
</span><span class="cx">     // &lt;mpath&gt; can only reference &lt;path&gt; but this dependency is not handled in
</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><del>-        for (auto element : *dependencies) {
</del><ins>+        for (auto* element : *dependencies) {
</ins><span class="cx">             if (element-&gt;hasTagName(SVGNames::mpathTag))
</span><span class="cx">                 toSVGMPathElement(element)-&gt;targetPathChanged();
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2014-03-10  Darin Adler  &lt;darin@apple.com&gt;
+
+        Avoid copy-prone idiom &quot;for (auto item : collection)&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=129990
+
+        Reviewed by Geoffrey Garen.
+
+        * WebView/WebFrame.mm:
+        (-[WebFrame _documentFragmentWithNodesAsParagraphs:]):
+        Use auto*. Also removed uneeded ASSERT_NO_EXCEPTION, which is already
+        the default without specifying it explicitly.
+
</ins><span class="cx"> 2014-03-12  Brian Burg  &lt;bburg@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Remove unused callId parameter from evaluateInWebInspector
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebFramemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebFrame.mm (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebFrame.mm        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebKit/mac/WebView/WebFrame.mm        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -901,10 +901,10 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;DocumentFragment&gt; fragment = document-&gt;createDocumentFragment();
</span><span class="cx"> 
</span><del>-    for (auto node : nodesVector) {
</del><ins>+    for (auto* node : nodesVector) {
</ins><span class="cx">         RefPtr&lt;Element&gt; element = createDefaultParagraphElement(*document);
</span><del>-        element-&gt;appendChild(node, ASSERT_NO_EXCEPTION);
-        fragment-&gt;appendChild(element.release(), ASSERT_NO_EXCEPTION);
</del><ins>+        element-&gt;appendChild(node);
+        fragment-&gt;appendChild(element.release());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return kit(fragment.release().get());
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebKit2/ChangeLog        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2014-03-10  Darin Adler  &lt;darin@apple.com&gt;
+
+        Avoid copy-prone idiom &quot;for (auto item : collection)&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=129990
+
+        Reviewed by Geoffrey Garen.
+
+        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
+        (WebKit::RemoteLayerTreePropertyApplier::applyProperties): Use auto&amp;.
+
+        * Shared/mac/RemoteLayerTreeTransaction.mm:
+        (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): Use auto&amp;
+        even though the type is a scalar. This does no harm and makes it easier
+        to spot uses that trigger unnecessary copying with grep.
+        (WebKit::RemoteLayerTreeTransaction::decode): Ditto.
+        (WebKit::dumpChangedLayers): Ditto.
+        * UIProcess/mac/RemoteLayerTreeHost.mm:
+        (WebKit::RemoteLayerTreeHost::updateLayerTree): Ditto.
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::visitedLinkStateChanged): Ditto.
+
</ins><span class="cx"> 2014-03-12  Brian Burg  &lt;bburg@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Remove unused callId parameter from evaluateInWebInspector
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacRemoteLayerTreePropertyAppliermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -240,7 +240,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (properties.changedProperties &amp; RemoteLayerTreeTransaction::ChildrenChanged) {
</span><span class="cx">         RetainPtr&lt;NSMutableArray&gt; children = adoptNS([[NSMutableArray alloc] initWithCapacity:properties.children.size()]);
</span><del>-        for (auto child : properties.children) {
</del><ins>+        for (auto&amp; child : properties.children) {
</ins><span class="cx">             ASSERT(relatedLayers.get(child));
</span><span class="cx">             [children addObject:relatedLayers.get(child)];
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacRemoteLayerTreeTransactionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -240,7 +240,7 @@
</span><span class="cx">         if (!decoder.decode(result.children))
</span><span class="cx">             return false;
</span><span class="cx"> 
</span><del>-        for (auto layerID : result.children) {
</del><ins>+        for (auto&amp; layerID : result.children) {
</ins><span class="cx">             if (!layerID)
</span><span class="cx">                 return false;
</span><span class="cx">         }
</span><span class="lines">@@ -455,7 +455,7 @@
</span><span class="cx">     if (!decoder.decode(result.m_destroyedLayerIDs))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    for (auto layerID : result.m_destroyedLayerIDs) {
</del><ins>+    for (auto&amp; layerID : result.m_destroyedLayerIDs) {
</ins><span class="cx">         if (!layerID)
</span><span class="cx">             return false;
</span><span class="cx">     }
</span><span class="lines">@@ -699,7 +699,7 @@
</span><span class="cx">     copyKeysToVector(changedLayerProperties, layerIDs);
</span><span class="cx">     std::sort(layerIDs.begin(), layerIDs.end());
</span><span class="cx"> 
</span><del>-    for (auto layerID : layerIDs) {
</del><ins>+    for (auto&amp; layerID : layerIDs) {
</ins><span class="cx">         const RemoteLayerTreeTransaction::LayerProperties&amp; layerProperties = *changedLayerProperties.get(layerID);
</span><span class="cx"> 
</span><span class="cx">         ts &lt;&lt; &quot;\n&quot;;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacRemoteLayerTreeHostmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx">             RemoteLayerTreePropertyApplier::applyProperties(layer, properties, relatedLayers);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    for (auto destroyedLayer : transaction.destroyedLayers())
</del><ins>+    for (auto&amp; destroyedLayer : transaction.destroyedLayers())
</ins><span class="cx">         m_layers.remove(destroyedLayer);
</span><span class="cx"> 
</span><span class="cx">     return rootLayerChanged;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (165545 => 165546)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2014-03-13 17:47:53 UTC (rev 165545)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2014-03-13 17:51:59 UTC (rev 165546)
</span><span class="lines">@@ -514,7 +514,7 @@
</span><span class="cx">     // FIXME: We may want to track visited links per WebPageGroup rather than per WebContext.
</span><span class="cx">     for (const auto&amp; webPage : m_pageMap.values()) {
</span><span class="cx">         if (Page* page = webPage-&gt;corePage()) {
</span><del>-            for (auto linkHash : linkHashes)
</del><ins>+            for (auto&amp; linkHash : linkHashes)
</ins><span class="cx">                 page-&gt;invalidateStylesForLink(linkHash);
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre>
</div>
</div>

</body>
</html>