<!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>[185101] 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/185101">185101</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-06-01 20:13:26 -0700 (Mon, 01 Jun 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use modern for-loops in WebCore/Modules - 1
https://bugs.webkit.org/show_bug.cgi?id=145507

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

No new tests, no behavior changes.

* Modules/battery/BatteryController.cpp:
(WebCore::BatteryController::~BatteryController):
(WebCore::BatteryController::updateBatteryStatus):
(WebCore::BatteryController::didChangeBatteryStatus):
* Modules/encryptedmedia/CDM.cpp:
(WebCore::CDMFactoryForKeySystem):
* Modules/encryptedmedia/MediaKeys.cpp:
(WebCore::MediaKeys::~MediaKeys):
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::resumeTimerFired):
(WebCore::Geolocation::resetAllGeolocationPermission):
(WebCore::Geolocation::makeCachedPositionCallbacks):
(WebCore::Geolocation::sendError):
(WebCore::Geolocation::sendPosition):
(WebCore::Geolocation::stopTimer):
(WebCore::Geolocation::cancelRequests):
(WebCore::Geolocation::extractNotifiersWithCachedPosition):
(WebCore::Geolocation::copyToSet):
(WebCore::Geolocation::handlePendingPermissionNotifiers):
* Modules/geolocation/GeolocationController.cpp:
(WebCore::GeolocationController::positionChanged):
(WebCore::GeolocationController::errorOccurred):
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::objectStoreNames):
(WebCore::IDBDatabase::transaction):
(WebCore::IDBDatabase::forceClose):
(WebCore::IDBDatabase::closeConnection):
(WebCore::IDBDatabase::findObjectStoreId):
* Modules/indexeddb/IDBDatabaseBackend.cpp:
(WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction):
(WebCore::IDBDatabaseBackend::deleteDatabase):
(WebCore::IDBDatabaseBackend::close):
* Modules/indexeddb/IDBDatabaseMetadata.cpp:
(WebCore::IDBDatabaseMetadata::isolatedCopy):
(WebCore::IDBObjectStoreMetadata::isolatedCopy):
* Modules/indexeddb/IDBKey.cpp:
(WebCore::IDBKey::isValid):
* Modules/indexeddb/IDBKey.h:
(WebCore::IDBKey::createMultiEntryArray):
(WebCore::IDBKey::createArray):
* Modules/indexeddb/IDBKeyPath.cpp:
(WebCore::IDBKeyPath::IDBKeyPath):
(WebCore::IDBKeyPath::isValid):
(WebCore::IDBKeyPath::isolatedCopy):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::indexNames):
(WebCore::IDBObjectStore::put):
Rename the two 'i's to 'keyData' and 'indexKeyData'.
(WebCore::IDBObjectStore::index):
(WebCore::IDBObjectStore::findIndexId):
* Modules/indexeddb/IDBPendingTransactionMonitor.cpp:
(WebCore::IDBPendingTransactionMonitor::deactivateNewTransactions):
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::abort):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::closeOpenCursors):
(WebCore::IDBTransaction::onAbort):
(WebCore::IDBTransaction::dispatchEvent):
* Modules/indexeddb/IDBTransactionBackend.cpp:
(WebCore::IDBTransactionBackend::create):
(WebCore::IDBTransactionBackend::closeOpenCursors):
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::onReadyStateChange):
* Modules/mediastream/MediaConstraintsImpl.cpp:
(WebCore::MediaConstraintsImpl::initialize):
(WebCore::MediaConstraintsImpl::getMandatoryConstraints):
(WebCore::MediaConstraintsImpl::getOptionalConstraintValue):
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::create):
(WebCore::MediaStream::cloneMediaStreamTrackVector):
(WebCore::MediaStream::addTrack):
(WebCore::MediaStream::removeTrack):
(WebCore::MediaStream::haveTrackWithSource):
(WebCore::MediaStream::getTrackById):
(WebCore::MediaStream::getTracks):
(WebCore::MediaStream::trackDidEnd):
(WebCore::MediaStream::scheduledEventTimerFired):
* Modules/mediastream/MediaStreamCapabilities.cpp:
(WebCore::MediaStreamCapabilities::sourceType):
(WebCore::MediaStreamCapabilities::sourceId):
(WebCore::MediaStreamCapabilities::facingMode):
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::trackDidEnd):
* Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
(WebCore::MediaStreamTrackSourcesRequest::didCompleteRequest):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesbatteryBatteryControllercpp">trunk/Source/WebCore/Modules/battery/BatteryController.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaCDMcpp">trunk/Source/WebCore/Modules/encryptedmedia/CDM.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesencryptedmediaMediaKeyscpp">trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesgeolocationGeolocationcpp">trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesgeolocationGeolocationControllercpp">trunk/Source/WebCore/Modules/geolocation/GeolocationController.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabasecpp">trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabaseBackendcpp">trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabaseMetadatacpp">trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseMetadata.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeycpp">trunk/Source/WebCore/Modules/indexeddb/IDBKey.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeyh">trunk/Source/WebCore/Modules/indexeddb/IDBKey.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeyPathcpp">trunk/Source/WebCore/Modules/indexeddb/IDBKeyPath.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBPendingTransactionMonitorcpp">trunk/Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBRequestcpp">trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactioncpp">trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactionBackendcpp">trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasourceMediaSourcecpp">trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaConstraintsImplcpp">trunk/Source/WebCore/Modules/mediastream/MediaConstraintsImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaStreamcpp">trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaStreamCapabilitiescpp">trunk/Source/WebCore/Modules/mediastream/MediaStreamCapabilities.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaStreamTrackcpp">trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaStreamTrackSourcesRequestcpp">trunk/Source/WebCore/Modules/mediastream/MediaStreamTrackSourcesRequest.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/ChangeLog        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -1,3 +1,98 @@
</span><ins>+2015-06-01  Hunseop Jeong  &lt;hs85.jeong@samsung.com&gt;
+
+        Use modern for-loops in WebCore/Modules - 1
+        https://bugs.webkit.org/show_bug.cgi?id=145507
+
+        Reviewed by Darin Adler.
+
+        No new tests, no behavior changes.
+
+        * Modules/battery/BatteryController.cpp:
+        (WebCore::BatteryController::~BatteryController):
+        (WebCore::BatteryController::updateBatteryStatus):
+        (WebCore::BatteryController::didChangeBatteryStatus):
+        * Modules/encryptedmedia/CDM.cpp:
+        (WebCore::CDMFactoryForKeySystem):
+        * Modules/encryptedmedia/MediaKeys.cpp:
+        (WebCore::MediaKeys::~MediaKeys):
+        * Modules/geolocation/Geolocation.cpp:
+        (WebCore::Geolocation::resumeTimerFired):
+        (WebCore::Geolocation::resetAllGeolocationPermission):
+        (WebCore::Geolocation::makeCachedPositionCallbacks):
+        (WebCore::Geolocation::sendError):
+        (WebCore::Geolocation::sendPosition):
+        (WebCore::Geolocation::stopTimer):
+        (WebCore::Geolocation::cancelRequests):
+        (WebCore::Geolocation::extractNotifiersWithCachedPosition):
+        (WebCore::Geolocation::copyToSet):
+        (WebCore::Geolocation::handlePendingPermissionNotifiers):
+        * Modules/geolocation/GeolocationController.cpp:
+        (WebCore::GeolocationController::positionChanged):
+        (WebCore::GeolocationController::errorOccurred):
+        * Modules/indexeddb/IDBDatabase.cpp:
+        (WebCore::IDBDatabase::objectStoreNames):
+        (WebCore::IDBDatabase::transaction):
+        (WebCore::IDBDatabase::forceClose):
+        (WebCore::IDBDatabase::closeConnection):
+        (WebCore::IDBDatabase::findObjectStoreId):
+        * Modules/indexeddb/IDBDatabaseBackend.cpp:
+        (WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction):
+        (WebCore::IDBDatabaseBackend::deleteDatabase):
+        (WebCore::IDBDatabaseBackend::close):
+        * Modules/indexeddb/IDBDatabaseMetadata.cpp:
+        (WebCore::IDBDatabaseMetadata::isolatedCopy):
+        (WebCore::IDBObjectStoreMetadata::isolatedCopy):
+        * Modules/indexeddb/IDBKey.cpp:
+        (WebCore::IDBKey::isValid):
+        * Modules/indexeddb/IDBKey.h:
+        (WebCore::IDBKey::createMultiEntryArray):
+        (WebCore::IDBKey::createArray):
+        * Modules/indexeddb/IDBKeyPath.cpp:
+        (WebCore::IDBKeyPath::IDBKeyPath):
+        (WebCore::IDBKeyPath::isValid):
+        (WebCore::IDBKeyPath::isolatedCopy):
+        * Modules/indexeddb/IDBObjectStore.cpp:
+        (WebCore::IDBObjectStore::indexNames):
+        (WebCore::IDBObjectStore::put):
+        Rename the two 'i's to 'keyData' and 'indexKeyData'.
+        (WebCore::IDBObjectStore::index):
+        (WebCore::IDBObjectStore::findIndexId):
+        * Modules/indexeddb/IDBPendingTransactionMonitor.cpp:
+        (WebCore::IDBPendingTransactionMonitor::deactivateNewTransactions):
+        * Modules/indexeddb/IDBRequest.cpp:
+        (WebCore::IDBRequest::abort):
+        * Modules/indexeddb/IDBTransaction.cpp:
+        (WebCore::IDBTransaction::closeOpenCursors):
+        (WebCore::IDBTransaction::onAbort):
+        (WebCore::IDBTransaction::dispatchEvent):
+        * Modules/indexeddb/IDBTransactionBackend.cpp:
+        (WebCore::IDBTransactionBackend::create):
+        (WebCore::IDBTransactionBackend::closeOpenCursors):
+        * Modules/mediasource/MediaSource.cpp:
+        (WebCore::MediaSource::onReadyStateChange):
+        * Modules/mediastream/MediaConstraintsImpl.cpp:
+        (WebCore::MediaConstraintsImpl::initialize):
+        (WebCore::MediaConstraintsImpl::getMandatoryConstraints):
+        (WebCore::MediaConstraintsImpl::getOptionalConstraintValue):
+        * Modules/mediastream/MediaStream.cpp:
+        (WebCore::MediaStream::create):
+        (WebCore::MediaStream::cloneMediaStreamTrackVector):
+        (WebCore::MediaStream::addTrack):
+        (WebCore::MediaStream::removeTrack):
+        (WebCore::MediaStream::haveTrackWithSource):
+        (WebCore::MediaStream::getTrackById):
+        (WebCore::MediaStream::getTracks):
+        (WebCore::MediaStream::trackDidEnd):
+        (WebCore::MediaStream::scheduledEventTimerFired):
+        * Modules/mediastream/MediaStreamCapabilities.cpp:
+        (WebCore::MediaStreamCapabilities::sourceType):
+        (WebCore::MediaStreamCapabilities::sourceId):
+        (WebCore::MediaStreamCapabilities::facingMode):
+        * Modules/mediastream/MediaStreamTrack.cpp:
+        (WebCore::MediaStreamTrack::trackDidEnd):
+        * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
+        (WebCore::MediaStreamTrackSourcesRequest::didCompleteRequest):
+
</ins><span class="cx"> 2015-06-01  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [SVG -&gt; OTF Converter] Remove unnecessary hacks
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesbatteryBatteryControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/battery/BatteryController.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/battery/BatteryController.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/battery/BatteryController.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -37,8 +37,8 @@
</span><span class="cx"> 
</span><span class="cx"> BatteryController::~BatteryController()
</span><span class="cx"> {
</span><del>-    for (ListenerVector::iterator it = m_listeners.begin(); it != m_listeners.end(); ++it)
-        (*it)-&gt;batteryControllerDestroyed();
</del><ins>+    for (auto&amp; listener : m_listeners)
+        listener-&gt;batteryControllerDestroyed();
</ins><span class="cx">     m_client-&gt;batteryControllerDestroyed();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -75,8 +75,8 @@
</span><span class="cx">         if (m_batteryStatus-&gt;level() != status-&gt;level())
</span><span class="cx">             didChangeBatteryStatus(WebCore::eventNames().levelchangeEvent, status);
</span><span class="cx">     } else {
</span><del>-        for (ListenerVector::iterator it = m_listeners.begin(); it != m_listeners.end(); ++it)
-            (*it)-&gt;updateBatteryStatus(status);
</del><ins>+        for (auto&amp; listener : m_listeners)
+            listener-&gt;updateBatteryStatus(status);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_batteryStatus = status.release();
</span><span class="lines">@@ -86,8 +86,8 @@
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;Event&gt; event = Event::create(eventType, false, false);
</span><span class="cx">     RefPtr&lt;BatteryStatus&gt; battery = batteryStatus;
</span><del>-    for (ListenerVector::iterator it = m_listeners.begin(); it != m_listeners.end(); ++it)
-        (*it)-&gt;didChangeBatteryStatus(event, battery);
</del><ins>+    for (auto&amp; listener : m_listeners)
+        listener-&gt;didChangeBatteryStatus(event, battery);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> const char* BatteryController::supplementName()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaCDMcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/encryptedmedia/CDM.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/CDM.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/encryptedmedia/CDM.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -89,10 +89,9 @@
</span><span class="cx"> 
</span><span class="cx"> static CDMFactory* CDMFactoryForKeySystem(const String&amp; keySystem)
</span><span class="cx"> {
</span><del>-    Vector&lt;CDMFactory*&gt;&amp; cdmFactories = installedCDMFactories();
-    for (size_t i = 0; i &lt; cdmFactories.size(); ++i) {
-        if (cdmFactories[i]-&gt;supportsKeySystem(keySystem))
-            return cdmFactories[i];
</del><ins>+    for (auto&amp; factory : installedCDMFactories()) {
+        if (factory-&gt;supportsKeySystem(keySystem))
+            return factory;
</ins><span class="cx">     }
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesencryptedmediaMediaKeyscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -77,9 +77,9 @@
</span><span class="cx"> {
</span><span class="cx">     // From &lt;http://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html#dom-media-keys-constructor&gt;:
</span><span class="cx">     // When destroying a MediaKeys object, follow the steps in close().
</span><del>-    for (size_t i = 0; i &lt; m_sessions.size(); ++i) {
-        m_sessions[i]-&gt;close();
-        m_sessions[i]-&gt;setKeys(0);
</del><ins>+    for (auto&amp; session : m_sessions) {
+        session-&gt;close();
+        session-&gt;setKeys(0);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationGeolocationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -208,13 +208,12 @@
</span><span class="cx"> 
</span><span class="cx">     // Resume GeoNotifier timeout timers.
</span><span class="cx">     if (hasListeners()) {
</span><del>-        GeoNotifierSet::const_iterator end = m_oneShots.end();
-        for (GeoNotifierSet::const_iterator it = m_oneShots.begin(); it != end; ++it)
-            (*it)-&gt;startTimerIfNeeded();
</del><ins>+        for (auto&amp; notifier : m_oneShots)
+            notifier-&gt;startTimerIfNeeded();
</ins><span class="cx">         GeoNotifierVector watcherCopy;
</span><span class="cx">         m_watchers.getNotifiersVector(watcherCopy);
</span><del>-        for (size_t i = 0; i &lt; watcherCopy.size(); ++i)
-            watcherCopy[i]-&gt;startTimerIfNeeded();
</del><ins>+        for (auto&amp; watcher : watcherCopy)
+            watcher-&gt;startTimerIfNeeded();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if ((isAllowed() || isDenied()) &amp;&amp; !m_pendingForPermissionNotifiers.isEmpty()) {
</span><span class="lines">@@ -269,14 +268,13 @@
</span><span class="cx">     stopTimers();
</span><span class="cx"> 
</span><span class="cx">     // Go over the one shot and re-request permission.
</span><del>-    GeoNotifierSet::iterator end = m_oneShots.end();
-    for (GeoNotifierSet::iterator it = m_oneShots.begin(); it != end; ++it)
-        startRequest((*it).get());
</del><ins>+    for (auto&amp; notifier : m_oneShots)
+        startRequest(notifier.get());
</ins><span class="cx">     // Go over the watchers and re-request permission.
</span><span class="cx">     GeoNotifierVector watcherCopy;
</span><span class="cx">     m_watchers.getNotifiersVector(watcherCopy);
</span><del>-    for (size_t i = 0; i &lt; watcherCopy.size(); ++i)
-        startRequest(watcherCopy[i].get());
</del><ins>+    for (auto&amp; watcher : watcherCopy)
+        startRequest(watcher.get());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Geolocation::stop()
</span><span class="lines">@@ -392,15 +390,13 @@
</span><span class="cx">     // All modifications to m_requestsAwaitingCachedPosition are done
</span><span class="cx">     // asynchronously, so we don't need to worry about it being modified from
</span><span class="cx">     // the callbacks.
</span><del>-    GeoNotifierSet::const_iterator end = m_requestsAwaitingCachedPosition.end();
-    for (GeoNotifierSet::const_iterator iter = m_requestsAwaitingCachedPosition.begin(); iter != end; ++iter) {
-        GeoNotifier* notifier = iter-&gt;get();
</del><ins>+    for (auto&amp; notifier : m_requestsAwaitingCachedPosition) {
</ins><span class="cx">         notifier-&gt;runSuccessCallback(lastPosition());
</span><span class="cx"> 
</span><span class="cx">         // If this is a one-shot request, stop it. Otherwise, if the watch still
</span><span class="cx">         // exists, start the service to get updates.
</span><del>-        if (!m_oneShots.remove(notifier) &amp;&amp; m_watchers.contains(notifier)) {
-            if (notifier-&gt;hasZeroTimeout() || startUpdating(notifier))
</del><ins>+        if (!m_oneShots.remove(notifier.get()) &amp;&amp; m_watchers.contains(notifier.get())) {
+            if (notifier-&gt;hasZeroTimeout() || startUpdating(notifier.get()))
</ins><span class="cx">                 notifier-&gt;startTimerIfNeeded();
</span><span class="cx">             else
</span><span class="cx">                 notifier-&gt;setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(failedToStartServiceErrorMessage)));
</span><span class="lines">@@ -489,26 +485,20 @@
</span><span class="cx"> 
</span><span class="cx"> void Geolocation::sendError(GeoNotifierVector&amp; notifiers, PositionError* error)
</span><span class="cx"> {
</span><del>-     GeoNotifierVector::const_iterator end = notifiers.end();
-     for (GeoNotifierVector::const_iterator it = notifiers.begin(); it != end; ++it) {
-         RefPtr&lt;GeoNotifier&gt; notifier = *it;
-         
-         notifier-&gt;runErrorCallback(error);
-     }
</del><ins>+    for (auto&amp; notifier : notifiers)
+        notifier-&gt;runErrorCallback(error);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Geolocation::sendPosition(GeoNotifierVector&amp; notifiers, Geoposition* position)
</span><span class="cx"> {
</span><del>-    GeoNotifierVector::const_iterator end = notifiers.end();
-    for (GeoNotifierVector::const_iterator it = notifiers.begin(); it != end; ++it)
-        (*it)-&gt;runSuccessCallback(position);
</del><ins>+    for (auto&amp; notifier : notifiers)
+        notifier-&gt;runSuccessCallback(position);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Geolocation::stopTimer(GeoNotifierVector&amp; notifiers)
</span><span class="cx"> {
</span><del>-    GeoNotifierVector::const_iterator end = notifiers.end();
-    for (GeoNotifierVector::const_iterator it = notifiers.begin(); it != end; ++it)
-        (*it)-&gt;stopTimer();
</del><ins>+    for (auto&amp; notifier : notifiers)
+        notifier-&gt;stopTimer();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Geolocation::stopTimersForOneShots()
</span><span class="lines">@@ -535,9 +525,8 @@
</span><span class="cx"> 
</span><span class="cx"> void Geolocation::cancelRequests(GeoNotifierVector&amp; notifiers)
</span><span class="cx"> {
</span><del>-    GeoNotifierVector::const_iterator end = notifiers.end();
-    for (GeoNotifierVector::const_iterator it = notifiers.begin(); it != end; ++it)
-        (*it)-&gt;setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(framelessDocumentErrorMessage)));
</del><ins>+    for (auto&amp; notifier : notifiers)
+        notifier-&gt;setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(framelessDocumentErrorMessage)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Geolocation::cancelAllRequests()
</span><span class="lines">@@ -552,25 +541,20 @@
</span><span class="cx"> void Geolocation::extractNotifiersWithCachedPosition(GeoNotifierVector&amp; notifiers, GeoNotifierVector* cached)
</span><span class="cx"> {
</span><span class="cx">     GeoNotifierVector nonCached;
</span><del>-    GeoNotifierVector::iterator end = notifiers.end();
-    for (GeoNotifierVector::const_iterator it = notifiers.begin(); it != end; ++it) {
-        GeoNotifier* notifier = it-&gt;get();
</del><ins>+    for (auto&amp; notifier : notifiers) {
</ins><span class="cx">         if (notifier-&gt;useCachedPosition()) {
</span><span class="cx">             if (cached)
</span><del>-                cached-&gt;append(notifier);
</del><ins>+                cached-&gt;append(notifier.get());
</ins><span class="cx">         } else
</span><del>-            nonCached.append(notifier);
</del><ins>+            nonCached.append(notifier.get());
</ins><span class="cx">     }
</span><span class="cx">     notifiers.swap(nonCached);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Geolocation::copyToSet(const GeoNotifierVector&amp; src, GeoNotifierSet&amp; dest)
</span><span class="cx"> {
</span><del>-     GeoNotifierVector::const_iterator end = src.end();
-     for (GeoNotifierVector::const_iterator it = src.begin(); it != end; ++it) {
-         GeoNotifier* notifier = it-&gt;get();
-         dest.add(notifier);
-     }
</del><ins>+    for (auto&amp; notifier : src)
+        dest.add(notifier.get());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Geolocation::handleError(PositionError* error)
</span><span class="lines">@@ -695,14 +679,11 @@
</span><span class="cx"> {
</span><span class="cx">     // While we iterate through the list, we need not worry about list being modified as the permission 
</span><span class="cx">     // is already set to Yes/No and no new listeners will be added to the pending list
</span><del>-    GeoNotifierSet::const_iterator end = m_pendingForPermissionNotifiers.end();
-    for (GeoNotifierSet::const_iterator iter = m_pendingForPermissionNotifiers.begin(); iter != end; ++iter) {
-        GeoNotifier* notifier = iter-&gt;get();
-
</del><ins>+    for (auto&amp; notifier : m_pendingForPermissionNotifiers) {
</ins><span class="cx">         if (isAllowed()) {
</span><span class="cx">             // start all pending notification requests as permission granted.
</span><span class="cx">             // The notifier is always ref'ed by m_oneShots or m_watchers.
</span><del>-            if (startUpdating(notifier))
</del><ins>+            if (startUpdating(notifier.get()))
</ins><span class="cx">                 notifier-&gt;startTimerIfNeeded();
</span><span class="cx">             else
</span><span class="cx">                 notifier-&gt;setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(failedToStartServiceErrorMessage)));
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationGeolocationControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/geolocation/GeolocationController.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/GeolocationController.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/geolocation/GeolocationController.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -104,16 +104,16 @@
</span><span class="cx">     m_lastPosition = position;
</span><span class="cx">     Vector&lt;RefPtr&lt;Geolocation&gt;&gt; observersVector;
</span><span class="cx">     copyToVector(m_observers, observersVector);
</span><del>-    for (size_t i = 0; i &lt; observersVector.size(); ++i)
-        observersVector[i]-&gt;positionChanged();
</del><ins>+    for (auto&amp; observer : observersVector)
+        observer-&gt;positionChanged();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GeolocationController::errorOccurred(GeolocationError* error)
</span><span class="cx"> {
</span><span class="cx">     Vector&lt;RefPtr&lt;Geolocation&gt;&gt; observersVector;
</span><span class="cx">     copyToVector(m_observers, observersVector);
</span><del>-    for (size_t i = 0; i &lt; observersVector.size(); ++i)
-        observersVector[i]-&gt;setError(error);
</del><ins>+    for (auto&amp; observer : observersVector)
+        observer-&gt;setError(error);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> GeolocationPosition* GeolocationController::lastPosition()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -145,8 +145,8 @@
</span><span class="cx"> PassRefPtr&lt;DOMStringList&gt; IDBDatabase::objectStoreNames() const
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;DOMStringList&gt; objectStoreNames = DOMStringList::create();
</span><del>-    for (IDBDatabaseMetadata::ObjectStoreMap::const_iterator it = m_metadata.objectStores.begin(); it != m_metadata.objectStores.end(); ++it)
-        objectStoreNames-&gt;append(it-&gt;value.name);
</del><ins>+    for (auto&amp; objectStore : m_metadata.objectStores.values())
+        objectStoreNames-&gt;append(objectStore.name);
</ins><span class="cx">     objectStoreNames-&gt;sort();
</span><span class="cx">     return objectStoreNames.release();
</span><span class="cx"> }
</span><span class="lines">@@ -256,8 +256,8 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;int64_t&gt; objectStoreIds;
</span><del>-    for (size_t i = 0; i &lt; scope.size(); ++i) {
-        int64_t objectStoreId = findObjectStoreId(scope[i]);
</del><ins>+    for (auto&amp; name : scope) {
+        int64_t objectStoreId = findObjectStoreId(name);
</ins><span class="cx">         if (objectStoreId == IDBObjectStoreMetadata::InvalidId) {
</span><span class="cx">             ec = IDBDatabaseException::NotFoundError;
</span><span class="cx">             return 0;
</span><span class="lines">@@ -281,8 +281,8 @@
</span><span class="cx"> 
</span><span class="cx"> void IDBDatabase::forceClose()
</span><span class="cx"> {
</span><del>-    for (TransactionMap::const_iterator::Values it = m_transactions.begin().values(), end = m_transactions.end().values(); it != end; ++it)
-        (*it)-&gt;abort(IGNORE_EXCEPTION);
</del><ins>+    for (auto&amp; transaction : m_transactions.values())
+        transaction-&gt;abort(IGNORE_EXCEPTION);
</ins><span class="cx">     this-&gt;close();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -317,8 +317,8 @@
</span><span class="cx">     // connection. They would have been scheduled by the backend when another
</span><span class="cx">     // connection called setVersion, but the frontend connection is being
</span><span class="cx">     // closed before they could fire.
</span><del>-    for (size_t i = 0; i &lt; m_enqueuedEvents.size(); ++i) {
-        bool removed = eventQueue.cancelEvent(*m_enqueuedEvents[i]);
</del><ins>+    for (auto&amp; event : m_enqueuedEvents) {
+        bool removed = eventQueue.cancelEvent(*event);
</ins><span class="cx">         ASSERT_UNUSED(removed, removed);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -360,10 +360,10 @@
</span><span class="cx"> 
</span><span class="cx"> int64_t IDBDatabase::findObjectStoreId(const String&amp; name) const
</span><span class="cx"> {
</span><del>-    for (IDBDatabaseMetadata::ObjectStoreMap::const_iterator it = m_metadata.objectStores.begin(); it != m_metadata.objectStores.end(); ++it) {
-        if (it-&gt;value.name == name) {
-            ASSERT(it-&gt;key != IDBObjectStoreMetadata::InvalidId);
-            return it-&gt;key;
</del><ins>+    for (auto&amp; objectStore : m_metadata.objectStores) {
+        if (objectStore.value.name == name) {
+            ASSERT(objectStore.key != IDBObjectStoreMetadata::InvalidId);
+            return objectStore.key;
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     return IDBObjectStoreMetadata::InvalidId;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseBackendcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -497,10 +497,10 @@
</span><span class="cx">     RefPtr&lt;IDBCallbacks&gt; callbacks = prpCallbacks;
</span><span class="cx">     RefPtr&lt;IDBDatabaseCallbacks&gt; databaseCallbacks = prpDatabaseCallbacks;
</span><span class="cx">     ASSERT(callbacks);
</span><del>-    for (DatabaseCallbacksSet::const_iterator it = m_databaseCallbacksSet.begin(); it != m_databaseCallbacksSet.end(); ++it) {
</del><ins>+    for (auto&amp; callback : m_databaseCallbacksSet) {
</ins><span class="cx">         // Front end ensures the event is not fired at connections that have closePending set.
</span><del>-        if (*it != databaseCallbacks)
-            (*it)-&gt;onVersionChange(m_metadata.version, requestedVersion, IndexedDB::VersionNullness::Null);
</del><ins>+        if (callback != databaseCallbacks)
+            callback-&gt;onVersionChange(m_metadata.version, requestedVersion, IndexedDB::VersionNullness::Null);
</ins><span class="cx">     }
</span><span class="cx">     // The spec dictates we wait until all the version change events are
</span><span class="cx">     // delivered and then check m_databaseCallbacks.empty() before proceeding
</span><span class="lines">@@ -531,9 +531,9 @@
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;IDBCallbacks&gt; callbacks = prpCallbacks;
</span><span class="cx">     if (isDeleteDatabaseBlocked()) {
</span><del>-        for (DatabaseCallbacksSet::const_iterator it = m_databaseCallbacksSet.begin(); it != m_databaseCallbacksSet.end(); ++it) {
</del><ins>+        for (auto&amp; callback : m_databaseCallbacksSet) {
</ins><span class="cx">             // Front end ensures the event is not fired at connections that have closePending set.
</span><del>-            (*it)-&gt;onVersionChange(m_metadata.version, 0, IndexedDB::VersionNullness::Null);
</del><ins>+            callback-&gt;onVersionChange(m_metadata.version, 0, IndexedDB::VersionNullness::Null);
</ins><span class="cx">         }
</span><span class="cx">         // FIXME: Only fire onBlocked if there are open connections after the
</span><span class="cx">         // VersionChangeEvents are received, not just set up to fire.
</span><span class="lines">@@ -603,8 +603,8 @@
</span><span class="cx">     if (!connectionCount() &amp;&amp; !m_pendingOpenCalls.size() &amp;&amp; !m_pendingDeleteCalls.size()) {
</span><span class="cx">         TransactionMap transactions(m_transactions);
</span><span class="cx">         RefPtr&lt;IDBDatabaseError&gt; error = IDBDatabaseError::create(IDBDatabaseException::UnknownError, &quot;Connection is closing.&quot;);
</span><del>-        for (TransactionMap::const_iterator::Values it = transactions.values().begin(), end = transactions.values().end(); it != end; ++it)
-            (*it)-&gt;abort(error);
</del><ins>+        for (auto&amp; transaction : transactions.values())
+            transaction-&gt;abort(error);
</ins><span class="cx"> 
</span><span class="cx">         ASSERT(m_transactions.isEmpty());
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseMetadatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseMetadata.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseMetadata.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseMetadata.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -39,8 +39,8 @@
</span><span class="cx"> 
</span><span class="cx">     result.name = name.isolatedCopy();
</span><span class="cx"> 
</span><del>-    for (auto i = objectStores.begin(), end = objectStores.end(); i != end; ++i)
-        result.objectStores.set(i-&gt;key, i-&gt;value.isolatedCopy());
</del><ins>+    for (auto&amp; objectStore : objectStores)
+        result.objectStores.set(objectStore.key, objectStore.value.isolatedCopy());
</ins><span class="cx"> 
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="lines">@@ -55,8 +55,8 @@
</span><span class="cx">     result.name = name.isolatedCopy();
</span><span class="cx">     result.keyPath = keyPath.isolatedCopy();
</span><span class="cx"> 
</span><del>-    for (auto i = indexes.begin(), end = indexes.end(); i != end; ++i)
-        result.indexes.set(i-&gt;key, i-&gt;value.isolatedCopy());
</del><ins>+    for (auto&amp; index : indexes)
+        result.indexes.set(index.key, index.value.isolatedCopy());
</ins><span class="cx"> 
</span><span class="cx">     return result;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKey.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKey.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKey.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -42,8 +42,8 @@
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (m_type == ArrayType) {
</span><del>-        for (size_t i = 0; i &lt; m_array.size(); i++) {
-            if (!m_array[i]-&gt;isValid())
</del><ins>+        for (auto&amp; key : m_array) {
+            if (!key-&gt;isValid())
</ins><span class="cx">                 return false;
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKey.h (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKey.h        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKey.h        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -64,20 +64,20 @@
</span><span class="cx">         KeyArray result;
</span><span class="cx"> 
</span><span class="cx">         size_t sizeEstimate = 0;
</span><del>-        for (size_t i = 0; i &lt; array.size(); i++) {
-            if (!array[i]-&gt;isValid())
</del><ins>+        for (auto&amp; key : array) {
+            if (!key-&gt;isValid())
</ins><span class="cx">                 continue;
</span><span class="cx"> 
</span><span class="cx">             bool skip = false;
</span><del>-            for (size_t j = 0; j &lt; result.size(); j++) {
-                if (array[i]-&gt;isEqual(result[j].get())) {
</del><ins>+            for (auto&amp; resultKey : result) {
+                if (key-&gt;isEqual(resultKey.get())) {
</ins><span class="cx">                     skip = true;
</span><span class="cx">                     break;
</span><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx">             if (!skip) {
</span><del>-                result.append(array[i]);
-                sizeEstimate += array[i]-&gt;m_sizeEstimate;
</del><ins>+                result.append(key);
+                sizeEstimate += key-&gt;m_sizeEstimate;
</ins><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">         RefPtr&lt;IDBKey&gt; idbKey = adoptRef(new IDBKey(result, sizeEstimate));
</span><span class="lines">@@ -88,8 +88,8 @@
</span><span class="cx">     static Ref&lt;IDBKey&gt; createArray(const KeyArray&amp; array)
</span><span class="cx">     {
</span><span class="cx">         size_t sizeEstimate = 0;
</span><del>-        for (size_t i = 0; i &lt; array.size(); ++i)
-            sizeEstimate += array[i]-&gt;m_sizeEstimate;
</del><ins>+        for (auto&amp; key : array)
+            sizeEstimate += key-&gt;m_sizeEstimate;
</ins><span class="cx"> 
</span><span class="cx">         return adoptRef(*new IDBKey(array, sizeEstimate));
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyPathcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyPath.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyPath.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyPath.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -203,8 +203,8 @@
</span><span class="cx">     , m_array(array)
</span><span class="cx"> {
</span><span class="cx"> #ifndef NDEBUG
</span><del>-    for (size_t i = 0; i &lt; m_array.size(); ++i)
-        ASSERT(!m_array[i].isNull());
</del><ins>+    for (auto&amp; key : array)
+        ASSERT(!key.isNull());
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -220,8 +220,8 @@
</span><span class="cx">     case ArrayType:
</span><span class="cx">         if (m_array.isEmpty())
</span><span class="cx">             return false;
</span><del>-        for (size_t i = 0; i &lt; m_array.size(); ++i) {
-            if (!IDBIsValidKeyPath(m_array[i]))
</del><ins>+        for (auto&amp; key : m_array) {
+            if (!IDBIsValidKeyPath(key))
</ins><span class="cx">                 return false;
</span><span class="cx">         }
</span><span class="cx">         return true;
</span><span class="lines">@@ -254,8 +254,8 @@
</span><span class="cx">     result.m_string = m_string.isolatedCopy();
</span><span class="cx"> 
</span><span class="cx">     result.m_array.reserveInitialCapacity(m_array.size());
</span><del>-    for (size_t i = 0; i &lt; m_array.size(); ++i)
-        result.m_array.uncheckedAppend(m_array[i].isolatedCopy());
</del><ins>+    for (auto&amp; key : m_array)
+        result.m_array.uncheckedAppend(key.isolatedCopy());
</ins><span class="cx"> 
</span><span class="cx">     return result;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -61,8 +61,8 @@
</span><span class="cx"> {
</span><span class="cx">     LOG(StorageAPI, &quot;IDBObjectStore::indexNames&quot;);
</span><span class="cx">     RefPtr&lt;DOMStringList&gt; indexNames = DOMStringList::create();
</span><del>-    for (IDBObjectStoreMetadata::IndexMap::const_iterator it = m_metadata.indexes.begin(); it != m_metadata.indexes.end(); ++it)
-        indexNames-&gt;append(it-&gt;value.name);
</del><ins>+    for (auto&amp; index : m_metadata.indexes.values())
+        indexNames-&gt;append(index.name);
</ins><span class="cx">     indexNames-&gt;sort();
</span><span class="cx">     return indexNames.release();
</span><span class="cx"> }
</span><span class="lines">@@ -194,15 +194,15 @@
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;int64_t&gt; indexIds;
</span><span class="cx">     Vector&lt;IndexKeys&gt; indexKeys;
</span><del>-    for (IDBObjectStoreMetadata::IndexMap::const_iterator it = m_metadata.indexes.begin(); it != m_metadata.indexes.end(); ++it) {
</del><ins>+    for (auto&amp; index : m_metadata.indexes) {
</ins><span class="cx">         Vector&lt;IDBKeyData&gt; keyDatas;
</span><del>-        generateIndexKeysForValue(requestState.exec(), it-&gt;value, value, keyDatas);
-        indexIds.append(it-&gt;key);
</del><ins>+        generateIndexKeysForValue(requestState.exec(), index.value, value, keyDatas);
+        indexIds.append(index.key);
</ins><span class="cx"> 
</span><span class="cx">         // FIXME: Much of the Indexed DB code needs to use IDBKeyData directly to avoid wasteful conversions like this.
</span><span class="cx">         Vector&lt;RefPtr&lt;IDBKey&gt;&gt; keys;
</span><del>-        for (auto&amp; i : keyDatas) {
-            RefPtr&lt;IDBKey&gt; key = i.maybeCreateIDBKey();
</del><ins>+        for (auto&amp; keyData : keyDatas) {
+            RefPtr&lt;IDBKey&gt; key = keyData.maybeCreateIDBKey();
</ins><span class="cx">             if (key)
</span><span class="cx">                 keys.append(key.release());
</span><span class="cx">         }
</span><span class="lines">@@ -324,8 +324,8 @@
</span><span class="cx">             generateIndexKeysForValue(request-&gt;requestState()-&gt;exec(), m_indexMetadata, value, indexKeyDatas);
</span><span class="cx"> 
</span><span class="cx">             Vector&lt;RefPtr&lt;IDBKey&gt;&gt; indexKeys;
</span><del>-            for (auto&amp; i : indexKeyDatas) {
-                RefPtr&lt;IDBKey&gt; key = i.maybeCreateIDBKey();
</del><ins>+            for (auto&amp; indexKeyData : indexKeyDatas) {
+                RefPtr&lt;IDBKey&gt; key = indexKeyData.maybeCreateIDBKey();
</ins><span class="cx">                 if (key)
</span><span class="cx">                     indexKeys.append(key.release());
</span><span class="cx">             }
</span><span class="lines">@@ -430,9 +430,9 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     const IDBIndexMetadata* indexMetadata(0);
</span><del>-    for (IDBObjectStoreMetadata::IndexMap::const_iterator it = m_metadata.indexes.begin(); it != m_metadata.indexes.end(); ++it) {
-        if (it-&gt;value.name == name) {
-            indexMetadata = &amp;it-&gt;value;
</del><ins>+    for (auto&amp; index : m_metadata.indexes.values()) {
+        if (index.name == name) {
+            indexMetadata = &amp;index;
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -555,10 +555,10 @@
</span><span class="cx"> 
</span><span class="cx"> int64_t IDBObjectStore::findIndexId(const String&amp; name) const
</span><span class="cx"> {
</span><del>-    for (IDBObjectStoreMetadata::IndexMap::const_iterator it = m_metadata.indexes.begin(); it != m_metadata.indexes.end(); ++it) {
-        if (it-&gt;value.name == name) {
-            ASSERT(it-&gt;key != IDBIndexMetadata::InvalidId);
-            return it-&gt;key;
</del><ins>+    for (auto&amp; index : m_metadata.indexes) {
+        if (index.value.name == name) {
+            ASSERT(index.key != IDBIndexMetadata::InvalidId);
+            return index.key;
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     return IDBIndexMetadata::InvalidId;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBPendingTransactionMonitorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -58,10 +58,8 @@
</span><span class="cx"> void IDBPendingTransactionMonitor::deactivateNewTransactions()
</span><span class="cx"> {
</span><span class="cx">     ThreadSpecific&lt;TransactionList&gt;&amp; list = transactions();
</span><del>-    for (size_t i = 0; i &lt; list-&gt;size(); ++i) {
-        RefPtr&lt;IDBTransaction&gt; transaction = list-&gt;at(i);
</del><ins>+    for (auto&amp; transaction : *list)
</ins><span class="cx">         transaction-&gt;setActive(false);
</span><del>-    }
</del><span class="cx">     // FIXME: Exercise this call to clear() in a layout test.
</span><span class="cx">     list-&gt;clear();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -163,8 +163,8 @@
</span><span class="cx">     RefPtr&lt;IDBRequest&gt; self(this);
</span><span class="cx"> 
</span><span class="cx">     EventQueue&amp; eventQueue = scriptExecutionContext()-&gt;eventQueue();
</span><del>-    for (size_t i = 0; i &lt; m_enqueuedEvents.size(); ++i) {
-        bool removed = eventQueue.cancelEvent(*m_enqueuedEvents[i]);
</del><ins>+    for (auto&amp; event : m_enqueuedEvents) {
+        bool removed = eventQueue.cancelEvent(*event);
</ins><span class="cx">         ASSERT_UNUSED(removed, removed);
</span><span class="cx">     }
</span><span class="cx">     m_enqueuedEvents.clear();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -258,8 +258,8 @@
</span><span class="cx"> {
</span><span class="cx">     HashSet&lt;IDBCursor*&gt; cursors;
</span><span class="cx">     cursors.swap(m_openCursors);
</span><del>-    for (HashSet&lt;IDBCursor*&gt;::iterator i = cursors.begin(); i != cursors.end(); ++i)
-        (*i)-&gt;close();
</del><ins>+    for (auto&amp; cursor : cursors)
+        cursor-&gt;close();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBTransaction::registerRequest(IDBRequest* request)
</span><span class="lines">@@ -297,8 +297,8 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (isVersionChange()) {
</span><del>-        for (IDBObjectStoreMetadataMap::iterator it = m_objectStoreCleanupMap.begin(); it != m_objectStoreCleanupMap.end(); ++it)
-            it-&gt;key-&gt;setMetadata(it-&gt;value);
</del><ins>+        for (auto&amp; objectStore : m_objectStoreCleanupMap)
+            objectStore.key-&gt;setMetadata(objectStore.value);
</ins><span class="cx">         m_database-&gt;setMetadata(m_previousMetadata);
</span><span class="cx">         m_database-&gt;close();
</span><span class="cx">     }
</span><span class="lines">@@ -370,11 +370,11 @@
</span><span class="cx">     m_state = Finished;
</span><span class="cx"> 
</span><span class="cx">     // Break reference cycles.
</span><del>-    for (IDBObjectStoreMap::iterator it = m_objectStoreMap.begin(); it != m_objectStoreMap.end(); ++it)
-        it-&gt;value-&gt;transactionFinished();
</del><ins>+    for (auto&amp; objectStore : m_objectStoreMap)
+        objectStore.value-&gt;transactionFinished();
</ins><span class="cx">     m_objectStoreMap.clear();
</span><del>-    for (IDBObjectStoreSet::iterator it = m_deletedObjectStores.begin(); it != m_deletedObjectStores.end(); ++it)
-        (*it)-&gt;transactionFinished();
</del><ins>+    for (auto&amp; objectStore : m_deletedObjectStores)
+        objectStore-&gt;transactionFinished();
</ins><span class="cx">     m_deletedObjectStores.clear();
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;RefPtr&lt;EventTarget&gt;&gt; targets;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactionBackendcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -44,8 +44,8 @@
</span><span class="cx"> Ref&lt;IDBTransactionBackend&gt; IDBTransactionBackend::create(IDBDatabaseBackend* databaseBackend, int64_t id, PassRefPtr&lt;IDBDatabaseCallbacks&gt; callbacks, const Vector&lt;int64_t&gt;&amp; objectStoreIds, IndexedDB::TransactionMode mode)
</span><span class="cx"> {
</span><span class="cx">     HashSet&lt;int64_t&gt; objectStoreHashSet;
</span><del>-    for (size_t i = 0; i &lt; objectStoreIds.size(); ++i)
-        objectStoreHashSet.add(objectStoreIds[i]);
</del><ins>+    for (auto&amp; id : objectStoreIds)
+        objectStoreHashSet.add(id);
</ins><span class="cx"> 
</span><span class="cx">     return adoptRef(*new IDBTransactionBackend(databaseBackend, id, callbacks, objectStoreHashSet, mode));
</span><span class="cx"> }
</span><span class="lines">@@ -307,8 +307,8 @@
</span><span class="cx"> 
</span><span class="cx"> void IDBTransactionBackend::closeOpenCursors()
</span><span class="cx"> {
</span><del>-    for (HashSet&lt;IDBCursorBackend*&gt;::iterator i = m_openCursors.begin(); i != m_openCursors.end(); ++i)
-        (*i)-&gt;close();
</del><ins>+    for (auto&amp; cursor : m_openCursors)
+        cursor-&gt;close();
</ins><span class="cx">     m_openCursors.clear();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasourceMediaSourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -836,8 +836,8 @@
</span><span class="cx">     m_activeSourceBuffers-&gt;clear();
</span><span class="cx"> 
</span><span class="cx">     // Clear SourceBuffer references to this object.
</span><del>-    for (unsigned long i = 0, length =  m_sourceBuffers-&gt;length(); i &lt; length; ++i)
-        m_sourceBuffers-&gt;item(i)-&gt;removedFromMediaSource();
</del><ins>+    for (auto&amp; buffer : *m_sourceBuffers)
+        buffer-&gt;removedFromMediaSource();
</ins><span class="cx">     m_sourceBuffers-&gt;clear();
</span><span class="cx">     
</span><span class="cx">     scheduleEvent(eventNames().sourcecloseEvent);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaConstraintsImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaConstraintsImpl.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaConstraintsImpl.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/mediastream/MediaConstraintsImpl.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -67,8 +67,8 @@
</span><span class="cx">     String mandatory = ASCIILiteral(&quot;mandatory&quot;);
</span><span class="cx">     String optional = ASCIILiteral(&quot;optional&quot;);
</span><span class="cx"> 
</span><del>-    for (Vector&lt;String&gt;::iterator it = names.begin(); it != names.end(); ++it) {
-        if (*it != mandatory &amp;&amp; *it != optional)
</del><ins>+    for (auto&amp; name : names) {
+        if (name != mandatory &amp;&amp; name != optional)
</ins><span class="cx">             return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -122,9 +122,8 @@
</span><span class="cx"> void MediaConstraintsImpl::getMandatoryConstraints(Vector&lt;MediaConstraint&gt;&amp; constraints) const
</span><span class="cx"> {
</span><span class="cx">     constraints.clear();
</span><del>-    HashMap&lt;String, String&gt;::const_iterator i = m_mandatoryConstraints.begin();
-    for (; i != m_mandatoryConstraints.end(); ++i)
-        constraints.append(MediaConstraint(i-&gt;key, i-&gt;value));
</del><ins>+    for (auto&amp; constraint : m_mandatoryConstraints)
+        constraints.append(MediaConstraint(constraint.key, constraint.value));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MediaConstraintsImpl::getOptionalConstraints(Vector&lt;MediaConstraint&gt;&amp; constraints) const
</span><span class="lines">@@ -145,10 +144,9 @@
</span><span class="cx"> 
</span><span class="cx"> bool MediaConstraintsImpl::getOptionalConstraintValue(const String&amp; name, String&amp; value) const
</span><span class="cx"> {
</span><del>-    Vector&lt;MediaConstraint&gt;::const_iterator i = m_optionalConstraints.begin();
-    for (; i != m_optionalConstraints.end(); ++i) {
-        if (i-&gt;m_name == name) {
-            value = i-&gt;m_value;
</del><ins>+    for (auto&amp; constraint : m_optionalConstraints) {
+        if (constraint.m_name == name) {
+            value = constraint.m_value;
</ins><span class="cx">             return true;
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaStreamcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -51,11 +51,11 @@
</span><span class="cx">     Vector&lt;RefPtr&lt;MediaStreamTrackPrivate&gt;&gt; audioTracks;
</span><span class="cx">     Vector&lt;RefPtr&lt;MediaStreamTrackPrivate&gt;&gt; videoTracks;
</span><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; stream-&gt;m_audioTracks.size(); ++i)
-        audioTracks.append(&amp;stream-&gt;m_audioTracks[i]-&gt;privateTrack());
</del><ins>+    for (auto&amp; track : stream-&gt;m_audioTracks)
+        audioTracks.append(&amp;track-&gt;privateTrack());
</ins><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; stream-&gt;m_videoTracks.size(); ++i)
-        videoTracks.append(&amp;stream-&gt;m_videoTracks[i]-&gt;privateTrack());
</del><ins>+    for (auto&amp; track : stream-&gt;m_videoTracks)
+        videoTracks.append(&amp;track-&gt;privateTrack());
</ins><span class="cx"> 
</span><span class="cx">     return MediaStream::create(context, MediaStreamPrivate::create(audioTracks, videoTracks));
</span><span class="cx"> }
</span><span class="lines">@@ -65,11 +65,11 @@
</span><span class="cx">     Vector&lt;RefPtr&lt;MediaStreamTrackPrivate&gt;&gt; audioTracks;
</span><span class="cx">     Vector&lt;RefPtr&lt;MediaStreamTrackPrivate&gt;&gt; videoTracks;
</span><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; tracks.size(); ++i) {
-        if (tracks[i]-&gt;kind() == &quot;audio&quot;)
-            audioTracks.append(&amp;tracks[i]-&gt;privateTrack());
</del><ins>+    for (auto&amp; track : tracks) {
+        if (track-&gt;kind() == &quot;audio&quot;)
+            audioTracks.append(&amp;track-&gt;privateTrack());
</ins><span class="cx">         else
</span><del>-            videoTracks.append(&amp;tracks[i]-&gt;privateTrack());
</del><ins>+            videoTracks.append(&amp;track-&gt;privateTrack());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return MediaStream::create(context, MediaStreamPrivate::create(audioTracks, videoTracks));
</span><span class="lines">@@ -134,8 +134,8 @@
</span><span class="cx"> 
</span><span class="cx"> void MediaStream::cloneMediaStreamTrackVector(Vector&lt;RefPtr&lt;MediaStreamTrack&gt;&gt;&amp; destination, const Vector&lt;RefPtr&lt;MediaStreamTrack&gt;&gt;&amp; source)
</span><span class="cx"> {
</span><del>-    for (auto it = source.begin(), end = source.end(); it != end; ++it)
-        destination.append((*it)-&gt;clone());
</del><ins>+    for (auto&amp; track : source)
+        destination.append(track-&gt;clone());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MediaStream::addTrack(PassRefPtr&lt;MediaStreamTrack&gt; prpTrack, ExceptionCode&amp; ec)
</span><span class="lines">@@ -146,8 +146,8 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (addTrack(prpTrack)) {
</span><del>-        for (auto observer = m_observers.begin(), end = m_observers.end(); observer != end; ++observer)
-            (*observer)-&gt;didAddOrRemoveTrack();
</del><ins>+        for (auto&amp; observer : m_observers)
+            observer-&gt;didAddOrRemoveTrack();
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -181,8 +181,8 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (removeTrack(prpTrack)) {
</span><del>-        for (auto observer = m_observers.begin(), end = m_observers.end(); observer != end; ++observer)
-            (*observer)-&gt;didAddOrRemoveTrack();
</del><ins>+        for (auto&amp; observer : m_observers)
+            observer-&gt;didAddOrRemoveTrack();
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -216,15 +216,15 @@
</span><span class="cx"> bool MediaStream::haveTrackWithSource(PassRefPtr&lt;RealtimeMediaSource&gt; source)
</span><span class="cx"> {
</span><span class="cx">     if (source-&gt;type() == RealtimeMediaSource::Audio) {
</span><del>-        for (auto it = m_audioTracks.begin(), end = m_audioTracks.end(); it != end; ++it) {
-            if ((*it)-&gt;source() == source.get())
</del><ins>+        for (auto&amp; track : m_audioTracks) {
+            if (track-&gt;source() == source.get())
</ins><span class="cx">                 return true;
</span><span class="cx">         }
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    for (auto it = m_videoTracks.begin(), end = m_videoTracks.end(); it != end; ++it) {
-        if ((*it)-&gt;source() == source.get())
</del><ins>+    for (auto&amp; track : m_videoTracks) {
+        if (track-&gt;source() == source.get())
</ins><span class="cx">             return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -233,14 +233,14 @@
</span><span class="cx"> 
</span><span class="cx"> MediaStreamTrack* MediaStream::getTrackById(String id)
</span><span class="cx"> {
</span><del>-    for (auto it = m_audioTracks.begin(), end = m_audioTracks.end(); it != end; ++it) {
-        if ((*it)-&gt;id() == id)
-            return (*it).get();
</del><ins>+    for (auto&amp; track : m_audioTracks) {
+        if (track-&gt;id() == id)
+            return track.get();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    for (auto it = m_videoTracks.begin(), end = m_videoTracks.end(); it != end; ++it) {
-        if ((*it)-&gt;id() == id)
-            return (*it).get();
</del><ins>+    for (auto&amp; track :  m_videoTracks) {
+        if (track-&gt;id() == id)
+            return track.get();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return nullptr;
</span><span class="lines">@@ -249,22 +249,22 @@
</span><span class="cx"> Vector&lt;RefPtr&lt;MediaStreamTrack&gt;&gt; MediaStream::getTracks()
</span><span class="cx"> {
</span><span class="cx">     Vector&lt;RefPtr&lt;MediaStreamTrack&gt;&gt; tracks;
</span><del>-    for (auto it = m_audioTracks.begin(), end = m_audioTracks.end(); it != end; ++it)
-        tracks.append((*it).get());
-    for (auto it = m_videoTracks.begin(), end = m_videoTracks.end(); it != end; ++it)
-        tracks.append((*it).get());
</del><ins>+    for (auto&amp; track : m_audioTracks)
+        tracks.append(track.get());
+    for (auto&amp; track : m_videoTracks)
+        tracks.append(track.get());
</ins><span class="cx"> 
</span><span class="cx">     return tracks;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MediaStream::trackDidEnd()
</span><span class="cx"> {
</span><del>-    for (auto it = m_audioTracks.begin(), end = m_audioTracks.end(); it != end; ++it) {
-        if (!(*it)-&gt;ended())
</del><ins>+    for (auto&amp; track : m_audioTracks) {
+        if (!track-&gt;ended())
</ins><span class="cx">             return;
</span><span class="cx">     }
</span><del>-    for (auto it = m_videoTracks.begin(), end = m_videoTracks.end(); it != end; ++it) {
-        if (!(*it)-&gt;ended())
</del><ins>+    for (auto&amp; track : m_videoTracks) {
+        if (!track-&gt;ended())
</ins><span class="cx">             return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -361,8 +361,8 @@
</span><span class="cx">     Vector&lt;RefPtr&lt;Event&gt;&gt; events;
</span><span class="cx">     events.swap(m_scheduledEvents);
</span><span class="cx"> 
</span><del>-    for (auto it = events.begin(), end = events.end(); it != end; ++it)
-        dispatchEvent((*it).release());
</del><ins>+    for (auto&amp; event : events)
+        dispatchEvent(event.release());
</ins><span class="cx"> 
</span><span class="cx">     events.clear();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaStreamCapabilitiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaStreamCapabilities.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaStreamCapabilities.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStreamCapabilities.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -58,12 +58,11 @@
</span><span class="cx">     if (!count)
</span><span class="cx">         return Vector&lt;String&gt;();
</span><span class="cx">     
</span><del>-    const Vector&lt;RealtimeMediaSourceStates::SourceType&gt;&amp; sourceTypes = m_SourceCapabilities-&gt;sourceTypes();
</del><span class="cx">     Vector&lt;String&gt; capabilities;
</span><span class="cx">     capabilities.reserveCapacity(count);
</span><span class="cx">     
</span><del>-    for (size_t i = 0; i &lt; count; ++i)
-        capabilities.append(RealtimeMediaSourceStates::sourceType(sourceTypes[i]));
</del><ins>+    for (auto&amp; type : m_SourceCapabilities-&gt;sourceTypes())
+        capabilities.append(RealtimeMediaSourceStates::sourceType(type));
</ins><span class="cx">     
</span><span class="cx">     return capabilities;
</span><span class="cx"> }
</span><span class="lines">@@ -73,14 +72,13 @@
</span><span class="cx">     size_t count = m_SourceCapabilities-&gt;sourceId().size();
</span><span class="cx">     if (!count)
</span><span class="cx">         return Vector&lt;String&gt;();
</span><del>-    
-    const Vector&lt;AtomicString&gt;&amp; sourceIds = m_SourceCapabilities-&gt;sourceId();
</del><ins>+
</ins><span class="cx">     Vector&lt;String&gt; capabilities;
</span><span class="cx">     capabilities.reserveCapacity(count);
</span><ins>+
+    for (auto&amp; id : m_SourceCapabilities-&gt;sourceId())
+        capabilities.append(id);
</ins><span class="cx">     
</span><del>-    for (size_t i = 0; i &lt; count; ++i)
-        capabilities.append(sourceIds[i]);
-    
</del><span class="cx">     return capabilities;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -92,12 +90,11 @@
</span><span class="cx">     if (!count)
</span><span class="cx">         return Vector&lt;String&gt;();
</span><span class="cx">     
</span><del>-    const Vector&lt;RealtimeMediaSourceStates::VideoFacingMode&gt;&amp; facingModes = m_SourceCapabilities-&gt;facingModes();
</del><span class="cx">     Vector&lt;String&gt; capabilities;
</span><span class="cx">     capabilities.reserveCapacity(count);
</span><span class="cx">     
</span><del>-    for (size_t i = 0; i &lt; count; ++i)
-        capabilities.append(RealtimeMediaSourceStates::facingMode(facingModes[i]));
</del><ins>+    for (auto&amp; mode : m_SourceCapabilities-&gt;facingModes())
+        capabilities.append(RealtimeMediaSourceStates::facingMode(mode));
</ins><span class="cx">     
</span><span class="cx">     return capabilities;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaStreamTrackcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -290,8 +290,8 @@
</span><span class="cx"> {
</span><span class="cx">     m_privateTrack-&gt;setReadyState(RealtimeMediaSource::Ended);
</span><span class="cx"> 
</span><del>-    for (Vector&lt;Observer*&gt;::iterator i = m_observers.begin(); i != m_observers.end(); ++i)
-        (*i)-&gt;trackDidEnd();
</del><ins>+    for (auto&amp; observer : m_observers)
+        observer-&gt;trackDidEnd();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MediaStreamTrack::stop()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaStreamTrackSourcesRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaStreamTrackSourcesRequest.cpp (185100 => 185101)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaStreamTrackSourcesRequest.cpp        2015-06-02 03:11:11 UTC (rev 185100)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStreamTrackSourcesRequest.cpp        2015-06-02 03:13:26 UTC (rev 185101)
</span><span class="lines">@@ -52,8 +52,8 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_callback);
</span><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; requestSourceInfos.size(); ++i)
-        m_sourceInfos.append(SourceInfo::create(requestSourceInfos[i]));
</del><ins>+    for (auto&amp; info : requestSourceInfos)
+        m_sourceInfos.append(SourceInfo::create(info));
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;MediaStreamTrackSourcesRequest&gt; protectedThis(this);
</span><span class="cx">     callOnMainThread([protectedThis] {
</span></span></pre>
</div>
</div>

</body>
</html>