<!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>[161979] 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/161979">161979</a></dd>
<dt>Author</dt> <dd>cfleizach@apple.com</dd>
<dt>Date</dt> <dd>2014-01-14 10:09:51 -0800 (Tue, 14 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>AX: Modernize AccessibilityChildrenVector loops
https://bugs.webkit.org/show_bug.cgi?id=126915

Reviewed by Anders Carlsson.

Change appropriate for loops to use the new style.
Use auto where appropriate.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::focusedImageMapUIElement):
* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::addRowDescendant):
* accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::rowIndexRange):
* accessibility/AccessibilityARIAGridRow.cpp:
(WebCore::AccessibilityARIAGridRow::disclosedRows):
(WebCore::AccessibilityARIAGridRow::disclosedByRow):
(WebCore::AccessibilityARIAGridRow::parentTable):
(WebCore::AccessibilityARIAGridRow::headerObject):
* accessibility/AccessibilityListBox.cpp:
(WebCore::AccessibilityListBox::addChildren):
(WebCore::AccessibilityListBox::setSelectedChildren):
(WebCore::AccessibilityListBox::selectedChildren):
* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::listBoxOptionIndex):
* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::didUpdateActiveOption):
* accessibility/AccessibilityMenuListPopup.cpp:
(WebCore::AccessibilityMenuListPopup::addChildren):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::insertChild):
(WebCore::AccessibilityNodeObject::selectedRadioButton):
(WebCore::AccessibilityNodeObject::selectedTabItem):
(WebCore::AccessibilityNodeObject::ariaLabeledByText):
* accessibility/AccessibilityObject.cpp:
(WebCore::appendChildrenToArray):
(WebCore::AccessibilityObject::clearChildren):
(WebCore::AccessibilityObject::ariaTreeRows):
(WebCore::AccessibilityObject::ariaTreeItemContent):
(WebCore::AccessibilityObject::ariaTreeItemDisclosedRows):
(WebCore::AccessibilityObject::elementAccessibilityHitTest):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
(WebCore::AccessibilityRenderObject::ariaFlowToElements):
(WebCore::AccessibilityRenderObject::isTabItemSelected):
(WebCore::AccessibilityRenderObject::setSelectedRows):
(WebCore::AccessibilityRenderObject::ariaOwnsElements):
(WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
(WebCore::AccessibilityRenderObject::addRemoteSVGChildren):
(WebCore::AccessibilityRenderObject::updateAttachmentViewParents):
(WebCore::AccessibilityRenderObject::addHiddenChildren):
(WebCore::AccessibilityRenderObject::ariaSelectedRows):
(WebCore::AccessibilityRenderObject::ariaListboxSelectedChildren):
(WebCore::AccessibilityRenderObject::ariaListboxVisibleChildren):
(WebCore::AccessibilityRenderObject::tabChildren):
(WebCore::AccessibilityRenderObject::mathRadicandObject):
(WebCore::AccessibilityRenderObject::mathRootIndexObject):
(WebCore::AccessibilityRenderObject::mathNumeratorObject):
(WebCore::AccessibilityRenderObject::mathDenominatorObject):
(WebCore::AccessibilityRenderObject::mathUnderObject):
(WebCore::AccessibilityRenderObject::mathOverObject):
(WebCore::AccessibilityRenderObject::mathBaseObject):
(WebCore::AccessibilityRenderObject::mathSubscriptObject):
(WebCore::AccessibilityRenderObject::mathSuperscriptObject):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::columnHeaders):
(WebCore::AccessibilityTable::rowHeaders):
(WebCore::AccessibilityTable::visibleRows):
(WebCore::AccessibilityTable::cells):
(WebCore::AccessibilityTable::cellForColumnAndRow):
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::headerObject):
* accessibility/AccessibilityTableHeaderContainer.cpp:
(WebCore::AccessibilityTableHeaderContainer::addChildren):
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::headerObject):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
(-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
(-[WebAccessibilityObjectWrapper containsUnnaturallySegmentedChildren]):
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(convertMathPairsToNSArray):
(-[WebAccessibilityObjectWrapperBase accessibilityTitle]):
(-[WebAccessibilityObjectWrapperBase accessibilityDescription]):
(-[WebAccessibilityObjectWrapperBase accessibilityHelpText]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(convertToNSArray):
(convertStringsToNSArray):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityIndexOfChild:]):
(-[WebAccessibilityObjectWrapper accessibilityArrayAttributeCount:]):
(-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAXObjectCachecpp">trunk/Source/WebCore/accessibility/AXObjectCache.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityARIAGridcpp">trunk/Source/WebCore/accessibility/AccessibilityARIAGrid.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityARIAGridCellcpp">trunk/Source/WebCore/accessibility/AccessibilityARIAGridCell.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityARIAGridRowcpp">trunk/Source/WebCore/accessibility/AccessibilityARIAGridRow.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityListBoxcpp">trunk/Source/WebCore/accessibility/AccessibilityListBox.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityListBoxOptioncpp">trunk/Source/WebCore/accessibility/AccessibilityListBoxOption.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityMenuListcpp">trunk/Source/WebCore/accessibility/AccessibilityMenuList.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityMenuListPopupcpp">trunk/Source/WebCore/accessibility/AccessibilityMenuListPopup.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityNodeObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityTablecpp">trunk/Source/WebCore/accessibility/AccessibilityTable.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityTableColumncpp">trunk/Source/WebCore/accessibility/AccessibilityTableColumn.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityTableHeaderContainercpp">trunk/Source/WebCore/accessibility/AccessibilityTableHeaderContainer.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityTableRowcpp">trunk/Source/WebCore/accessibility/AccessibilityTableRow.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityiosWebAccessibilityObjectWrapperIOSmm">trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm</a></li>
<li><a href="#trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperBasemm">trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm</a></li>
<li><a href="#trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm">trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (161978 => 161979)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-14 17:53:14 UTC (rev 161978)
+++ trunk/Source/WebCore/ChangeLog        2014-01-14 18:09:51 UTC (rev 161979)
</span><span class="lines">@@ -1,3 +1,98 @@
</span><ins>+2014-01-13  Chris Fleizach  &lt;cfleizach@apple.com&gt;
+
+        AX: Modernize AccessibilityChildrenVector loops
+        https://bugs.webkit.org/show_bug.cgi?id=126915
+
+        Reviewed by Anders Carlsson.
+
+        Change appropriate for loops to use the new style.
+        Use auto where appropriate.
+
+        * accessibility/AXObjectCache.cpp:
+        (WebCore::AXObjectCache::focusedImageMapUIElement):
+        * accessibility/AccessibilityARIAGrid.cpp:
+        (WebCore::AccessibilityARIAGrid::addRowDescendant):
+        * accessibility/AccessibilityARIAGridCell.cpp:
+        (WebCore::AccessibilityARIAGridCell::rowIndexRange):
+        * accessibility/AccessibilityARIAGridRow.cpp:
+        (WebCore::AccessibilityARIAGridRow::disclosedRows):
+        (WebCore::AccessibilityARIAGridRow::disclosedByRow):
+        (WebCore::AccessibilityARIAGridRow::parentTable):
+        (WebCore::AccessibilityARIAGridRow::headerObject):
+        * accessibility/AccessibilityListBox.cpp:
+        (WebCore::AccessibilityListBox::addChildren):
+        (WebCore::AccessibilityListBox::setSelectedChildren):
+        (WebCore::AccessibilityListBox::selectedChildren):
+        * accessibility/AccessibilityListBoxOption.cpp:
+        (WebCore::AccessibilityListBoxOption::listBoxOptionIndex):
+        * accessibility/AccessibilityMenuList.cpp:
+        (WebCore::AccessibilityMenuList::didUpdateActiveOption):
+        * accessibility/AccessibilityMenuListPopup.cpp:
+        (WebCore::AccessibilityMenuListPopup::addChildren):
+        * accessibility/AccessibilityNodeObject.cpp:
+        (WebCore::AccessibilityNodeObject::insertChild):
+        (WebCore::AccessibilityNodeObject::selectedRadioButton):
+        (WebCore::AccessibilityNodeObject::selectedTabItem):
+        (WebCore::AccessibilityNodeObject::ariaLabeledByText):
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::appendChildrenToArray):
+        (WebCore::AccessibilityObject::clearChildren):
+        (WebCore::AccessibilityObject::ariaTreeRows):
+        (WebCore::AccessibilityObject::ariaTreeItemContent):
+        (WebCore::AccessibilityObject::ariaTreeItemDisclosedRows):
+        (WebCore::AccessibilityObject::elementAccessibilityHitTest):
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
+        (WebCore::AccessibilityRenderObject::ariaFlowToElements):
+        (WebCore::AccessibilityRenderObject::isTabItemSelected):
+        (WebCore::AccessibilityRenderObject::setSelectedRows):
+        (WebCore::AccessibilityRenderObject::ariaOwnsElements):
+        (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
+        (WebCore::AccessibilityRenderObject::addRemoteSVGChildren):
+        (WebCore::AccessibilityRenderObject::updateAttachmentViewParents):
+        (WebCore::AccessibilityRenderObject::addHiddenChildren):
+        (WebCore::AccessibilityRenderObject::ariaSelectedRows):
+        (WebCore::AccessibilityRenderObject::ariaListboxSelectedChildren):
+        (WebCore::AccessibilityRenderObject::ariaListboxVisibleChildren):
+        (WebCore::AccessibilityRenderObject::tabChildren):
+        (WebCore::AccessibilityRenderObject::mathRadicandObject):
+        (WebCore::AccessibilityRenderObject::mathRootIndexObject):
+        (WebCore::AccessibilityRenderObject::mathNumeratorObject):
+        (WebCore::AccessibilityRenderObject::mathDenominatorObject):
+        (WebCore::AccessibilityRenderObject::mathUnderObject):
+        (WebCore::AccessibilityRenderObject::mathOverObject):
+        (WebCore::AccessibilityRenderObject::mathBaseObject):
+        (WebCore::AccessibilityRenderObject::mathSubscriptObject):
+        (WebCore::AccessibilityRenderObject::mathSuperscriptObject):
+        * accessibility/AccessibilityTable.cpp:
+        (WebCore::AccessibilityTable::columnHeaders):
+        (WebCore::AccessibilityTable::rowHeaders):
+        (WebCore::AccessibilityTable::visibleRows):
+        (WebCore::AccessibilityTable::cells):
+        (WebCore::AccessibilityTable::cellForColumnAndRow):
+        * accessibility/AccessibilityTableColumn.cpp:
+        (WebCore::AccessibilityTableColumn::headerObject):
+        * accessibility/AccessibilityTableHeaderContainer.cpp:
+        (WebCore::AccessibilityTableHeaderContainer::addChildren):
+        * accessibility/AccessibilityTableRow.cpp:
+        (WebCore::AccessibilityTableRow::headerObject):
+        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+        (-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
+        (-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
+        (-[WebAccessibilityObjectWrapper containsUnnaturallySegmentedChildren]):
+        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
+        (convertMathPairsToNSArray):
+        (-[WebAccessibilityObjectWrapperBase accessibilityTitle]):
+        (-[WebAccessibilityObjectWrapperBase accessibilityDescription]):
+        (-[WebAccessibilityObjectWrapperBase accessibilityHelpText]):
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (convertToNSArray):
+        (convertStringsToNSArray):
+        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
+        (-[WebAccessibilityObjectWrapper accessibilityIndexOfChild:]):
+        (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeCount:]):
+        (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
+
</ins><span class="cx"> 2014-01-14  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WebGL] Invalid range checking in WebGLRenderingContext::validateTexFuncLevel
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAXObjectCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (161978 => 161979)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp        2014-01-14 17:53:14 UTC (rev 161978)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp        2014-01-14 18:09:51 UTC (rev 161979)
</span><span class="lines">@@ -118,12 +118,10 @@
</span><span class="cx"> {
</span><span class="cx">     m_notificationPostTimer.stop();
</span><span class="cx"> 
</span><del>-    HashMap&lt;AXID, RefPtr&lt;AccessibilityObject&gt;&gt;::iterator end = m_objects.end();
-    for (HashMap&lt;AXID, RefPtr&lt;AccessibilityObject&gt;&gt;::iterator it = m_objects.begin(); it != end; ++it) {
-        AccessibilityObject* obj = (*it).value.get();
-        detachWrapper(obj, CacheDestroyed);
-        obj-&gt;detach(CacheDestroyed);
-        removeAXID(obj);
</del><ins>+    for (const auto&amp; object : m_objects.values()) {
+        detachWrapper(object.get(), CacheDestroyed);
+        object-&gt;detach(CacheDestroyed);
+        removeAXID(object.get());
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -142,15 +140,12 @@
</span><span class="cx">     if (!axRenderImage)
</span><span class="cx">         return 0;
</span><span class="cx">     
</span><del>-    const AccessibilityObject::AccessibilityChildrenVector&amp; imageChildren = axRenderImage-&gt;children();
-    unsigned count = imageChildren.size();
-    for (unsigned k = 0; k &lt; count; ++k) {
-        AccessibilityObject* child = imageChildren[k].get();
</del><ins>+    for (const auto&amp; child : axRenderImage-&gt;children()) {
</ins><span class="cx">         if (!child-&gt;isImageMapLink())
</span><span class="cx">             continue;
</span><span class="cx">         
</span><del>-        if (toAccessibilityImageMapLink(child)-&gt;areaElement() == areaElement)
-            return child;
</del><ins>+        if (toAccessibilityImageMapLink(child.get())-&gt;areaElement() == areaElement)
+            return child.get();
</ins><span class="cx">     }    
</span><span class="cx">     
</span><span class="cx">     return 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityARIAGridcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityARIAGrid.cpp (161978 => 161979)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityARIAGrid.cpp        2014-01-14 17:53:14 UTC (rev 161978)
+++ trunk/Source/WebCore/accessibility/AccessibilityARIAGrid.cpp        2014-01-14 18:09:51 UTC (rev 161979)
</span><span class="lines">@@ -88,10 +88,8 @@
</span><span class="cx">     if (!rowChild-&gt;isTableRow()) {
</span><span class="cx">         // Although a &quot;grid&quot; should have rows as its direct descendants, if this is not a table row,
</span><span class="cx">         // dive deeper into the descendants to try to find a valid row.
</span><del>-        const AccessibilityChildrenVector&amp; children = rowChild-&gt;children();
-        size_t length = children.size();
-        for (size_t i = 0; i &lt; length; ++i)
-            addRowDescendant(children[i].get(), appendedRows, columnCount);
</del><ins>+        for (const auto&amp; child : rowChild-&gt;children())
+            addRowDescendant(child.get(), appendedRows, columnCount);
</ins><span class="cx">     } else
</span><span class="cx">         addTableCellChild(rowChild, appendedRows, columnCount);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityARIAGridCellcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityARIAGridCell.cpp (161978 => 161979)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityARIAGridCell.cpp        2014-01-14 17:53:14 UTC (rev 161978)
+++ trunk/Source/WebCore/accessibility/AccessibilityARIAGridCell.cpp        2014-01-14 18:09:51 UTC (rev 161979)
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx">         if (!columnCount)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        const AccessibilityChildrenVector&amp; siblings = parent-&gt;children();
</del><ins>+        const auto&amp; siblings = parent-&gt;children();
</ins><span class="cx">         unsigned childrenSize = siblings.size();
</span><span class="cx">         for (unsigned k = 0; k &lt; childrenSize; ++k) {
</span><span class="cx">             if (siblings[k].get() == this) {
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityARIAGridRowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityARIAGridRow.cpp (161978 => 161979)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityARIAGridRow.cpp        2014-01-14 17:53:14 UTC (rev 161978)
+++ trunk/Source/WebCore/accessibility/AccessibilityARIAGridRow.cpp        2014-01-14 18:09:51 UTC (rev 161979)
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx">         return;
</span><span class="cx">     
</span><span class="cx">     unsigned level = hierarchicalLevel();
</span><del>-    AccessibilityChildrenVector&amp; allRows = toAccessibilityTable(parent)-&gt;rows();
</del><ins>+    auto&amp; allRows = toAccessibilityTable(parent)-&gt;rows();
</ins><span class="cx">     int rowCount = allRows.size();
</span><span class="cx">     for (int k = index + 1; k &lt; rowCount; ++k) {
</span><span class="cx">         AccessibilityObject* row = allRows[k].get();
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx">     
</span><span class="cx">     // Search for the previous row that matches the correct level.
</span><span class="cx">     int index = rowIndex();
</span><del>-    AccessibilityChildrenVector&amp; allRows = toAccessibilityTable(parent)-&gt;rows();
</del><ins>+    auto&amp; allRows = toAccessibilityTable(parent)-&gt;rows();
</ins><span class="cx">     int rowCount = allRows.size();
</span><span class="cx">     if (index &gt;= rowCount)
</span><span class="cx">         return 0;
</span><span class="lines">@@ -111,7 +111,7 @@
</span><span class="cx">             return row;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    return 0;
</del><ins>+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> AccessibilityObject* AccessibilityARIAGridRow::parentTable() const
</span><span class="lines">@@ -124,20 +124,17 @@
</span><span class="cx">             return parent;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    return 0;
</del><ins>+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> AccessibilityObject* AccessibilityARIAGridRow::headerObject()
</span><span class="cx"> {
</span><del>-    const AccessibilityChildrenVector&amp; rowChildren = children();
-    unsigned childrenCount = rowChildren.size();
-    for (unsigned i = 0; i &lt; childrenCount; ++i) {
-        AccessibilityObject* cell = rowChildren[i].get();
-        if (cell-&gt;ariaRoleAttribute() == RowHeaderRole)
-            return cell;
</del><ins>+    for (const auto&amp; child : children()) {
+        if (child-&gt;ariaRoleAttribute() == RowHeaderRole)
+            return child.get();
</ins><span class="cx">     }
</span><span class="cx">     
</span><del>-    return 0;
</del><ins>+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityListBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityListBox.cpp (161978 => 161979)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityListBox.cpp        2014-01-14 17:53:14 UTC (rev 161978)
+++ trunk/Source/WebCore/accessibility/AccessibilityListBox.cpp        2014-01-14 18:09:51 UTC (rev 161979)
</span><span class="lines">@@ -72,12 +72,10 @@
</span><span class="cx">     
</span><span class="cx">     m_haveChildren = true;
</span><span class="cx">     
</span><del>-    const Vector&lt;HTMLElement*&gt;&amp; listItems = toHTMLSelectElement(selectNode)-&gt;listItems();
-    unsigned length = listItems.size();
-    for (unsigned i = 0; i &lt; length; i++) {
</del><ins>+    for (const auto&amp; listItem : toHTMLSelectElement(selectNode)-&gt;listItems()) {
</ins><span class="cx">         // The cast to HTMLElement below is safe because the only other possible listItem type
</span><span class="cx">         // would be a WMLElement, but WML builds don't use accessibility features at all.
</span><del>-        AccessibilityObject* listOption = listBoxOptionAccessibilityObject(listItems[i]);
</del><ins>+        AccessibilityObject* listOption = listBoxOptionAccessibilityObject(listItem);
</ins><span class="cx">         if (listOption &amp;&amp; !listOption-&gt;accessibilityIsIgnored())
</span><span class="cx">             m_children.append(listOption);
</span><span class="cx">     }
</span><span class="lines">@@ -93,20 +91,17 @@
</span><span class="cx">         return;
</span><span class="cx">     
</span><span class="cx">     // disable any selected options
</span><del>-    unsigned length = m_children.size();
-    for (unsigned i = 0; i &lt; length; i++) {
-        AccessibilityListBoxOption* listBoxOption = toAccessibilityListBoxOption(m_children[i].get());
</del><ins>+    for (const auto&amp; child : m_children) {
+        AccessibilityListBoxOption* listBoxOption = toAccessibilityListBoxOption(child.get());
</ins><span class="cx">         if (listBoxOption-&gt;isSelected())
</span><span class="cx">             listBoxOption-&gt;setSelected(false);
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    length = children.size();
-    for (unsigned i = 0; i &lt; length; i++) {
-        AccessibilityObject* obj = children[i].get();
</del><ins>+    for (const auto&amp; obj : children) {
</ins><span class="cx">         if (obj-&gt;roleValue() != ListBoxOptionRole)
</span><span class="cx">             continue;
</span><span class="cx">                 
</span><del>-        toAccessibilityListBoxOption(obj)-&gt;setSelected(true);
</del><ins>+        toAccessibilityListBoxOption(obj.get())-&gt;setSelected(true);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx">     
</span><span class="lines">@@ -117,10 +112,9 @@
</span><span class="cx">     if (!hasChildren())
</span><span class="cx">         addChildren();
</span><span class="cx">         
</span><del>-    unsigned length = m_children.size();
-    for (unsigned i = 0; i &lt; length; i++) {
-        if (toAccessibilityListBoxOption(m_children[i].get())-&gt;isSelected())
-            result.append(m_children[i]);
</del><ins>+    for (const auto&amp; child : m_children) {
+        if (toAccessibilityListBoxOption(child.get())-&gt;isSelected())
+            result.append(child.get());
</ins><span class="cx">     }    
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityListBoxOptioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityListBoxOption.cpp (161978 => 161979)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityListBoxOption.cpp        2014-01-14 17:53:14 UTC (rev 161978)
+++ trunk/Source/WebCore/accessibility/AccessibilityListBoxOption.cpp        2014-01-14 18:09:51 UTC (rev 161979)
</span><span class="lines">@@ -220,7 +220,7 @@
</span><span class="cx">     if (!selectElement) 
</span><span class="cx">         return -1;
</span><span class="cx">     
</span><del>-    const Vector&lt;HTMLElement*&gt;&amp; listItems = selectElement-&gt;listItems();
</del><ins>+    const auto&amp; listItems = selectElement-&gt;listItems();
</ins><span class="cx">     unsigned length = listItems.size();
</span><span class="cx">     for (unsigned i = 0; i &lt; length; i++)
</span><span class="cx">         if (listItems[i] == m_optionElement)
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityMenuListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityMenuList.cpp (161978 => 161979)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityMenuList.cpp        2014-01-14 17:53:14 UTC (rev 161978)
+++ trunk/Source/WebCore/accessibility/AccessibilityMenuList.cpp        2014-01-14 18:09:51 UTC (rev 161979)
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx">     Ref&lt;Document&gt; document(m_renderer-&gt;document());
</span><span class="cx">     AXObjectCache* cache = document-&gt;axObjectCache();
</span><span class="cx"> 
</span><del>-    const AccessibilityChildrenVector&amp; childObjects = children();
</del><ins>+    const auto&amp; childObjects = children();
</ins><span class="cx">     if (!childObjects.isEmpty()) {
</span><span class="cx">         ASSERT(childObjects.size() == 1);
</span><span class="cx">         ASSERT(childObjects[0]-&gt;isMenuListPopup());
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityMenuListPopupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityMenuListPopup.cpp (161978 => 161979)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityMenuListPopup.cpp        2014-01-14 17:53:14 UTC (rev 161978)
+++ trunk/Source/WebCore/accessibility/AccessibilityMenuListPopup.cpp        2014-01-14 18:09:51 UTC (rev 161979)
</span><span class="lines">@@ -102,10 +102,8 @@
</span><span class="cx"> 
</span><span class="cx">     m_haveChildren = true;
</span><span class="cx"> 
</span><del>-    const Vector&lt;HTMLElement*&gt;&amp; listItems = toHTMLSelectElement(selectNode)-&gt;listItems();
-    unsigned length = listItems.size();
-    for (unsigned i = 0; i &lt; length; i++) {
-        AccessibilityMenuListOption* option = menuListOptionAccessibilityObject(listItems[i]);
</del><ins>+    for (const auto&amp; listItem : toHTMLSelectElement(selectNode)-&gt;listItems()) {
+        AccessibilityMenuListOption* option = menuListOptionAccessibilityObject(listItem);
</ins><span class="cx">         if (option) {
</span><span class="cx">             option-&gt;setParent(this);
</span><span class="cx">             m_children.append(option);
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityNodeObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (161978 => 161979)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp        2014-01-14 17:53:14 UTC (rev 161978)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp        2014-01-14 18:09:51 UTC (rev 161979)
</span><span class="lines">@@ -335,7 +335,7 @@
</span><span class="cx">     child-&gt;clearChildren();
</span><span class="cx">     
</span><span class="cx">     if (child-&gt;accessibilityIsIgnored()) {
</span><del>-        const AccessibilityChildrenVector&amp; children = child-&gt;children();
</del><ins>+        const auto&amp; children = child-&gt;children();
</ins><span class="cx">         size_t length = children.size();
</span><span class="cx">         for (size_t i = 0; i &lt; length; ++i)
</span><span class="cx">             m_children.insert(index + i, children[i]);
</span><span class="lines">@@ -909,37 +909,30 @@
</span><span class="cx"> AccessibilityObject* AccessibilityNodeObject::selectedRadioButton()
</span><span class="cx"> {
</span><span class="cx">     if (!isRadioGroup())
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><del>-    const AccessibilityObject::AccessibilityChildrenVector&amp; children = this-&gt;children();
-
</del><span class="cx">     // Find the child radio button that is selected (ie. the intValue == 1).
</span><del>-    size_t size = children.size();
-    for (size_t i = 0; i &lt; size; ++i) {
-        AccessibilityObject* object = children[i].get();
-        if (object-&gt;roleValue() == RadioButtonRole &amp;&amp; object-&gt;checkboxOrRadioValue() == ButtonStateOn)
-            return object;
</del><ins>+    for (const auto&amp; child : children()) {
+        if (child-&gt;roleValue() == RadioButtonRole &amp;&amp; child-&gt;checkboxOrRadioValue() == ButtonStateOn)
+            return child.get();
</ins><span class="cx">     }
</span><del>-    return 0;
</del><ins>+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> AccessibilityObject* AccessibilityNodeObject::selectedTabItem()
</span><span class="cx"> {
</span><span class="cx">     if (!isTabList())
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><span class="cx">     // Find the child tab item that is selected (ie. the intValue == 1).
</span><span class="cx">     AccessibilityObject::AccessibilityChildrenVector tabs;
</span><span class="cx">     tabChildren(tabs);
</span><span class="cx"> 
</span><del>-    const AccessibilityObject::AccessibilityChildrenVector&amp; children = this-&gt;children();
-    size_t size = tabs.size();
-    for (size_t i = 0; i &lt; size; ++i) {
-        AccessibilityObject* object = children[i].get();
-        if (object-&gt;isTabItem() &amp;&amp; object-&gt;isChecked())
-            return object;
</del><ins>+    for (const auto&amp; child : children()) {
+        if (child-&gt;isTabItem() &amp;&amp; child-&gt;isChecked())
+            return child.get();
</ins><span class="cx">     }
</span><del>-    return 0;
</del><ins>+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> AccessibilityButtonState AccessibilityNodeObject::checkboxOrRadioValue() const
</span><span class="lines">@@ -1433,9 +1426,8 @@
</span><span class="cx">         ariaLabeledByElements(elements);
</span><span class="cx">         
</span><span class="cx">         Vector&lt;RefPtr&lt;AccessibilityObject&gt;&gt; axElements;
</span><del>-        unsigned length = elements.size();
-        for (unsigned k = 0; k &lt; length; k++) {
-            RefPtr&lt;AccessibilityObject&gt; axElement = axObjectCache()-&gt;getOrCreate(elements[k]);
</del><ins>+        for (const auto&amp; element : elements) {
+            RefPtr&lt;AccessibilityObject&gt; axElement = axObjectCache()-&gt;getOrCreate(element);
</ins><span class="cx">             axElements.append(axElement);
</span><span class="cx">         }
</span><span class="cx">         
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (161978 => 161979)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-01-14 17:53:14 UTC (rev 161978)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-01-14 18:09:51 UTC (rev 161979)
</span><span class="lines">@@ -417,7 +417,7 @@
</span><span class="cx"> {
</span><span class="cx">     // A table's children includes elements whose own children are also the table's children (due to the way the Mac exposes tables).
</span><span class="cx">     // The rows from the table should be queried, since those are direct descendants of the table, and they contain content.
</span><del>-    const AccessibilityObject::AccessibilityChildrenVector&amp; searchChildren = object-&gt;isAccessibilityTable() ? toAccessibilityTable(object)-&gt;rows() : object-&gt;children();
</del><ins>+    const auto&amp; searchChildren = object-&gt;isAccessibilityTable() ? toAccessibilityTable(object)-&gt;rows() : object-&gt;children();
</ins><span class="cx"> 
</span><span class="cx">     size_t childrenSize = searchChildren.size();
</span><span class="cx"> 
</span><span class="lines">@@ -1277,9 +1277,8 @@
</span><span class="cx"> void AccessibilityObject::clearChildren()
</span><span class="cx"> {
</span><span class="cx">     // Some objects have weak pointers to their parents and those associations need to be detached.
</span><del>-    size_t length = m_children.size();
-    for (size_t i = 0; i &lt; length; i++)
-        m_children[i]-&gt;detachFromParent();
</del><ins>+    for (const auto&amp; child : m_children)
+        child-&gt;detachFromParent();
</ins><span class="cx">     
</span><span class="cx">     m_children.clear();
</span><span class="cx">     m_haveChildren = false;
</span><span class="lines">@@ -1320,42 +1319,31 @@
</span><span class="cx"> 
</span><span class="cx"> void AccessibilityObject::ariaTreeRows(AccessibilityChildrenVector&amp; result)
</span><span class="cx"> {
</span><del>-    const AccessibilityChildrenVector&amp; axChildren = children();
-    unsigned count = axChildren.size();
-    for (unsigned k = 0; k &lt; count; ++k) {
-        AccessibilityObject* obj = axChildren[k].get();
-        
</del><ins>+    for (const auto&amp; child : children()) {
</ins><span class="cx">         // Add tree items as the rows.
</span><del>-        if (obj-&gt;roleValue() == TreeItemRole) 
-            result.append(obj);
</del><ins>+        if (child-&gt;roleValue() == TreeItemRole)
+            result.append(child);
</ins><span class="cx"> 
</span><span class="cx">         // Now see if this item also has rows hiding inside of it.
</span><del>-        obj-&gt;ariaTreeRows(result);
</del><ins>+        child-&gt;ariaTreeRows(result);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> void AccessibilityObject::ariaTreeItemContent(AccessibilityChildrenVector&amp; result)
</span><span class="cx"> {
</span><span class="cx">     // The ARIA tree item content are the item that are not other tree items or their containing groups.
</span><del>-    const AccessibilityChildrenVector&amp; axChildren = children();
-    unsigned count = axChildren.size();
-    for (unsigned k = 0; k &lt; count; ++k) {
-        AccessibilityObject* obj = axChildren[k].get();
-        AccessibilityRole role = obj-&gt;roleValue();
</del><ins>+    for (const auto&amp; child : children()) {
+        AccessibilityRole role = child-&gt;roleValue();
</ins><span class="cx">         if (role == TreeItemRole || role == GroupRole)
</span><span class="cx">             continue;
</span><span class="cx">         
</span><del>-        result.append(obj);
</del><ins>+        result.append(child);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void AccessibilityObject::ariaTreeItemDisclosedRows(AccessibilityChildrenVector&amp; result)
</span><span class="cx"> {
</span><del>-    const AccessibilityChildrenVector&amp; axChildren = children();
-    unsigned count = axChildren.size();
-    for (unsigned k = 0; k &lt; count; ++k) {
-        AccessibilityObject* obj = axChildren[k].get();
-        
</del><ins>+    for (const auto&amp; obj : children()) {
</ins><span class="cx">         // Add tree items as the rows.
</span><span class="cx">         if (obj-&gt;roleValue() == TreeItemRole)
</span><span class="cx">             result.append(obj);
</span><span class="lines">@@ -1677,10 +1665,9 @@
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     // Check if there are any mock elements that need to be handled.
</span><del>-    size_t count = m_children.size();
-    for (size_t k = 0; k &lt; count; k++) {
-        if (m_children[k]-&gt;isMockObject() &amp;&amp; m_children[k]-&gt;elementRect().contains(point))
-            return m_children[k]-&gt;elementAccessibilityHitTest(point);
</del><ins>+    for (const auto&amp; child : m_children) {
+        if (child-&gt;isMockObject() &amp;&amp; child-&gt;elementRect().contains(point))
+            return child-&gt;elementAccessibilityHitTest(point);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return const_cast&lt;AccessibilityObject*&gt;(this); 
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (161978 => 161979)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2014-01-14 17:53:14 UTC (rev 161978)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2014-01-14 18:09:51 UTC (rev 161979)
</span><span class="lines">@@ -962,10 +962,8 @@
</span><span class="cx">         Vector&lt;Ref&lt;Element&gt;&gt; formElements;
</span><span class="cx">         input-&gt;form()-&gt;getNamedElements(input-&gt;name(), formElements);
</span><span class="cx">         
</span><del>-        unsigned len = formElements.size();
-        for (unsigned i = 0; i &lt; len; ++i) {
-            Element&amp; associateElement = formElements[i].get();
-            if (AccessibilityObject* object = axObjectCache()-&gt;getOrCreate(&amp;associateElement))
</del><ins>+        for (auto&amp; associateElement : formElements) {
+            if (AccessibilityObject* object = axObjectCache()-&gt;getOrCreate(&amp;associateElement.get()))
</ins><span class="cx">                 linkedUIElements.append(object);        
</span><span class="cx">         } 
</span><span class="cx">     } else {
</span><span class="lines">@@ -1022,9 +1020,7 @@
</span><span class="cx">     elementsFromAttribute(elements, aria_flowtoAttr);
</span><span class="cx">     
</span><span class="cx">     AXObjectCache* cache = axObjectCache();
</span><del>-    unsigned count = elements.size();
-    for (unsigned k = 0; k &lt; count; ++k) {
-        Element* element = elements[k];
</del><ins>+    for (const auto&amp; element : elements) {
</ins><span class="cx">         AccessibilityObject* flowToElement = cache-&gt;getOrCreate(element);
</span><span class="cx">         if (flowToElement)
</span><span class="cx">             flowTo.append(flowToElement);
</span><span class="lines">@@ -1578,9 +1574,7 @@
</span><span class="cx">     Vector&lt;Element*&gt; elements;
</span><span class="cx">     elementsFromAttribute(elements, aria_controlsAttr);
</span><span class="cx">     
</span><del>-    unsigned count = elements.size();
-    for (unsigned k = 0; k &lt; count; ++k) {
-        Element* element = elements[k];
</del><ins>+    for (const auto&amp; element : elements) {
</ins><span class="cx">         AccessibilityObject* tabPanel = axObjectCache()-&gt;getOrCreate(element);
</span><span class="cx"> 
</span><span class="cx">         // A tab item should only control tab panels.
</span><span class="lines">@@ -1653,8 +1647,8 @@
</span><span class="cx">     if (count &gt; 1 &amp;&amp; !isMulti)
</span><span class="cx">         count = 1;
</span><span class="cx">     
</span><del>-    for (unsigned k = 0; k &lt; count; ++k)
-        selectedRows[k]-&gt;setSelected(true);
</del><ins>+    for (const auto&amp; selectedRow : selectedRows)
+        selectedRow-&gt;setSelected(true);
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> void AccessibilityRenderObject::setValue(const String&amp; string)
</span><span class="lines">@@ -1682,9 +1676,8 @@
</span><span class="cx">     Vector&lt;Element*&gt; elements;
</span><span class="cx">     elementsFromAttribute(elements, aria_ownsAttr);
</span><span class="cx">     
</span><del>-    unsigned count = elements.size();
-    for (unsigned k = 0; k &lt; count; ++k) {
-        RenderObject* render = elements[k]-&gt;renderer();
</del><ins>+    for (const auto&amp; element : elements) {
+        RenderObject* render = element-&gt;renderer();
</ins><span class="cx">         AccessibilityObject* obj = axObjectCache()-&gt;getOrCreate(render);
</span><span class="cx">         if (obj)
</span><span class="cx">             axObjects.append(obj);
</span><span class="lines">@@ -2155,12 +2148,9 @@
</span><span class="cx">     if (!parent)
</span><span class="cx">         return 0;
</span><span class="cx">     
</span><del>-    const AccessibilityObject::AccessibilityChildrenVector&amp; children = parent-&gt;children();
-    
-    unsigned count = children.size();
-    for (unsigned k = 0; k &lt; count; ++k) {
-        if (children[k]-&gt;elementRect().contains(point))
-            return children[k].get();
</del><ins>+    for (const auto&amp; child : parent-&gt;children()) {
+        if (child-&gt;elementRect().contains(point))
+            return child.get();
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     return 0;
</span><span class="lines">@@ -2859,10 +2849,8 @@
</span><span class="cx">     root-&gt;setParent(this);
</span><span class="cx">     
</span><span class="cx">     if (root-&gt;accessibilityIsIgnored()) {
</span><del>-        const AccessibilityChildrenVector&amp; children = root-&gt;children();
-        unsigned length = children.size();
-        for (unsigned i = 0; i &lt; length; ++i)
-            m_children.append(children[i]);
</del><ins>+        for (const auto&amp; child : root-&gt;children())
+            m_children.append(child);
</ins><span class="cx">     } else
</span><span class="cx">         m_children.append(root);
</span><span class="cx"> }
</span><span class="lines">@@ -2904,10 +2892,9 @@
</span><span class="cx">     if (accessibilityIsIgnored())
</span><span class="cx">         return;
</span><span class="cx">     
</span><del>-    size_t length = m_children.size();
-    for (size_t k = 0; k &lt; length; k++) {
-        if (m_children[k]-&gt;isAttachment())
-            m_children[k]-&gt;overrideAttachmentParent(this);
</del><ins>+    for (const auto&amp; child : m_children) {
+        if (child-&gt;isAttachment())
+            child-&gt;overrideAttachmentParent(this);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="lines">@@ -2941,7 +2928,7 @@
</span><span class="cx">             // Find out where the last render sibling is located within m_children.
</span><span class="cx">             AccessibilityObject* childObject = axObjectCache()-&gt;get(child-&gt;renderer());
</span><span class="cx">             if (childObject &amp;&amp; childObject-&gt;accessibilityIsIgnored()) {
</span><del>-                const AccessibilityChildrenVector&amp; children = childObject-&gt;children();
</del><ins>+                auto&amp; children = childObject-&gt;children();
</ins><span class="cx">                 if (children.size())
</span><span class="cx">                     childObject = children.last().get();
</span><span class="cx">                 else
</span><span class="lines">@@ -3068,10 +3055,9 @@
</span><span class="cx">             return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    unsigned count = allRows.size();
-    for (unsigned k = 0; k &lt; count; ++k) {
-        if (allRows[k]-&gt;isSelected()) {
-            result.append(allRows[k]);
</del><ins>+    for (const auto&amp; row : allRows) {
+        if (row-&gt;isSelected()) {
+            result.append(row);
</ins><span class="cx">             if (!isMulti)
</span><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="lines">@@ -3082,11 +3068,8 @@
</span><span class="cx"> {
</span><span class="cx">     bool isMulti = isMultiSelectable();
</span><span class="cx"> 
</span><del>-    const AccessibilityChildrenVector&amp; childObjects = children();
-    unsigned childrenSize = childObjects.size();
-    for (unsigned k = 0; k &lt; childrenSize; ++k) {
</del><ins>+    for (const auto&amp; child : children()) {
</ins><span class="cx">         // Every child should have aria-role option, and if so, check for selected attribute/state.
</span><del>-        AccessibilityObject* child = childObjects[k].get();
</del><span class="cx">         if (child-&gt;isSelected() &amp;&amp; child-&gt;ariaRoleAttribute() == ListBoxOptionRole) {
</span><span class="cx">             result.append(child);
</span><span class="cx">             if (!isMulti)
</span><span class="lines">@@ -3112,11 +3095,9 @@
</span><span class="cx">     if (!hasChildren())
</span><span class="cx">         addChildren();
</span><span class="cx">     
</span><del>-    const AccessibilityObject::AccessibilityChildrenVector&amp; children = this-&gt;children();
-    size_t size = children.size();
-    for (size_t i = 0; i &lt; size; i++) {
-        if (!children[i]-&gt;isOffScreen())
-            result.append(children[i]);
</del><ins>+    for (const auto&amp; child : children()) {
+        if (child-&gt;isOffScreen())
+            result.append(child);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3136,11 +3117,9 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(roleValue() == TabListRole);
</span><span class="cx">     
</span><del>-    const AccessibilityObject::AccessibilityChildrenVector&amp; children = this-&gt;children();
-    size_t size = children.size();
-    for (size_t i = 0; i &lt; size; ++i) {
-        if (children[i]-&gt;isTabItem())
-            result.append(children[i]);
</del><ins>+    for (const auto&amp; child : children()) {
+        if (child-&gt;isTabItem())
+            result.append(child);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx">     
</span><span class="lines">@@ -3571,7 +3550,7 @@
</span><span class="cx">     if (!isMathRoot())
</span><span class="cx">         return 0;
</span><span class="cx">     
</span><del>-    const AccessibilityObject::AccessibilityChildrenVector&amp; children = this-&gt;children();
</del><ins>+    const auto&amp; children = this-&gt;children();
</ins><span class="cx">     if (children.size() &lt; 1)
</span><span class="cx">         return 0;
</span><span class="cx">     
</span><span class="lines">@@ -3584,7 +3563,7 @@
</span><span class="cx">     if (!isMathRoot())
</span><span class="cx">         return 0;
</span><span class="cx">     
</span><del>-    const AccessibilityObject::AccessibilityChildrenVector&amp; children = this-&gt;children();
</del><ins>+    const auto&amp; children = this-&gt;children();
</ins><span class="cx">     if (children.size() != 2)
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="lines">@@ -3598,7 +3577,7 @@
</span><span class="cx">     if (!isMathFraction())
</span><span class="cx">         return 0;
</span><span class="cx">     
</span><del>-    const AccessibilityObject::AccessibilityChildrenVector&amp; children = this-&gt;children();
</del><ins>+    const auto&amp; children = this-&gt;children();
</ins><span class="cx">     if (children.size() != 2)
</span><span class="cx">         return 0;
</span><span class="cx">     
</span><span class="lines">@@ -3610,7 +3589,7 @@
</span><span class="cx">     if (!isMathFraction())
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><del>-    const AccessibilityObject::AccessibilityChildrenVector&amp; children = this-&gt;children();
</del><ins>+    const auto&amp; children = this-&gt;children();
</ins><span class="cx">     if (children.size() != 2)
</span><span class="cx">         return 0;
</span><span class="cx">     
</span><span class="lines">@@ -3622,7 +3601,7 @@
</span><span class="cx">     if (!isMathUnderOver() || !node())
</span><span class="cx">         return 0;
</span><span class="cx">     
</span><del>-    const AccessibilityChildrenVector&amp; children = this-&gt;children();
</del><ins>+    const auto&amp; children = this-&gt;children();
</ins><span class="cx">     if (children.size() &lt; 2)
</span><span class="cx">         return 0;
</span><span class="cx">     
</span><span class="lines">@@ -3637,7 +3616,7 @@
</span><span class="cx">     if (!isMathUnderOver() || !node())
</span><span class="cx">         return 0;
</span><span class="cx">     
</span><del>-    const AccessibilityChildrenVector&amp; children = this-&gt;children();
</del><ins>+    const auto&amp; children = this-&gt;children();
</ins><span class="cx">     if (children.size() &lt; 2)
</span><span class="cx">         return 0;
</span><span class="cx">     
</span><span class="lines">@@ -3654,7 +3633,7 @@
</span><span class="cx">     if (!isMathSubscriptSuperscript() &amp;&amp; !isMathUnderOver() &amp;&amp; !isMathMultiscript())
</span><span class="cx">         return 0;
</span><span class="cx">     
</span><del>-    const AccessibilityChildrenVector&amp; children = this-&gt;children();
</del><ins>+    const auto&amp; children = this-&gt;children();
</ins><span class="cx">     // The base object in question is always the first child.
</span><span class="cx">     if (children.size() &gt; 0)
</span><span class="cx">         return children[0].get();
</span><span class="lines">@@ -3667,7 +3646,7 @@
</span><span class="cx">     if (!isMathSubscriptSuperscript() || !node())
</span><span class="cx">         return 0;
</span><span class="cx">     
</span><del>-    const AccessibilityChildrenVector&amp; children = this-&gt;children();
</del><ins>+    const auto&amp; children = this-&gt;children();
</ins><span class="cx">     if (children.size() &lt; 2)
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="lines">@@ -3682,7 +3661,7 @@
</span><span class="cx">     if (!isMathSubscriptSuperscript() || !node())
</span><span class="cx">         return 0;
</span><span class="cx">     
</span><del>-    const AccessibilityChildrenVector&amp; children = this-&gt;children();
</del><ins>+    const auto&amp; children = this-&gt;children();
</ins><span class="cx">     unsigned count = children.size();
</span><span class="cx"> 
</span><span class="cx">     if (count &gt;= 2 &amp;&amp; node()-&gt;hasTagName(MathMLNames::msupTag))
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityTablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityTable.cpp (161978 => 161979)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityTable.cpp        2014-01-14 17:53:14 UTC (rev 161978)
+++ trunk/Source/WebCore/accessibility/AccessibilityTable.cpp        2014-01-14 18:09:51 UTC (rev 161979)
</span><span class="lines">@@ -124,7 +124,7 @@
</span><span class="cx">         return true;    
</span><span class="cx"> 
</span><span class="cx">     // if there's a colgroup or col element, it's probably a data table.
</span><del>-    for (auto&amp; child : childrenOfType&lt;Element&gt;(*tableElement)) {
</del><ins>+    for (const auto&amp; child : childrenOfType&lt;Element&gt;(*tableElement)) {
</ins><span class="cx">         if (child.hasTagName(colTag) || child.hasTagName(colgroupTag))
</span><span class="cx">             return true;
</span><span class="cx">     }
</span><span class="lines">@@ -428,9 +428,8 @@
</span><span class="cx">     
</span><span class="cx">     updateChildrenIfNecessary();
</span><span class="cx">     
</span><del>-    size_t columnCount = m_columns.size();
-    for (size_t i = 0; i &lt; columnCount; ++i) {
-        if (AccessibilityObject* header = toAccessibilityTableColumn(m_columns[i].get())-&gt;headerObject())
</del><ins>+    for (const auto&amp; column : m_columns) {
+        if (AccessibilityObject* header = toAccessibilityTableColumn(column.get())-&gt;headerObject())
</ins><span class="cx">             headers.append(header);
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -442,9 +441,8 @@
</span><span class="cx">     
</span><span class="cx">     updateChildrenIfNecessary();
</span><span class="cx">     
</span><del>-    size_t rowCount = m_rows.size();
-    for (size_t i = 0; i &lt; rowCount; ++i) {
-        if (AccessibilityObject* header = toAccessibilityTableRow(m_rows[i].get())-&gt;headerObject())
</del><ins>+    for (const auto&amp; row : m_rows) {
+        if (AccessibilityObject* header = toAccessibilityTableRow(row.get())-&gt;headerObject())
</ins><span class="cx">             headers.append(header);
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -456,9 +454,7 @@
</span><span class="cx">     
</span><span class="cx">     updateChildrenIfNecessary();
</span><span class="cx">     
</span><del>-    size_t rowCount = m_rows.size();
-    for (size_t i = 0; i &lt; rowCount; ++i) {
-        AccessibilityObject* row = m_rows[i].get();
</del><ins>+    for (const auto&amp; row : m_rows) {
</ins><span class="cx">         if (row &amp;&amp; !row-&gt;isOffScreen())
</span><span class="cx">             rows.append(row);
</span><span class="cx">     }
</span><span class="lines">@@ -471,8 +467,8 @@
</span><span class="cx">     
</span><span class="cx">     updateChildrenIfNecessary();
</span><span class="cx">     
</span><del>-    for (size_t row = 0; row &lt; m_rows.size(); ++row)
-        cells.appendVector(m_rows[row]-&gt;children());
</del><ins>+    for (const auto&amp; row : m_rows)
+        cells.appendVector(row-&gt;children());
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> unsigned AccessibilityTable::columnCount()
</span><span class="lines">@@ -509,7 +505,7 @@
</span><span class="cx">     // Iterate backwards through the rows in case the desired cell has a rowspan and exists in a previous row.
</span><span class="cx">     for (unsigned rowIndexCounter = row + 1; rowIndexCounter &gt; 0; --rowIndexCounter) {
</span><span class="cx">         unsigned rowIndex = rowIndexCounter - 1;
</span><del>-        const AccessibilityChildrenVector&amp; children = m_rows[rowIndex]-&gt;children();
</del><ins>+        const auto&amp; children = m_rows[rowIndex]-&gt;children();
</ins><span class="cx">         // Since some cells may have colspans, we have to check the actual range of each
</span><span class="cx">         // cell to determine which is the right one.
</span><span class="cx">         for (unsigned colIndexCounter = std::min(static_cast&lt;unsigned&gt;(children.size()), column + 1); colIndexCounter &gt; 0; --colIndexCounter) {
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityTableColumncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityTableColumn.cpp (161978 => 161979)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityTableColumn.cpp        2014-01-14 17:53:14 UTC (rev 161978)
+++ trunk/Source/WebCore/accessibility/AccessibilityTableColumn.cpp        2014-01-14 18:09:51 UTC (rev 161979)
</span><span class="lines">@@ -80,12 +80,9 @@
</span><span class="cx">     
</span><span class="cx">     AccessibilityTable* parentTable = toAccessibilityTable(m_parent);
</span><span class="cx">     if (parentTable-&gt;isAriaTable()) {
</span><del>-        const AccessibilityChildrenVector&amp; rowChildren = children();
-        unsigned childrenCount = rowChildren.size();
-        for (unsigned i = 0; i &lt; childrenCount; ++i) {
-            AccessibilityObject* cell = rowChildren[i].get();
</del><ins>+        for (const auto&amp; cell : children()) {
</ins><span class="cx">             if (cell-&gt;ariaRoleAttribute() == ColumnHeaderRole)
</span><del>-                return cell;
</del><ins>+                return cell.get();
</ins><span class="cx">         }
</span><span class="cx">         
</span><span class="cx">         return 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityTableHeaderContainercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityTableHeaderContainer.cpp (161978 => 161979)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityTableHeaderContainer.cpp        2014-01-14 17:53:14 UTC (rev 161978)
+++ trunk/Source/WebCore/accessibility/AccessibilityTableHeaderContainer.cpp        2014-01-14 18:09:51 UTC (rev 161979)
</span><span class="lines">@@ -75,9 +75,8 @@
</span><span class="cx">     
</span><span class="cx">     toAccessibilityTable(m_parent)-&gt;columnHeaders(m_children);
</span><span class="cx">     
</span><del>-    unsigned length = m_children.size();
-    for (unsigned k = 0; k &lt; length; ++k)
-        m_headerRect.unite(m_children[k]-&gt;elementRect());
</del><ins>+    for (const auto&amp; child : m_children)
+        m_headerRect.unite(child-&gt;elementRect());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityTableRowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityTableRow.cpp (161978 => 161979)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityTableRow.cpp        2014-01-14 17:53:14 UTC (rev 161978)
+++ trunk/Source/WebCore/accessibility/AccessibilityTableRow.cpp        2014-01-14 18:09:51 UTC (rev 161979)
</span><span class="lines">@@ -117,7 +117,7 @@
</span><span class="cx">     if (!m_renderer || !m_renderer-&gt;isTableRow())
</span><span class="cx">         return 0;
</span><span class="cx">     
</span><del>-    const AccessibilityChildrenVector&amp; rowChildren = children();
</del><ins>+    const auto&amp; rowChildren = children();
</ins><span class="cx">     if (!rowChildren.size())
</span><span class="cx">         return 0;
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityiosWebAccessibilityObjectWrapperIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (161978 => 161979)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm        2014-01-14 17:53:14 UTC (rev 161978)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm        2014-01-14 18:09:51 UTC (rev 161979)
</span><span class="lines">@@ -347,7 +347,7 @@
</span><span class="cx">     if ([self isAttachment])
</span><span class="cx">         return [[self attachmentView] accessibilityElementAtIndex:index];
</span><span class="cx">     
</span><del>-    const AccessibilityObject::AccessibilityChildrenVector&amp; children = m_object-&gt;children();
</del><ins>+    const auto&amp; children = m_object-&gt;children();
</ins><span class="cx">     if (static_cast&lt;unsigned&gt;(index) &gt;= children.size())
</span><span class="cx">         return nil;
</span><span class="cx">     
</span><span class="lines">@@ -367,7 +367,7 @@
</span><span class="cx">     if ([self isAttachment])
</span><span class="cx">         return [[self attachmentView] indexOfAccessibilityElement:element];
</span><span class="cx">     
</span><del>-    const AccessibilityObject::AccessibilityChildrenVector&amp; children = m_object-&gt;children();
</del><ins>+    const auto&amp; children = m_object-&gt;children();
</ins><span class="cx">     unsigned count = children.size();
</span><span class="cx">     for (unsigned k = 0; k &lt; count; ++k) {
</span><span class="cx">         AccessibilityObjectWrapper* wrapper = children[k]-&gt;wrapper();
</span><span class="lines">@@ -1073,7 +1073,7 @@
</span><span class="cx">     if (role != LinkRole &amp;&amp; role != WebCoreLinkRole)
</span><span class="cx">         return NO;
</span><span class="cx">     
</span><del>-    const AccessibilityObject::AccessibilityChildrenVector&amp; children = m_object-&gt;children();
</del><ins>+    const auto&amp; children = m_object-&gt;children();
</ins><span class="cx">     unsigned childrenSize = children.size();
</span><span class="cx"> 
</span><span class="cx">     // If there's only one child, then it doesn't have segmented children. 
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperBasemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm (161978 => 161979)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm        2014-01-14 17:53:14 UTC (rev 161978)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm        2014-01-14 18:09:51 UTC (rev 161979)
</span><span class="lines">@@ -78,11 +78,9 @@
</span><span class="cx"> 
</span><span class="cx"> static NSArray *convertMathPairsToNSArray(const AccessibilityObject::AccessibilityMathMultiscriptPairs&amp; pairs, NSString *subscriptKey, NSString *superscriptKey)
</span><span class="cx"> {
</span><del>-    unsigned length = pairs.size();
-    NSMutableArray *array = [NSMutableArray arrayWithCapacity:length];
-    for (unsigned i = 0; i &lt; length; ++i) {
</del><ins>+    NSMutableArray *array = [NSMutableArray arrayWithCapacity:pairs.size()];
+    for (const auto&amp; pair : pairs) {
</ins><span class="cx">         NSMutableDictionary *pairDictionary = [NSMutableDictionary dictionary];
</span><del>-        std::pair&lt;AccessibilityObject*, AccessibilityObject*&gt; pair = pairs[i];
</del><span class="cx">         if (pair.first &amp;&amp; pair.first-&gt;wrapper() &amp;&amp; !pair.first-&gt;accessibilityIsIgnored())
</span><span class="cx">             [pairDictionary setObject:pair.first-&gt;wrapper() forKey:subscriptKey];
</span><span class="cx">         if (pair.second &amp;&amp; pair.second-&gt;wrapper() &amp;&amp; !pair.second-&gt;accessibilityIsIgnored())
</span><span class="lines">@@ -165,10 +163,7 @@
</span><span class="cx">     Vector&lt;AccessibilityText&gt; textOrder;
</span><span class="cx">     m_object-&gt;accessibilityText(textOrder);
</span><span class="cx">     
</span><del>-    unsigned length = textOrder.size();
-    for (unsigned k = 0; k &lt; length; k++) {
-        const AccessibilityText&amp; text = textOrder[k];
-        
</del><ins>+    for (const auto&amp; text : textOrder) {
</ins><span class="cx">         // If we have alternative text, then we should not expose a title.
</span><span class="cx">         if (text.textSource == AlternativeText)
</span><span class="cx">             break;
</span><span class="lines">@@ -196,11 +191,8 @@
</span><span class="cx">     Vector&lt;AccessibilityText&gt; textOrder;
</span><span class="cx">     m_object-&gt;accessibilityText(textOrder);
</span><span class="cx">     
</span><del>-    unsigned length = textOrder.size();
</del><span class="cx">     bool visibleTextAvailable = false;
</span><del>-    for (unsigned k = 0; k &lt; length; k++) {
-        const AccessibilityText&amp; text = textOrder[k];
-        
</del><ins>+    for (const auto&amp; text : textOrder) {
</ins><span class="cx">         if (text.textSource == AlternativeText)
</span><span class="cx">             return text.text;
</span><span class="cx">         
</span><span class="lines">@@ -225,11 +217,8 @@
</span><span class="cx">     Vector&lt;AccessibilityText&gt; textOrder;
</span><span class="cx">     m_object-&gt;accessibilityText(textOrder);
</span><span class="cx">     
</span><del>-    unsigned length = textOrder.size();
</del><span class="cx">     bool descriptiveTextAvailable = false;
</span><del>-    for (unsigned k = 0; k &lt; length; k++) {
-        const AccessibilityText&amp; text = textOrder[k];
-        
</del><ins>+    for (const auto&amp; text : textOrder) {
</ins><span class="cx">         if (text.textSource == HelpText || text.textSource == SummaryText)
</span><span class="cx">             return text.text;
</span><span class="cx">         
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (161978 => 161979)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2014-01-14 17:53:14 UTC (rev 161978)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2014-01-14 18:09:51 UTC (rev 161979)
</span><span class="lines">@@ -1562,15 +1562,14 @@
</span><span class="cx"> 
</span><span class="cx"> static NSMutableArray* convertToNSArray(const AccessibilityObject::AccessibilityChildrenVector&amp; vector)
</span><span class="cx"> {
</span><del>-    unsigned length = vector.size();
-    NSMutableArray* array = [NSMutableArray arrayWithCapacity: length];
-    for (unsigned i = 0; i &lt; length; ++i) {
-        WebAccessibilityObjectWrapper* wrapper = vector[i]-&gt;wrapper();
</del><ins>+    NSMutableArray* array = [NSMutableArray arrayWithCapacity:vector.size()];
+    for (const auto&amp; child : vector) {
+        WebAccessibilityObjectWrapper* wrapper = child-&gt;wrapper();
</ins><span class="cx">         ASSERT(wrapper);
</span><span class="cx">         if (wrapper) {
</span><span class="cx">             // we want to return the attachment view instead of the object representing the attachment.
</span><span class="cx">             // otherwise, we get palindrome errors in the AX hierarchy
</span><del>-            if (vector[i]-&gt;isAttachment() &amp;&amp; [wrapper attachmentView])
</del><ins>+            if (child-&gt;isAttachment() &amp;&amp; [wrapper attachmentView])
</ins><span class="cx">                 [array addObject:[wrapper attachmentView]];
</span><span class="cx">             else
</span><span class="cx">                 [array addObject:wrapper];
</span><span class="lines">@@ -1581,10 +1580,9 @@
</span><span class="cx"> 
</span><span class="cx"> static NSMutableArray *convertStringsToNSArray(const Vector&lt;String&gt;&amp; vector)
</span><span class="cx"> {
</span><del>-    size_t length = vector.size();
-    NSMutableArray *array = [NSMutableArray arrayWithCapacity:length];
-    for (size_t i = 0; i &lt; length; ++i)
-        [array addObject:vector[i]];
</del><ins>+    NSMutableArray *array = [NSMutableArray arrayWithCapacity:vector.size()];
+    for (const auto&amp; string : vector)
+        [array addObject:string];
</ins><span class="cx">     return array;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2377,7 +2375,7 @@
</span><span class="cx">     if ([attributeName isEqualToString:NSAccessibilityContentsAttribute]) {
</span><span class="cx">         // The contents of a tab list are all the children except the tabs.
</span><span class="cx">         if (m_object-&gt;isTabList()) {
</span><del>-            const AccessibilityObject::AccessibilityChildrenVector&amp; children = m_object-&gt;children();
</del><ins>+            const auto&amp; children = m_object-&gt;children();
</ins><span class="cx">             AccessibilityObject::AccessibilityChildrenVector tabsChildren;
</span><span class="cx">             m_object-&gt;tabChildren(tabsChildren);
</span><span class="cx">             
</span><span class="lines">@@ -2389,14 +2387,11 @@
</span><span class="cx">             }
</span><span class="cx">             return convertToNSArray(contents);
</span><span class="cx">         } else if (m_object-&gt;isScrollView()) {
</span><del>-            const AccessibilityObject::AccessibilityChildrenVector&amp; children = m_object-&gt;children();
-            
</del><span class="cx">             // A scrollView's contents are everything except the scroll bars.
</span><span class="cx">             AccessibilityObject::AccessibilityChildrenVector contents;
</span><del>-            unsigned childrenSize = children.size();
-            for (unsigned k = 0; k &lt; childrenSize; ++k) {
-                if (!children[k]-&gt;isScrollbar())
-                    contents.append(children[k]);
</del><ins>+            for (const auto&amp; child : m_object-&gt;children()) {
+                if (!child-&gt;isScrollbar())
+                    contents.append(child);
</ins><span class="cx">             }
</span><span class="cx">             return convertToNSArray(contents);
</span><span class="cx">         }
</span><span class="lines">@@ -3614,7 +3609,7 @@
</span><span class="cx">     if (m_object-&gt;isTree())
</span><span class="cx">         return [super accessibilityIndexOfChild:child];
</span><span class="cx">     
</span><del>-    const AccessibilityObject::AccessibilityChildrenVector&amp; children = m_object-&gt;children();
</del><ins>+    const auto&amp; children = m_object-&gt;children();
</ins><span class="cx">     
</span><span class="cx">     if (children.isEmpty())
</span><span class="cx">         return [[self renderWidgetChildren] indexOfObject:child];
</span><span class="lines">@@ -3640,7 +3635,7 @@
</span><span class="cx">         if (m_object-&gt;isTree() || m_object-&gt;isTreeItem())
</span><span class="cx">             return [[self accessibilityAttributeValue:NSAccessibilityChildrenAttribute] count];
</span><span class="cx">         
</span><del>-        const AccessibilityObject::AccessibilityChildrenVector&amp; children = m_object-&gt;children();
</del><ins>+        const auto&amp; children = m_object-&gt;children();
</ins><span class="cx">         if (children.isEmpty())
</span><span class="cx">             return [[self renderWidgetChildren] count];
</span><span class="cx">         
</span><span class="lines">@@ -3672,7 +3667,7 @@
</span><span class="cx">             return [super accessibilityArrayAttributeValues:attribute index:index maxCount:maxCount];
</span><span class="cx">         }
</span><span class="cx">         
</span><del>-        const AccessibilityObject::AccessibilityChildrenVector&amp; children = m_object-&gt;children();
</del><ins>+        const auto&amp; children = m_object-&gt;children();
</ins><span class="cx">         unsigned childCount = children.size();
</span><span class="cx">         if (index &gt;= childCount)
</span><span class="cx">             return nil;
</span></span></pre>
</div>
</div>

</body>
</html>