<!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>[175361] 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/175361">175361</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-10-29 18:18:32 -0700 (Wed, 29 Oct 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[CoordinatedGraphics] Use modern for-loops
https://bugs.webkit.org/show_bug.cgi?id=138168

Patch by Hunseop Jeong &lt;hs85.jeong@samsung.com&gt; on 2014-10-29
Reviewed by Andreas Kling.

No new tests as there is no change in functionality.

Source/WebCore:

* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Use a modern for loop.
(WebCore::CompositingCoordinator::renderNextFrame):
(WebCore::CompositingCoordinator::paintToSurface):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: Use a modern for loop.
(WebCore::CoordinatedGraphicsLayer::setShouldUpdateVisibleRect):
(WebCore::CoordinatedGraphicsLayer::flushCompositingState):
(WebCore::CoordinatedGraphicsLayer::syncChildren):
(WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
(WebCore::CoordinatedGraphicsLayer::findFirstDescendantWithContentsRecursively):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers):
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp: Use a modern for loop.
(WebCore::CoordinatedImageBacking::updateVisibilityIfNeeded):

Source/WebKit2:

* UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp: Use a modern for loop.
(WebCore::CoordinatedBackingStore::texture):
(WebCore::CoordinatedBackingStore::paintTilesToTextureMapper):
* UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp: Use a modern for loop.
(WebKit::CoordinatedDrawingAreaProxy::incorporateUpdate):
* UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: Use a modern for loop.
(WebCore::CoordinatedGraphicsScene::setLayerChildrenIfNeeded):
(WebCore::CoordinatedGraphicsScene::createLayers): changed the name of argument to be equal with deleteLayer().
(WebCore::CoordinatedGraphicsScene::deleteLayers):
(WebCore::CoordinatedGraphicsScene::createTilesIfNeeded):
(WebCore::CoordinatedGraphicsScene::removeTilesIfNeeded):
(WebCore::CoordinatedGraphicsScene::updateTilesIfNeeded):
(WebCore::CoordinatedGraphicsScene::syncUpdateAtlases):
(WebCore::CoordinatedGraphicsScene::syncImageBackings):
(WebCore::CoordinatedGraphicsScene::commitSceneState):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp: Use a modern for loop.
(WebKit::shouldPaintBoundsRect):
(WebKit::CoordinatedDrawingArea::display):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapcoordinatedCompositingCoordinatorcpp">trunk/Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedGraphicsLayercpp">trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedImageBackingcpp">trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCoordinatedGraphicsCoordinatedBackingStorecpp">trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCoordinatedGraphicsCoordinatedDrawingAreaProxycpp">trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCoordinatedGraphicsCoordinatedGraphicsScenecpp">trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageCoordinatedGraphicsCoordinatedDrawingAreacpp">trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (175360 => 175361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-10-30 01:06:09 UTC (rev 175360)
+++ trunk/Source/WebCore/ChangeLog        2014-10-30 01:18:32 UTC (rev 175361)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2014-10-29  Hunseop Jeong  &lt;hs85.jeong@samsung.com&gt;
+
+        [CoordinatedGraphics] Use modern for-loops
+        https://bugs.webkit.org/show_bug.cgi?id=138168
+
+        Reviewed by Andreas Kling.
+
+        No new tests as there is no change in functionality.
+
+        * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Use a modern for loop.
+        (WebCore::CompositingCoordinator::renderNextFrame):
+        (WebCore::CompositingCoordinator::paintToSurface):
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: Use a modern for loop.
+        (WebCore::CoordinatedGraphicsLayer::setShouldUpdateVisibleRect):
+        (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
+        (WebCore::CoordinatedGraphicsLayer::syncChildren):
+        (WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
+        (WebCore::CoordinatedGraphicsLayer::findFirstDescendantWithContentsRecursively):
+        (WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers):
+        * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp: Use a modern for loop.
+        (WebCore::CoordinatedImageBacking::updateVisibilityIfNeeded):
+
</ins><span class="cx"> 2014-10-29  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Final-ize more of TextFieldInputType's virtual functions
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapcoordinatedCompositingCoordinatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp (175360 => 175361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp        2014-10-30 01:06:09 UTC (rev 175360)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp        2014-10-30 01:18:32 UTC (rev 175361)
</span><span class="lines">@@ -356,8 +356,8 @@
</span><span class="cx"> 
</span><span class="cx"> void CompositingCoordinator::renderNextFrame()
</span><span class="cx"> {
</span><del>-    for (unsigned i = 0; i &lt; m_updateAtlases.size(); ++i)
-        m_updateAtlases[i]-&gt;didSwapBuffers();
</del><ins>+    for (auto&amp; atlas : m_updateAtlases)
+        atlas-&gt;didSwapBuffers();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CompositingCoordinator::purgeBackingStores()
</span><span class="lines">@@ -373,8 +373,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool CompositingCoordinator::paintToSurface(const IntSize&amp; size, CoordinatedSurface::Flags flags, uint32_t&amp; atlasID, IntPoint&amp; offset, CoordinatedSurface::Client* client)
</span><span class="cx"> {
</span><del>-    for (unsigned i = 0; i &lt; m_updateAtlases.size(); ++i) {
-        UpdateAtlas* atlas = m_updateAtlases[i].get();
</del><ins>+    for (auto&amp; updateAtlas : m_updateAtlases) {
+        UpdateAtlas* atlas = updateAtlas.get();
</ins><span class="cx">         if (atlas-&gt;supportsAlpha() == (flags &amp; CoordinatedSurface::SupportsAlpha)) {
</span><span class="cx">             // This will be false if there is no available buffer space.
</span><span class="cx">             if (atlas-&gt;paintOnAvailableBuffer(size, atlasID, offset, client))
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedGraphicsLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (175360 => 175361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp        2014-10-30 01:06:09 UTC (rev 175360)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp        2014-10-30 01:18:32 UTC (rev 175361)
</span><span class="lines">@@ -91,8 +91,8 @@
</span><span class="cx"> void CoordinatedGraphicsLayer::setShouldUpdateVisibleRect()
</span><span class="cx"> {
</span><span class="cx">     m_shouldUpdateVisibleRect = true;
</span><del>-    for (size_t i = 0; i &lt; children().size(); ++i)
-        toCoordinatedGraphicsLayer(children()[i])-&gt;setShouldUpdateVisibleRect();
</del><ins>+    for (auto&amp; child : children())
+        toCoordinatedGraphicsLayer(child)-&gt;setShouldUpdateVisibleRect();
</ins><span class="cx">     if (replicaLayer())
</span><span class="cx">         toCoordinatedGraphicsLayer(replicaLayer())-&gt;setShouldUpdateVisibleRect();
</span><span class="cx"> }
</span><span class="lines">@@ -598,8 +598,8 @@
</span><span class="cx"> 
</span><span class="cx">     flushCompositingStateForThisLayerOnly();
</span><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; children().size(); ++i)
-        children()[i]-&gt;flushCompositingState(rect);
</del><ins>+    for (auto&amp; child : children())
+        child-&gt;flushCompositingState(rect);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> CoordinatedGraphicsLayer* toCoordinatedGraphicsLayer(GraphicsLayer* layer)
</span><span class="lines">@@ -614,8 +614,8 @@
</span><span class="cx">     m_shouldSyncChildren = false;
</span><span class="cx">     m_layerState.childrenChanged = true;
</span><span class="cx">     m_layerState.children.clear();
</span><del>-    for (size_t i = 0; i &lt; children().size(); ++i)
-        m_layerState.children.append(toCoordinatedLayerID(children()[i]));
</del><ins>+    for (auto&amp; child : children())
+        m_layerState.children.append(toCoordinatedLayerID(child));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CoordinatedGraphicsLayer::syncFilters()
</span><span class="lines">@@ -802,8 +802,8 @@
</span><span class="cx">     if (maskLayer())
</span><span class="cx">         toCoordinatedGraphicsLayer(maskLayer())-&gt;syncPendingStateChangesIncludingSubLayers();
</span><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; children().size(); ++i)
-        toCoordinatedGraphicsLayer(children()[i])-&gt;syncPendingStateChangesIncludingSubLayers();
</del><ins>+    for (auto&amp; child : children())
+        toCoordinatedGraphicsLayer(child)-&gt;syncPendingStateChangesIncludingSubLayers();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CoordinatedGraphicsLayer::resetLayerState()
</span><span class="lines">@@ -842,8 +842,8 @@
</span><span class="cx">     if (shouldHaveBackingStore())
</span><span class="cx">         return this;
</span><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; children().size(); ++i) {
-        CoordinatedGraphicsLayer* layer = toCoordinatedGraphicsLayer(children()[i])-&gt;findFirstDescendantWithContentsRecursively();
</del><ins>+    for (auto&amp; child : children()) {
+        CoordinatedGraphicsLayer* layer = toCoordinatedGraphicsLayer(child)-&gt;findFirstDescendantWithContentsRecursively();
</ins><span class="cx">         if (layer)
</span><span class="cx">             return layer;
</span><span class="cx">     }
</span><span class="lines">@@ -1003,8 +1003,8 @@
</span><span class="cx"> 
</span><span class="cx">     updateContentBuffers();
</span><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; children().size(); ++i)
-        toCoordinatedGraphicsLayer(children()[i])-&gt;updateContentBuffersIncludingSubLayers();
</del><ins>+    for (auto&amp; child : children())
+        toCoordinatedGraphicsLayer(child)-&gt;updateContentBuffersIncludingSubLayers();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CoordinatedGraphicsLayer::updateContentBuffers()
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedImageBackingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp (175360 => 175361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp        2014-10-30 01:06:09 UTC (rev 175360)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp        2014-10-30 01:18:32 UTC (rev 175361)
</span><span class="lines">@@ -151,8 +151,8 @@
</span><span class="cx">     bool previousIsVisible = m_isVisible;
</span><span class="cx"> 
</span><span class="cx">     m_isVisible = false;
</span><del>-    for (size_t i = 0; i &lt; m_hosts.size(); ++i) {
-        if (m_hosts[i]-&gt;imageBackingVisible()) {
</del><ins>+    for (auto&amp; host : m_hosts) {
+        if (host-&gt;imageBackingVisible()) {
</ins><span class="cx">             m_isVisible = true;
</span><span class="cx">             break;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (175360 => 175361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-10-30 01:06:09 UTC (rev 175360)
+++ trunk/Source/WebKit2/ChangeLog        2014-10-30 01:18:32 UTC (rev 175361)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2014-10-29  Hunseop Jeong  &lt;hs85.jeong@samsung.com&gt;
+
+        [CoordinatedGraphics] Use modern for-loops
+        https://bugs.webkit.org/show_bug.cgi?id=138168
+
+        Reviewed by Andreas Kling.
+
+        No new tests as there is no change in functionality.
+
+        * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp: Use a modern for loop.
+        (WebCore::CoordinatedBackingStore::texture):
+        (WebCore::CoordinatedBackingStore::paintTilesToTextureMapper):
+        * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp: Use a modern for loop.
+        (WebKit::CoordinatedDrawingAreaProxy::incorporateUpdate):
+        * UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: Use a modern for loop.
+        (WebCore::CoordinatedGraphicsScene::setLayerChildrenIfNeeded):
+        (WebCore::CoordinatedGraphicsScene::createLayers): changed the name of argument to be equal with deleteLayer(). 
+        (WebCore::CoordinatedGraphicsScene::deleteLayers):
+        (WebCore::CoordinatedGraphicsScene::createTilesIfNeeded):
+        (WebCore::CoordinatedGraphicsScene::removeTilesIfNeeded):
+        (WebCore::CoordinatedGraphicsScene::updateTilesIfNeeded):
+        (WebCore::CoordinatedGraphicsScene::syncUpdateAtlases):
+        (WebCore::CoordinatedGraphicsScene::syncImageBackings):
+        (WebCore::CoordinatedGraphicsScene::commitSceneState):
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp: Use a modern for loop.
+        (WebKit::shouldPaintBoundsRect):
+        (WebKit::CoordinatedDrawingArea::display):
+
</ins><span class="cx"> 2014-10-29  Gyuyoung Kim  &lt;gyuyoung.kim@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, EFL build fix since r175349.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCoordinatedGraphicsCoordinatedBackingStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp (175360 => 175361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp        2014-10-30 01:06:09 UTC (rev 175360)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp        2014-10-30 01:18:32 UTC (rev 175361)
</span><span class="lines">@@ -91,9 +91,8 @@
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;BitmapTexture&gt; CoordinatedBackingStore::texture() const
</span><span class="cx"> {
</span><del>-    CoordinatedBackingStoreTileMap::const_iterator end = m_tiles.end();
-    for (CoordinatedBackingStoreTileMap::const_iterator it = m_tiles.begin(); it != end; ++it) {
-        RefPtr&lt;BitmapTexture&gt; texture = it-&gt;value.texture();
</del><ins>+    for (auto&amp; tile : m_tiles.values()) {
+        RefPtr&lt;BitmapTexture&gt; texture = tile.texture();
</ins><span class="cx">         if (texture)
</span><span class="cx">             return texture;
</span><span class="cx">     }
</span><span class="lines">@@ -108,8 +107,8 @@
</span><span class="cx"> 
</span><span class="cx"> void CoordinatedBackingStore::paintTilesToTextureMapper(Vector&lt;TextureMapperTile*&gt;&amp; tiles, TextureMapper* textureMapper, const TransformationMatrix&amp; transform, float opacity, const FloatRect&amp; rect)
</span><span class="cx"> {
</span><del>-    for (size_t i = 0; i &lt; tiles.size(); ++i)
-        tiles[i]-&gt;paint(textureMapper, transform, opacity, calculateExposedTileEdges(rect, tiles[i]-&gt;rect()));
</del><ins>+    for (auto&amp; tile : tiles)
+        tile-&gt;paint(textureMapper, transform, opacity, calculateExposedTileEdges(rect, tile-&gt;rect()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TransformationMatrix CoordinatedBackingStore::adjustedTransformForRect(const FloatRect&amp; targetRect)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCoordinatedGraphicsCoordinatedDrawingAreaProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp (175360 => 175361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp        2014-10-30 01:06:09 UTC (rev 175360)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp        2014-10-30 01:18:32 UTC (rev 175361)
</span><span class="lines">@@ -253,8 +253,8 @@
</span><span class="cx">     if (shouldScroll &amp;&amp; !m_webPageProxy.canScrollView())
</span><span class="cx">         m_webPageProxy.setViewNeedsDisplay(IntRect(IntPoint(), m_webPageProxy.viewSize()));
</span><span class="cx">     else {
</span><del>-        for (size_t i = 0; i &lt; updateInfo.updateRects.size(); ++i)
-            m_webPageProxy.setViewNeedsDisplay(updateInfo.updateRects[i]);
</del><ins>+        for (auto&amp; updateRect : updateInfo.updateRects)
+            m_webPageProxy.setViewNeedsDisplay(updateRect);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (shouldScroll)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCoordinatedGraphicsCoordinatedGraphicsScenecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp (175360 => 175361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp        2014-10-30 01:06:09 UTC (rev 175360)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp        2014-10-30 01:18:32 UTC (rev 175361)
</span><span class="lines">@@ -215,10 +215,9 @@
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;TextureMapperLayer*&gt; children;
</span><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; state.children.size(); ++i) {
-        CoordinatedLayerID childID = state.children[i];
-        TextureMapperLayer* child = layerByID(childID);
-        children.append(child);
</del><ins>+    for (auto&amp; child : state.children) {
+        TextureMapperLayer* childLayer = layerByID(child);
+        children.append(childLayer);
</ins><span class="cx">     }
</span><span class="cx">     layer-&gt;setChildren(children);
</span><span class="cx"> }
</span><span class="lines">@@ -322,10 +321,10 @@
</span><span class="cx">     return (id != InvalidCoordinatedLayerID) ? layerByID(id) : 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CoordinatedGraphicsScene::createLayers(const Vector&lt;CoordinatedLayerID&gt;&amp; ids)
</del><ins>+void CoordinatedGraphicsScene::createLayers(const Vector&lt;CoordinatedLayerID&gt;&amp; layerIDs)
</ins><span class="cx"> {
</span><del>-    for (size_t index = 0; index &lt; ids.size(); ++index)
-        createLayer(ids[index]);
</del><ins>+    for (auto&amp; layerID : layerIDs)
+        createLayer(layerID);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CoordinatedGraphicsScene::createLayer(CoordinatedLayerID id)
</span><span class="lines">@@ -338,8 +337,8 @@
</span><span class="cx"> 
</span><span class="cx"> void CoordinatedGraphicsScene::deleteLayers(const Vector&lt;CoordinatedLayerID&gt;&amp; layerIDs)
</span><span class="cx"> {
</span><del>-    for (size_t index = 0; index &lt; layerIDs.size(); ++index)
-        deleteLayer(layerIDs[index]);
</del><ins>+    for (auto&amp; layerID : layerIDs)
+        deleteLayer(layerID);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CoordinatedGraphicsScene::deleteLayer(CoordinatedLayerID layerID)
</span><span class="lines">@@ -412,8 +411,8 @@
</span><span class="cx">     RefPtr&lt;CoordinatedBackingStore&gt; backingStore = m_backingStores.get(layer);
</span><span class="cx">     ASSERT(backingStore);
</span><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; state.tilesToCreate.size(); ++i)
-        backingStore-&gt;createTile(state.tilesToCreate[i].tileID, state.tilesToCreate[i].scale);
</del><ins>+    for (auto&amp; tile : state.tilesToCreate)
+        backingStore-&gt;createTile(tile.tileID, tile.scale);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CoordinatedGraphicsScene::removeTilesIfNeeded(TextureMapperLayer* layer, const CoordinatedGraphicsLayerState&amp; state)
</span><span class="lines">@@ -425,8 +424,8 @@
</span><span class="cx">     if (!backingStore)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; state.tilesToRemove.size(); ++i)
-        backingStore-&gt;removeTile(state.tilesToRemove[i]);
</del><ins>+    for (auto&amp; tile : state.tilesToRemove)
+        backingStore-&gt;removeTile(tile);
</ins><span class="cx"> 
</span><span class="cx">     m_backingStoresWithPendingBuffers.add(backingStore);
</span><span class="cx"> }
</span><span class="lines">@@ -439,25 +438,24 @@
</span><span class="cx">     RefPtr&lt;CoordinatedBackingStore&gt; backingStore = m_backingStores.get(layer);
</span><span class="cx">     ASSERT(backingStore);
</span><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; state.tilesToUpdate.size(); ++i) {
-        const TileUpdateInfo&amp; tileInfo = state.tilesToUpdate[i];
-        const SurfaceUpdateInfo&amp; surfaceUpdateInfo = tileInfo.updateInfo;
</del><ins>+    for (auto&amp; tile : state.tilesToUpdate) {
+        const SurfaceUpdateInfo&amp; surfaceUpdateInfo = tile.updateInfo;
</ins><span class="cx"> 
</span><span class="cx">         SurfaceMap::iterator surfaceIt = m_surfaces.find(surfaceUpdateInfo.atlasID);
</span><span class="cx">         ASSERT(surfaceIt != m_surfaces.end());
</span><span class="cx"> 
</span><del>-        backingStore-&gt;updateTile(tileInfo.tileID, surfaceUpdateInfo.updateRect, tileInfo.tileRect, surfaceIt-&gt;value, surfaceUpdateInfo.surfaceOffset);
</del><ins>+        backingStore-&gt;updateTile(tile.tileID, surfaceUpdateInfo.updateRect, tile.tileRect, surfaceIt-&gt;value, surfaceUpdateInfo.surfaceOffset);
</ins><span class="cx">         m_backingStoresWithPendingBuffers.add(backingStore);
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CoordinatedGraphicsScene::syncUpdateAtlases(const CoordinatedGraphicsState&amp; state)
</span><span class="cx"> {
</span><del>-    for (size_t i = 0; i &lt; state.updateAtlasesToCreate.size(); ++i)
-        createUpdateAtlas(state.updateAtlasesToCreate[i].first, state.updateAtlasesToCreate[i].second);
</del><ins>+    for (auto&amp; atlas : state.updateAtlasesToCreate)
+        createUpdateAtlas(atlas.first, atlas.second);
</ins><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; state.updateAtlasesToRemove.size(); ++i)
-        removeUpdateAtlas(state.updateAtlasesToRemove[i]);
</del><ins>+    for (auto&amp; atlas : state.updateAtlasesToRemove)
+        removeUpdateAtlas(atlas);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CoordinatedGraphicsScene::createUpdateAtlas(uint32_t atlasID, PassRefPtr&lt;CoordinatedSurface&gt; surface)
</span><span class="lines">@@ -474,17 +472,17 @@
</span><span class="cx"> 
</span><span class="cx"> void CoordinatedGraphicsScene::syncImageBackings(const CoordinatedGraphicsState&amp; state)
</span><span class="cx"> {
</span><del>-    for (size_t i = 0; i &lt; state.imagesToRemove.size(); ++i)
-        removeImageBacking(state.imagesToRemove[i]);
</del><ins>+    for (auto&amp; image : state.imagesToRemove)
+        removeImageBacking(image);
</ins><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; state.imagesToCreate.size(); ++i)
-        createImageBacking(state.imagesToCreate[i]);
</del><ins>+    for (auto&amp; image : state.imagesToCreate)
+        createImageBacking(image);
</ins><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; state.imagesToUpdate.size(); ++i)
-        updateImageBacking(state.imagesToUpdate[i].first, state.imagesToUpdate[i].second);
</del><ins>+    for (auto&amp; image : state.imagesToUpdate)
+        updateImageBacking(image.first, image.second);
</ins><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; state.imagesToClear.size(); ++i)
-        clearImageBackingContents(state.imagesToClear[i]);
</del><ins>+    for (auto&amp; image : state.imagesToClear)
+        clearImageBackingContents(image);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CoordinatedGraphicsScene::createImageBacking(CoordinatedImageBackingID imageID)
</span><span class="lines">@@ -571,8 +569,8 @@
</span><span class="cx">     syncImageBackings(state);
</span><span class="cx">     syncUpdateAtlases(state);
</span><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; state.layersToUpdate.size(); ++i)
-        setLayerState(state.layersToUpdate[i].first, state.layersToUpdate[i].second);
</del><ins>+    for (auto&amp; layer : state.layersToUpdate)
+        setLayerState(layer.first, layer.second);
</ins><span class="cx"> 
</span><span class="cx">     commitPendingBackingStoreOperations();
</span><span class="cx">     removeReleasedImageBackingsIfNeeded();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageCoordinatedGraphicsCoordinatedDrawingAreacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp (175360 => 175361)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp        2014-10-30 01:06:09 UTC (rev 175360)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp        2014-10-30 01:18:32 UTC (rev 175361)
</span><span class="lines">@@ -532,8 +532,8 @@
</span><span class="cx">     // is too large, then we will do individual rect painting instead.
</span><span class="cx">     unsigned boundsArea = bounds.width() * bounds.height();
</span><span class="cx">     unsigned rectsArea = 0;
</span><del>-    for (size_t i = 0; i &lt; rects.size(); ++i)
-        rectsArea += rects[i].width() * rects[i].height();
</del><ins>+    for (auto&amp; rect : rects)
+        rectsArea += rect.width() * rect.height();
</ins><span class="cx"> 
</span><span class="cx">     double wastedSpace = 1 - (static_cast&lt;double&gt;(rectsArea) / boundsArea);
</span><span class="cx"> 
</span><span class="lines">@@ -590,9 +590,9 @@
</span><span class="cx"> 
</span><span class="cx">     graphicsContext-&gt;translate(-bounds.x(), -bounds.y());
</span><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; rects.size(); ++i) {
-        m_webPage.drawRect(*graphicsContext, rects[i]);
-        updateInfo.updateRects.append(rects[i]);
</del><ins>+    for (auto&amp; rect : rects) {
+        m_webPage.drawRect(*graphicsContext, rect);
+        updateInfo.updateRects.append(rect);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Layout can trigger more calls to setNeedsDisplay and we don't want to process them
</span></span></pre>
</div>
</div>

</body>
</html>