<!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>[184990] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/184990">184990</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-05-29 10:01:12 -0700 (Fri, 29 May 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use modern for-loops in WebCore/plugins, storage, style, testing and workers.
https://bugs.webkit.org/show_bug.cgi?id=145425

Patch by Hunseop Jeong &lt;hs85.jeong@samsung.com&gt; on 2015-05-29
Reviewed by Darin Adler.

No new tests, no behavior changes.

* plugins/DOMMimeTypeArray.cpp:
(WebCore::DOMMimeTypeArray::canGetItemsForName):
* plugins/DOMPlugin.cpp:
(WebCore::DOMPlugin::canGetItemsForName):
* plugins/DOMPluginArray.cpp:
(WebCore::DOMPluginArray::canGetItemsForName):
* plugins/PluginData.cpp:
(WebCore::PluginData::getWebVisibleMimesAndPluginIndices):
* plugins/PluginMainThreadScheduler.cpp:
(WebCore::PluginMainThreadScheduler::dispatchCallsForPlugin):
(WebCore::PluginMainThreadScheduler::dispatchCalls):
* storage/StorageEventDispatcher.cpp:
(WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
(WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
(WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames):
* storage/StorageMap.cpp:
(WebCore::StorageMap::importItems):
* style/StyleResolveTree.cpp:
(WebCore::Style::pseudoStyleCacheIsInvalid):
* testing/Internals.cpp:
(WebCore::Internals::nodesFromRect):
* workers/Worker.cpp:
(WebCore::networkStateChanged):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::importScripts):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepluginsDOMMimeTypeArraycpp">trunk/Source/WebCore/plugins/DOMMimeTypeArray.cpp</a></li>
<li><a href="#trunkSourceWebCorepluginsDOMPlugincpp">trunk/Source/WebCore/plugins/DOMPlugin.cpp</a></li>
<li><a href="#trunkSourceWebCorepluginsDOMPluginArraycpp">trunk/Source/WebCore/plugins/DOMPluginArray.cpp</a></li>
<li><a href="#trunkSourceWebCorepluginsPluginDatacpp">trunk/Source/WebCore/plugins/PluginData.cpp</a></li>
<li><a href="#trunkSourceWebCorepluginsPluginMainThreadSchedulercpp">trunk/Source/WebCore/plugins/PluginMainThreadScheduler.cpp</a></li>
<li><a href="#trunkSourceWebCorestorageStorageEventDispatchercpp">trunk/Source/WebCore/storage/StorageEventDispatcher.cpp</a></li>
<li><a href="#trunkSourceWebCorestorageStorageMapcpp">trunk/Source/WebCore/storage/StorageMap.cpp</a></li>
<li><a href="#trunkSourceWebCorestyleStyleResolveTreecpp">trunk/Source/WebCore/style/StyleResolveTree.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkercpp">trunk/Source/WebCore/workers/Worker.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerGlobalScopecpp">trunk/Source/WebCore/workers/WorkerGlobalScope.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (184989 => 184990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-05-29 16:58:51 UTC (rev 184989)
+++ trunk/Source/WebCore/ChangeLog        2015-05-29 17:01:12 UTC (rev 184990)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2015-05-29  Hunseop Jeong  &lt;hs85.jeong@samsung.com&gt;
+
+        Use modern for-loops in WebCore/plugins, storage, style, testing and workers.
+        https://bugs.webkit.org/show_bug.cgi?id=145425
+
+        Reviewed by Darin Adler.
+
+        No new tests, no behavior changes.
+
+        * plugins/DOMMimeTypeArray.cpp:
+        (WebCore::DOMMimeTypeArray::canGetItemsForName):
+        * plugins/DOMPlugin.cpp:
+        (WebCore::DOMPlugin::canGetItemsForName):
+        * plugins/DOMPluginArray.cpp:
+        (WebCore::DOMPluginArray::canGetItemsForName):
+        * plugins/PluginData.cpp:
+        (WebCore::PluginData::getWebVisibleMimesAndPluginIndices):
+        * plugins/PluginMainThreadScheduler.cpp:
+        (WebCore::PluginMainThreadScheduler::dispatchCallsForPlugin):
+        (WebCore::PluginMainThreadScheduler::dispatchCalls):
+        * storage/StorageEventDispatcher.cpp:
+        (WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
+        (WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
+        (WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames):
+        * storage/StorageMap.cpp:
+        (WebCore::StorageMap::importItems):
+        * style/StyleResolveTree.cpp:
+        (WebCore::Style::pseudoStyleCacheIsInvalid):
+        * testing/Internals.cpp:
+        (WebCore::Internals::nodesFromRect):
+        * workers/Worker.cpp:
+        (WebCore::networkStateChanged):
+        * workers/WorkerGlobalScope.cpp:
+        (WebCore::WorkerGlobalScope::importScripts):
+
</ins><span class="cx"> 2015-05-29  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed build fix when using content extensions debugging.
</span></span></pre></div>
<a id="trunkSourceWebCorepluginsDOMMimeTypeArraycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/plugins/DOMMimeTypeArray.cpp (184989 => 184990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/plugins/DOMMimeTypeArray.cpp        2015-05-29 16:58:51 UTC (rev 184989)
+++ trunk/Source/WebCore/plugins/DOMMimeTypeArray.cpp        2015-05-29 17:01:12 UTC (rev 184990)
</span><span class="lines">@@ -79,8 +79,8 @@
</span><span class="cx">     Vector&lt;MimeClassInfo&gt; mimes;
</span><span class="cx">     Vector&lt;size_t&gt; mimePluginIndices;
</span><span class="cx">     data-&gt;getWebVisibleMimesAndPluginIndices(mimes, mimePluginIndices);
</span><del>-    for (unsigned i = 0; i &lt; mimes.size(); ++i) {
-        if (mimes[i].type == propertyName)
</del><ins>+    for (auto&amp; mime : mimes) {
+        if (mime.type == propertyName)
</ins><span class="cx">             return true;
</span><span class="cx">     }
</span><span class="cx">     return false;
</span></span></pre></div>
<a id="trunkSourceWebCorepluginsDOMPlugincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/plugins/DOMPlugin.cpp (184989 => 184990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/plugins/DOMPlugin.cpp        2015-05-29 16:58:51 UTC (rev 184989)
+++ trunk/Source/WebCore/plugins/DOMPlugin.cpp        2015-05-29 17:01:12 UTC (rev 184990)
</span><span class="lines">@@ -83,9 +83,10 @@
</span><span class="cx">     Vector&lt;MimeClassInfo&gt; mimes;
</span><span class="cx">     Vector&lt;size_t&gt; mimePluginIndices;
</span><span class="cx">     m_pluginData-&gt;getWebVisibleMimesAndPluginIndices(mimes, mimePluginIndices);
</span><del>-    for (unsigned i = 0; i &lt; mimes.size(); ++i)
-        if (mimes[i].type == propertyName)
</del><ins>+    for (auto&amp; mime : mimes) {
+        if (mime.type == propertyName)
</ins><span class="cx">             return true;
</span><ins>+    }
</ins><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepluginsDOMPluginArraycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/plugins/DOMPluginArray.cpp (184989 => 184990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/plugins/DOMPluginArray.cpp        2015-05-29 16:58:51 UTC (rev 184989)
+++ trunk/Source/WebCore/plugins/DOMPluginArray.cpp        2015-05-29 17:01:12 UTC (rev 184990)
</span><span class="lines">@@ -70,9 +70,8 @@
</span><span class="cx">     if (!data)
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><del>-    const Vector&lt;PluginInfo&gt;&amp; plugins = data-&gt;webVisiblePlugins();
-    for (unsigned i = 0; i &lt; plugins.size(); ++i) {
-        if (plugins[i].name == propertyName)
</del><ins>+    for (auto&amp; plugin : data-&gt;webVisiblePlugins()) {
+        if (plugin.name == propertyName)
</ins><span class="cx">             return true;
</span><span class="cx">     }
</span><span class="cx">     return false;
</span></span></pre></div>
<a id="trunkSourceWebCorepluginsPluginDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/plugins/PluginData.cpp (184989 => 184990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/plugins/PluginData.cpp        2015-05-29 16:58:51 UTC (rev 184989)
+++ trunk/Source/WebCore/plugins/PluginData.cpp        2015-05-29 17:01:12 UTC (rev 184990)
</span><span class="lines">@@ -52,8 +52,8 @@
</span><span class="cx">     const Vector&lt;PluginInfo&gt;&amp; plugins = webVisiblePlugins();
</span><span class="cx">     for (unsigned i = 0; i &lt; plugins.size(); ++i) {
</span><span class="cx">         const PluginInfo&amp; plugin = plugins[i];
</span><del>-        for (unsigned j = 0; j &lt; plugin.mimes.size(); ++j) {
-            mimes.append(plugin.mimes[j]);
</del><ins>+        for (auto&amp; mime : plugin.mimes) {
+            mimes.append(mime);
</ins><span class="cx">             mimePluginIndices.append(i);
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorepluginsPluginMainThreadSchedulercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/plugins/PluginMainThreadScheduler.cpp (184989 => 184990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/plugins/PluginMainThreadScheduler.cpp        2015-05-29 16:58:51 UTC (rev 184989)
+++ trunk/Source/WebCore/plugins/PluginMainThreadScheduler.cpp        2015-05-29 17:01:12 UTC (rev 184990)
</span><span class="lines">@@ -74,8 +74,7 @@
</span><span class="cx"> 
</span><span class="cx"> void PluginMainThreadScheduler::dispatchCallsForPlugin(NPP npp, const Deque&lt;Call&gt;&amp; calls)
</span><span class="cx"> {
</span><del>-    Deque&lt;Call&gt;::const_iterator end = calls.end();
-    for (Deque&lt;Call&gt;::const_iterator it = calls.begin(); it != end; ++it) {
</del><ins>+    for (auto&amp; call : calls) {
</ins><span class="cx">         // Check if the plug-in has been destroyed.
</span><span class="cx">         {
</span><span class="cx">             MutexLocker lock(m_queueMutex);
</span><span class="lines">@@ -83,7 +82,7 @@
</span><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        (*it).performCall();
</del><ins>+        call.performCall();
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -92,19 +91,15 @@
</span><span class="cx">     m_queueMutex.lock();
</span><span class="cx">     CallQueueMap copy(m_callQueueMap);
</span><span class="cx"> 
</span><del>-    {
-        // Empty all the queues in the original map
-        CallQueueMap::iterator end = m_callQueueMap.end();
-        for (CallQueueMap::iterator it = m_callQueueMap.begin(); it != end; ++it)
-            it-&gt;value.clear();
-    }
</del><ins>+    // Empty all the queues in the original map
+    for (auto&amp; call : m_callQueueMap.values())
+        call.clear();
</ins><span class="cx"> 
</span><span class="cx">     m_callPending = false;
</span><span class="cx">     m_queueMutex.unlock();
</span><span class="cx"> 
</span><del>-    CallQueueMap::iterator end = copy.end();
-    for (CallQueueMap::iterator it = copy.begin(); it != end; ++it)
-        dispatchCallsForPlugin(it-&gt;key, it-&gt;value);
</del><ins>+    for (auto&amp; entry : copy)
+        dispatchCallsForPlugin(entry.key, entry.value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PluginMainThreadScheduler::mainThreadCallback(void* context)
</span></span></pre></div>
<a id="trunkSourceWebCorestorageStorageEventDispatchercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/storage/StorageEventDispatcher.cpp (184989 => 184990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/storage/StorageEventDispatcher.cpp        2015-05-29 16:58:51 UTC (rev 184989)
+++ trunk/Source/WebCore/storage/StorageEventDispatcher.cpp        2015-05-29 17:01:12 UTC (rev 184990)
</span><span class="lines">@@ -64,9 +64,8 @@
</span><span class="cx">     Vector&lt;RefPtr&lt;Frame&gt;&gt; frames;
</span><span class="cx"> 
</span><span class="cx">     // Send events to every page.
</span><del>-    const HashSet&lt;Page*&gt;&amp; pages = page-&gt;group().pages();
-    for (HashSet&lt;Page*&gt;::const_iterator it = pages.begin(), end = pages.end(); it != end; ++it) {
-        for (Frame* frame = &amp;(*it)-&gt;mainFrame(); frame; frame = frame-&gt;tree().traverseNext()) {
</del><ins>+    for (auto&amp; pageInGroup : page-&gt;group().pages()) {
+        for (Frame* frame = &amp;pageInGroup-&gt;mainFrame(); frame; frame = frame-&gt;tree().traverseNext()) {
</ins><span class="cx">             if (sourceFrame != frame &amp;&amp; frame-&gt;document()-&gt;securityOrigin()-&gt;equal(securityOrigin))
</span><span class="cx">                 frames.append(frame);
</span><span class="cx">         }
</span><span class="lines">@@ -79,25 +78,24 @@
</span><span class="cx"> {
</span><span class="cx">     InspectorInstrumentation::didDispatchDOMStorageEvent(key, oldValue, newValue, SessionStorage, securityOrigin, &amp;page);
</span><span class="cx"> 
</span><del>-    for (unsigned i = 0; i &lt; frames.size(); ++i) {
</del><ins>+    for (auto&amp; frame : frames) {
</ins><span class="cx">         ExceptionCode ec = 0;
</span><del>-        Storage* storage = frames[i]-&gt;document()-&gt;domWindow()-&gt;sessionStorage(ec);
</del><ins>+        Storage* storage = frame-&gt;document()-&gt;domWindow()-&gt;sessionStorage(ec);
</ins><span class="cx">         if (!ec)
</span><del>-            frames[i]-&gt;document()-&gt;enqueueWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, url, storage));
</del><ins>+            frame-&gt;document()-&gt;enqueueWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, url, storage));
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void StorageEventDispatcher::dispatchLocalStorageEventsToFrames(PageGroup&amp; pageGroup, const Vector&lt;RefPtr&lt;Frame&gt;&gt;&amp; frames, const String&amp; key, const String&amp; oldValue, const String&amp; newValue, const String&amp; url, SecurityOrigin* securityOrigin)
</span><span class="cx"> {
</span><del>-    const HashSet&lt;Page*&gt;&amp; pages = pageGroup.pages();
-    for (HashSet&lt;Page*&gt;::const_iterator it = pages.begin(), end = pages.end(); it != end; ++it)
-        InspectorInstrumentation::didDispatchDOMStorageEvent(key, oldValue, newValue, LocalStorage, securityOrigin, *it);
</del><ins>+    for (auto&amp; page : pageGroup.pages())
+        InspectorInstrumentation::didDispatchDOMStorageEvent(key, oldValue, newValue, LocalStorage, securityOrigin, page);
</ins><span class="cx"> 
</span><del>-    for (unsigned i = 0; i &lt; frames.size(); ++i) {
</del><ins>+    for (auto&amp; frame : frames) {
</ins><span class="cx">         ExceptionCode ec = 0;
</span><del>-        Storage* storage = frames[i]-&gt;document()-&gt;domWindow()-&gt;localStorage(ec);
</del><ins>+        Storage* storage = frame-&gt;document()-&gt;domWindow()-&gt;localStorage(ec);
</ins><span class="cx">         if (!ec)
</span><del>-            frames[i]-&gt;document()-&gt;enqueueWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, url, storage));
</del><ins>+            frame-&gt;document()-&gt;enqueueWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, url, storage));
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorestorageStorageMapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/storage/StorageMap.cpp (184989 => 184990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/storage/StorageMap.cpp        2015-05-29 16:58:51 UTC (rev 184989)
+++ trunk/Source/WebCore/storage/StorageMap.cpp        2015-05-29 17:01:12 UTC (rev 184990)
</span><span class="lines">@@ -184,9 +184,9 @@
</span><span class="cx"> 
</span><span class="cx"> void StorageMap::importItems(const HashMap&lt;String, String&gt;&amp; items)
</span><span class="cx"> {
</span><del>-    for (HashMap&lt;String, String&gt;::const_iterator it = items.begin(), end = items.end(); it != end; ++it) {
-        const String&amp; key = it-&gt;key;
-        const String&amp; value = it-&gt;value;
</del><ins>+    for (auto&amp; item : items) {
+        const String&amp; key = item.key;
+        const String&amp; value = item.value;
</ins><span class="cx"> 
</span><span class="cx">         HashMap&lt;String, String&gt;::AddResult result = m_map.add(key, value);
</span><span class="cx">         ASSERT_UNUSED(result, result.isNewEntry); // True if the key didn't exist previously.
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleResolveTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleResolveTree.cpp (184989 => 184990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleResolveTree.cpp        2015-05-29 16:58:51 UTC (rev 184989)
+++ trunk/Source/WebCore/style/StyleResolveTree.cpp        2015-05-29 17:01:12 UTC (rev 184990)
</span><span class="lines">@@ -583,17 +583,16 @@
</span><span class="cx">     if (!pseudoStyleCache)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    size_t cacheSize = pseudoStyleCache-&gt;size();
-    for (size_t i = 0; i &lt; cacheSize; ++i) {
</del><ins>+    for (auto&amp; cache : *pseudoStyleCache) {
</ins><span class="cx">         RefPtr&lt;RenderStyle&gt; newPseudoStyle;
</span><del>-        PseudoId pseudoId = pseudoStyleCache-&gt;at(i)-&gt;styleType();
</del><ins>+        PseudoId pseudoId = cache-&gt;styleType();
</ins><span class="cx">         if (pseudoId == FIRST_LINE || pseudoId == FIRST_LINE_INHERITED)
</span><span class="cx">             newPseudoStyle = renderer-&gt;uncachedFirstLineStyle(newStyle);
</span><span class="cx">         else
</span><span class="cx">             newPseudoStyle = renderer-&gt;getUncachedPseudoStyle(PseudoStyleRequest(pseudoId), newStyle, newStyle);
</span><span class="cx">         if (!newPseudoStyle)
</span><span class="cx">             return true;
</span><del>-        if (*newPseudoStyle != *pseudoStyleCache-&gt;at(i)) {
</del><ins>+        if (*newPseudoStyle != *cache) {
</ins><span class="cx">             if (pseudoId &lt; FIRST_INTERNAL_PSEUDOID)
</span><span class="cx">                 newStyle-&gt;setHasPseudoStyle(pseudoId);
</span><span class="cx">             newStyle-&gt;addCachedPseudoStyle(newPseudoStyle);
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (184989 => 184990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2015-05-29 16:58:51 UTC (rev 184989)
+++ trunk/Source/WebCore/testing/Internals.cpp        2015-05-29 17:01:12 UTC (rev 184990)
</span><span class="lines">@@ -1383,8 +1383,8 @@
</span><span class="cx">         
</span><span class="cx">         const HitTestResult::NodeSet&amp; nodeSet = result.rectBasedTestResult();
</span><span class="cx">         matches.reserveInitialCapacity(nodeSet.size());
</span><del>-        for (auto it = nodeSet.begin(), end = nodeSet.end(); it != end; ++it)
-            matches.uncheckedAppend(*it-&gt;get());
</del><ins>+        for (auto&amp; node : nodeSet)
+            matches.uncheckedAppend(*node);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return StaticNodeList::adopt(matches);
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/Worker.cpp (184989 => 184990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/Worker.cpp        2015-05-29 16:58:51 UTC (rev 184989)
+++ trunk/Source/WebCore/workers/Worker.cpp        2015-05-29 17:01:12 UTC (rev 184990)
</span><span class="lines">@@ -54,9 +54,8 @@
</span><span class="cx"> 
</span><span class="cx"> void networkStateChanged(bool isOnLine)
</span><span class="cx"> {
</span><del>-    HashSet&lt;Worker*&gt;::iterator end = allWorkers-&gt;end();
-    for (HashSet&lt;Worker*&gt;::iterator it = allWorkers-&gt;begin(); it != end; ++it)
-        (*it)-&gt;notifyNetworkStateChange(isOnLine);
</del><ins>+    for (auto&amp; worker : *allWorkers)
+        worker-&gt;notifyNetworkStateChange(isOnLine);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline Worker::Worker(ScriptExecutionContext&amp; context)
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerGlobalScopecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.cpp (184989 => 184990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerGlobalScope.cpp        2015-05-29 16:58:51 UTC (rev 184989)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.cpp        2015-05-29 17:01:12 UTC (rev 184990)
</span><span class="lines">@@ -175,21 +175,19 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(contentSecurityPolicy());
</span><span class="cx">     ec = 0;
</span><del>-    Vector&lt;String&gt;::const_iterator urlsEnd = urls.end();
</del><span class="cx">     Vector&lt;URL&gt; completedURLs;
</span><del>-    for (Vector&lt;String&gt;::const_iterator it = urls.begin(); it != urlsEnd; ++it) {
-        const URL&amp; url = scriptExecutionContext()-&gt;completeURL(*it);
</del><ins>+    for (auto&amp; entry : urls) {
+        URL url = scriptExecutionContext()-&gt;completeURL(entry);
</ins><span class="cx">         if (!url.isValid()) {
</span><span class="cx">             ec = SYNTAX_ERR;
</span><span class="cx">             return;
</span><span class="cx">         }
</span><del>-        completedURLs.append(url);
</del><ins>+        completedURLs.append(WTF::move(url));
</ins><span class="cx">     }
</span><del>-    Vector&lt;URL&gt;::const_iterator end = completedURLs.end();
</del><span class="cx"> 
</span><del>-    for (Vector&lt;URL&gt;::const_iterator it = completedURLs.begin(); it != end; ++it) {
</del><ins>+    for (auto&amp; url : completedURLs) {
</ins><span class="cx">         Ref&lt;WorkerScriptLoader&gt; scriptLoader = WorkerScriptLoader::create();
</span><del>-        scriptLoader-&gt;loadSynchronously(scriptExecutionContext(), *it, AllowCrossOriginRequests);
</del><ins>+        scriptLoader-&gt;loadSynchronously(scriptExecutionContext(), url, AllowCrossOriginRequests);
</ins><span class="cx"> 
</span><span class="cx">         // If the fetching attempt failed, throw a NETWORK_ERR exception and abort all these steps.
</span><span class="cx">         if (scriptLoader-&gt;failed()) {
</span></span></pre>
</div>
</div>

</body>
</html>