<!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 <cfleizach@apple.com>
+
+ 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 <bfulgham@apple.com>
</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<AXID, RefPtr<AccessibilityObject>>::iterator end = m_objects.end();
- for (HashMap<AXID, RefPtr<AccessibilityObject>>::iterator it = m_objects.begin(); it != end; ++it) {
- AccessibilityObject* obj = (*it).value.get();
- detachWrapper(obj, CacheDestroyed);
- obj->detach(CacheDestroyed);
- removeAXID(obj);
</del><ins>+ for (const auto& object : m_objects.values()) {
+ detachWrapper(object.get(), CacheDestroyed);
+ object->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& imageChildren = axRenderImage->children();
- unsigned count = imageChildren.size();
- for (unsigned k = 0; k < count; ++k) {
- AccessibilityObject* child = imageChildren[k].get();
</del><ins>+ for (const auto& child : axRenderImage->children()) {
</ins><span class="cx"> if (!child->isImageMapLink())
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- if (toAccessibilityImageMapLink(child)->areaElement() == areaElement)
- return child;
</del><ins>+ if (toAccessibilityImageMapLink(child.get())->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->isTableRow()) {
</span><span class="cx"> // Although a "grid" 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& children = rowChild->children();
- size_t length = children.size();
- for (size_t i = 0; i < length; ++i)
- addRowDescendant(children[i].get(), appendedRows, columnCount);
</del><ins>+ for (const auto& child : rowChild->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& siblings = parent->children();
</del><ins>+ const auto& siblings = parent->children();
</ins><span class="cx"> unsigned childrenSize = siblings.size();
</span><span class="cx"> for (unsigned k = 0; k < 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& allRows = toAccessibilityTable(parent)->rows();
</del><ins>+ auto& allRows = toAccessibilityTable(parent)->rows();
</ins><span class="cx"> int rowCount = allRows.size();
</span><span class="cx"> for (int k = index + 1; k < 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& allRows = toAccessibilityTable(parent)->rows();
</del><ins>+ auto& allRows = toAccessibilityTable(parent)->rows();
</ins><span class="cx"> int rowCount = allRows.size();
</span><span class="cx"> if (index >= 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& rowChildren = children();
- unsigned childrenCount = rowChildren.size();
- for (unsigned i = 0; i < childrenCount; ++i) {
- AccessibilityObject* cell = rowChildren[i].get();
- if (cell->ariaRoleAttribute() == RowHeaderRole)
- return cell;
</del><ins>+ for (const auto& child : children()) {
+ if (child->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<HTMLElement*>& listItems = toHTMLSelectElement(selectNode)->listItems();
- unsigned length = listItems.size();
- for (unsigned i = 0; i < length; i++) {
</del><ins>+ for (const auto& listItem : toHTMLSelectElement(selectNode)->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 && !listOption->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 < length; i++) {
- AccessibilityListBoxOption* listBoxOption = toAccessibilityListBoxOption(m_children[i].get());
</del><ins>+ for (const auto& child : m_children) {
+ AccessibilityListBoxOption* listBoxOption = toAccessibilityListBoxOption(child.get());
</ins><span class="cx"> if (listBoxOption->isSelected())
</span><span class="cx"> listBoxOption->setSelected(false);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- length = children.size();
- for (unsigned i = 0; i < length; i++) {
- AccessibilityObject* obj = children[i].get();
</del><ins>+ for (const auto& obj : children) {
</ins><span class="cx"> if (obj->roleValue() != ListBoxOptionRole)
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- toAccessibilityListBoxOption(obj)->setSelected(true);
</del><ins>+ toAccessibilityListBoxOption(obj.get())->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 < length; i++) {
- if (toAccessibilityListBoxOption(m_children[i].get())->isSelected())
- result.append(m_children[i]);
</del><ins>+ for (const auto& child : m_children) {
+ if (toAccessibilityListBoxOption(child.get())->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<HTMLElement*>& listItems = selectElement->listItems();
</del><ins>+ const auto& listItems = selectElement->listItems();
</ins><span class="cx"> unsigned length = listItems.size();
</span><span class="cx"> for (unsigned i = 0; i < 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<Document> document(m_renderer->document());
</span><span class="cx"> AXObjectCache* cache = document->axObjectCache();
</span><span class="cx">
</span><del>- const AccessibilityChildrenVector& childObjects = children();
</del><ins>+ const auto& childObjects = children();
</ins><span class="cx"> if (!childObjects.isEmpty()) {
</span><span class="cx"> ASSERT(childObjects.size() == 1);
</span><span class="cx"> ASSERT(childObjects[0]->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<HTMLElement*>& listItems = toHTMLSelectElement(selectNode)->listItems();
- unsigned length = listItems.size();
- for (unsigned i = 0; i < length; i++) {
- AccessibilityMenuListOption* option = menuListOptionAccessibilityObject(listItems[i]);
</del><ins>+ for (const auto& listItem : toHTMLSelectElement(selectNode)->listItems()) {
+ AccessibilityMenuListOption* option = menuListOptionAccessibilityObject(listItem);
</ins><span class="cx"> if (option) {
</span><span class="cx"> option->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->clearChildren();
</span><span class="cx">
</span><span class="cx"> if (child->accessibilityIsIgnored()) {
</span><del>- const AccessibilityChildrenVector& children = child->children();
</del><ins>+ const auto& children = child->children();
</ins><span class="cx"> size_t length = children.size();
</span><span class="cx"> for (size_t i = 0; i < 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& children = this->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 < size; ++i) {
- AccessibilityObject* object = children[i].get();
- if (object->roleValue() == RadioButtonRole && object->checkboxOrRadioValue() == ButtonStateOn)
- return object;
</del><ins>+ for (const auto& child : children()) {
+ if (child->roleValue() == RadioButtonRole && child->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& children = this->children();
- size_t size = tabs.size();
- for (size_t i = 0; i < size; ++i) {
- AccessibilityObject* object = children[i].get();
- if (object->isTabItem() && object->isChecked())
- return object;
</del><ins>+ for (const auto& child : children()) {
+ if (child->isTabItem() && child->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<RefPtr<AccessibilityObject>> axElements;
</span><del>- unsigned length = elements.size();
- for (unsigned k = 0; k < length; k++) {
- RefPtr<AccessibilityObject> axElement = axObjectCache()->getOrCreate(elements[k]);
</del><ins>+ for (const auto& element : elements) {
+ RefPtr<AccessibilityObject> axElement = axObjectCache()->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& searchChildren = object->isAccessibilityTable() ? toAccessibilityTable(object)->rows() : object->children();
</del><ins>+ const auto& searchChildren = object->isAccessibilityTable() ? toAccessibilityTable(object)->rows() : object->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 < length; i++)
- m_children[i]->detachFromParent();
</del><ins>+ for (const auto& child : m_children)
+ child->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& result)
</span><span class="cx"> {
</span><del>- const AccessibilityChildrenVector& axChildren = children();
- unsigned count = axChildren.size();
- for (unsigned k = 0; k < count; ++k) {
- AccessibilityObject* obj = axChildren[k].get();
-
</del><ins>+ for (const auto& child : children()) {
</ins><span class="cx"> // Add tree items as the rows.
</span><del>- if (obj->roleValue() == TreeItemRole)
- result.append(obj);
</del><ins>+ if (child->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->ariaTreeRows(result);
</del><ins>+ child->ariaTreeRows(result);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void AccessibilityObject::ariaTreeItemContent(AccessibilityChildrenVector& 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& axChildren = children();
- unsigned count = axChildren.size();
- for (unsigned k = 0; k < count; ++k) {
- AccessibilityObject* obj = axChildren[k].get();
- AccessibilityRole role = obj->roleValue();
</del><ins>+ for (const auto& child : children()) {
+ AccessibilityRole role = child->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& result)
</span><span class="cx"> {
</span><del>- const AccessibilityChildrenVector& axChildren = children();
- unsigned count = axChildren.size();
- for (unsigned k = 0; k < count; ++k) {
- AccessibilityObject* obj = axChildren[k].get();
-
</del><ins>+ for (const auto& obj : children()) {
</ins><span class="cx"> // Add tree items as the rows.
</span><span class="cx"> if (obj->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 < count; k++) {
- if (m_children[k]->isMockObject() && m_children[k]->elementRect().contains(point))
- return m_children[k]->elementAccessibilityHitTest(point);
</del><ins>+ for (const auto& child : m_children) {
+ if (child->isMockObject() && child->elementRect().contains(point))
+ return child->elementAccessibilityHitTest(point);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return const_cast<AccessibilityObject*>(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<Ref<Element>> formElements;
</span><span class="cx"> input->form()->getNamedElements(input->name(), formElements);
</span><span class="cx">
</span><del>- unsigned len = formElements.size();
- for (unsigned i = 0; i < len; ++i) {
- Element& associateElement = formElements[i].get();
- if (AccessibilityObject* object = axObjectCache()->getOrCreate(&associateElement))
</del><ins>+ for (auto& associateElement : formElements) {
+ if (AccessibilityObject* object = axObjectCache()->getOrCreate(&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 < count; ++k) {
- Element* element = elements[k];
</del><ins>+ for (const auto& element : elements) {
</ins><span class="cx"> AccessibilityObject* flowToElement = cache->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<Element*> elements;
</span><span class="cx"> elementsFromAttribute(elements, aria_controlsAttr);
</span><span class="cx">
</span><del>- unsigned count = elements.size();
- for (unsigned k = 0; k < count; ++k) {
- Element* element = elements[k];
</del><ins>+ for (const auto& element : elements) {
</ins><span class="cx"> AccessibilityObject* tabPanel = axObjectCache()->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 > 1 && !isMulti)
</span><span class="cx"> count = 1;
</span><span class="cx">
</span><del>- for (unsigned k = 0; k < count; ++k)
- selectedRows[k]->setSelected(true);
</del><ins>+ for (const auto& selectedRow : selectedRows)
+ selectedRow->setSelected(true);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void AccessibilityRenderObject::setValue(const String& string)
</span><span class="lines">@@ -1682,9 +1676,8 @@
</span><span class="cx"> Vector<Element*> elements;
</span><span class="cx"> elementsFromAttribute(elements, aria_ownsAttr);
</span><span class="cx">
</span><del>- unsigned count = elements.size();
- for (unsigned k = 0; k < count; ++k) {
- RenderObject* render = elements[k]->renderer();
</del><ins>+ for (const auto& element : elements) {
+ RenderObject* render = element->renderer();
</ins><span class="cx"> AccessibilityObject* obj = axObjectCache()->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& children = parent->children();
-
- unsigned count = children.size();
- for (unsigned k = 0; k < count; ++k) {
- if (children[k]->elementRect().contains(point))
- return children[k].get();
</del><ins>+ for (const auto& child : parent->children()) {
+ if (child->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->setParent(this);
</span><span class="cx">
</span><span class="cx"> if (root->accessibilityIsIgnored()) {
</span><del>- const AccessibilityChildrenVector& children = root->children();
- unsigned length = children.size();
- for (unsigned i = 0; i < length; ++i)
- m_children.append(children[i]);
</del><ins>+ for (const auto& child : root->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 < length; k++) {
- if (m_children[k]->isAttachment())
- m_children[k]->overrideAttachmentParent(this);
</del><ins>+ for (const auto& child : m_children) {
+ if (child->isAttachment())
+ child->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()->get(child->renderer());
</span><span class="cx"> if (childObject && childObject->accessibilityIsIgnored()) {
</span><del>- const AccessibilityChildrenVector& children = childObject->children();
</del><ins>+ auto& children = childObject->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 < count; ++k) {
- if (allRows[k]->isSelected()) {
- result.append(allRows[k]);
</del><ins>+ for (const auto& row : allRows) {
+ if (row->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& childObjects = children();
- unsigned childrenSize = childObjects.size();
- for (unsigned k = 0; k < childrenSize; ++k) {
</del><ins>+ for (const auto& 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->isSelected() && child->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& children = this->children();
- size_t size = children.size();
- for (size_t i = 0; i < size; i++) {
- if (!children[i]->isOffScreen())
- result.append(children[i]);
</del><ins>+ for (const auto& child : children()) {
+ if (child->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& children = this->children();
- size_t size = children.size();
- for (size_t i = 0; i < size; ++i) {
- if (children[i]->isTabItem())
- result.append(children[i]);
</del><ins>+ for (const auto& child : children()) {
+ if (child->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& children = this->children();
</del><ins>+ const auto& children = this->children();
</ins><span class="cx"> if (children.size() < 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& children = this->children();
</del><ins>+ const auto& children = this->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& children = this->children();
</del><ins>+ const auto& children = this->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& children = this->children();
</del><ins>+ const auto& children = this->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& children = this->children();
</del><ins>+ const auto& children = this->children();
</ins><span class="cx"> if (children.size() < 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& children = this->children();
</del><ins>+ const auto& children = this->children();
</ins><span class="cx"> if (children.size() < 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() && !isMathUnderOver() && !isMathMultiscript())
</span><span class="cx"> return 0;
</span><span class="cx">
</span><del>- const AccessibilityChildrenVector& children = this->children();
</del><ins>+ const auto& children = this->children();
</ins><span class="cx"> // The base object in question is always the first child.
</span><span class="cx"> if (children.size() > 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& children = this->children();
</del><ins>+ const auto& children = this->children();
</ins><span class="cx"> if (children.size() < 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& children = this->children();
</del><ins>+ const auto& children = this->children();
</ins><span class="cx"> unsigned count = children.size();
</span><span class="cx">
</span><span class="cx"> if (count >= 2 && node()->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& child : childrenOfType<Element>(*tableElement)) {
</del><ins>+ for (const auto& child : childrenOfType<Element>(*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 < columnCount; ++i) {
- if (AccessibilityObject* header = toAccessibilityTableColumn(m_columns[i].get())->headerObject())
</del><ins>+ for (const auto& column : m_columns) {
+ if (AccessibilityObject* header = toAccessibilityTableColumn(column.get())->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 < rowCount; ++i) {
- if (AccessibilityObject* header = toAccessibilityTableRow(m_rows[i].get())->headerObject())
</del><ins>+ for (const auto& row : m_rows) {
+ if (AccessibilityObject* header = toAccessibilityTableRow(row.get())->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 < rowCount; ++i) {
- AccessibilityObject* row = m_rows[i].get();
</del><ins>+ for (const auto& row : m_rows) {
</ins><span class="cx"> if (row && !row->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 < m_rows.size(); ++row)
- cells.appendVector(m_rows[row]->children());
</del><ins>+ for (const auto& row : m_rows)
+ cells.appendVector(row->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 > 0; --rowIndexCounter) {
</span><span class="cx"> unsigned rowIndex = rowIndexCounter - 1;
</span><del>- const AccessibilityChildrenVector& children = m_rows[rowIndex]->children();
</del><ins>+ const auto& children = m_rows[rowIndex]->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<unsigned>(children.size()), column + 1); colIndexCounter > 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->isAriaTable()) {
</span><del>- const AccessibilityChildrenVector& rowChildren = children();
- unsigned childrenCount = rowChildren.size();
- for (unsigned i = 0; i < childrenCount; ++i) {
- AccessibilityObject* cell = rowChildren[i].get();
</del><ins>+ for (const auto& cell : children()) {
</ins><span class="cx"> if (cell->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)->columnHeaders(m_children);
</span><span class="cx">
</span><del>- unsigned length = m_children.size();
- for (unsigned k = 0; k < length; ++k)
- m_headerRect.unite(m_children[k]->elementRect());
</del><ins>+ for (const auto& child : m_children)
+ m_headerRect.unite(child->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->isTableRow())
</span><span class="cx"> return 0;
</span><span class="cx">
</span><del>- const AccessibilityChildrenVector& rowChildren = children();
</del><ins>+ const auto& 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& children = m_object->children();
</del><ins>+ const auto& children = m_object->children();
</ins><span class="cx"> if (static_cast<unsigned>(index) >= 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& children = m_object->children();
</del><ins>+ const auto& children = m_object->children();
</ins><span class="cx"> unsigned count = children.size();
</span><span class="cx"> for (unsigned k = 0; k < count; ++k) {
</span><span class="cx"> AccessibilityObjectWrapper* wrapper = children[k]->wrapper();
</span><span class="lines">@@ -1073,7 +1073,7 @@
</span><span class="cx"> if (role != LinkRole && role != WebCoreLinkRole)
</span><span class="cx"> return NO;
</span><span class="cx">
</span><del>- const AccessibilityObject::AccessibilityChildrenVector& children = m_object->children();
</del><ins>+ const auto& children = m_object->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& 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 < length; ++i) {
</del><ins>+ NSMutableArray *array = [NSMutableArray arrayWithCapacity:pairs.size()];
+ for (const auto& pair : pairs) {
</ins><span class="cx"> NSMutableDictionary *pairDictionary = [NSMutableDictionary dictionary];
</span><del>- std::pair<AccessibilityObject*, AccessibilityObject*> pair = pairs[i];
</del><span class="cx"> if (pair.first && pair.first->wrapper() && !pair.first->accessibilityIsIgnored())
</span><span class="cx"> [pairDictionary setObject:pair.first->wrapper() forKey:subscriptKey];
</span><span class="cx"> if (pair.second && pair.second->wrapper() && !pair.second->accessibilityIsIgnored())
</span><span class="lines">@@ -165,10 +163,7 @@
</span><span class="cx"> Vector<AccessibilityText> textOrder;
</span><span class="cx"> m_object->accessibilityText(textOrder);
</span><span class="cx">
</span><del>- unsigned length = textOrder.size();
- for (unsigned k = 0; k < length; k++) {
- const AccessibilityText& text = textOrder[k];
-
</del><ins>+ for (const auto& 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<AccessibilityText> textOrder;
</span><span class="cx"> m_object->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 < length; k++) {
- const AccessibilityText& text = textOrder[k];
-
</del><ins>+ for (const auto& 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<AccessibilityText> textOrder;
</span><span class="cx"> m_object->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 < length; k++) {
- const AccessibilityText& text = textOrder[k];
-
</del><ins>+ for (const auto& 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& vector)
</span><span class="cx"> {
</span><del>- unsigned length = vector.size();
- NSMutableArray* array = [NSMutableArray arrayWithCapacity: length];
- for (unsigned i = 0; i < length; ++i) {
- WebAccessibilityObjectWrapper* wrapper = vector[i]->wrapper();
</del><ins>+ NSMutableArray* array = [NSMutableArray arrayWithCapacity:vector.size()];
+ for (const auto& child : vector) {
+ WebAccessibilityObjectWrapper* wrapper = child->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]->isAttachment() && [wrapper attachmentView])
</del><ins>+ if (child->isAttachment() && [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<String>& vector)
</span><span class="cx"> {
</span><del>- size_t length = vector.size();
- NSMutableArray *array = [NSMutableArray arrayWithCapacity:length];
- for (size_t i = 0; i < length; ++i)
- [array addObject:vector[i]];
</del><ins>+ NSMutableArray *array = [NSMutableArray arrayWithCapacity:vector.size()];
+ for (const auto& 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->isTabList()) {
</span><del>- const AccessibilityObject::AccessibilityChildrenVector& children = m_object->children();
</del><ins>+ const auto& children = m_object->children();
</ins><span class="cx"> AccessibilityObject::AccessibilityChildrenVector tabsChildren;
</span><span class="cx"> m_object->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->isScrollView()) {
</span><del>- const AccessibilityObject::AccessibilityChildrenVector& children = m_object->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 < childrenSize; ++k) {
- if (!children[k]->isScrollbar())
- contents.append(children[k]);
</del><ins>+ for (const auto& child : m_object->children()) {
+ if (!child->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->isTree())
</span><span class="cx"> return [super accessibilityIndexOfChild:child];
</span><span class="cx">
</span><del>- const AccessibilityObject::AccessibilityChildrenVector& children = m_object->children();
</del><ins>+ const auto& children = m_object->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->isTree() || m_object->isTreeItem())
</span><span class="cx"> return [[self accessibilityAttributeValue:NSAccessibilityChildrenAttribute] count];
</span><span class="cx">
</span><del>- const AccessibilityObject::AccessibilityChildrenVector& children = m_object->children();
</del><ins>+ const auto& children = m_object->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& children = m_object->children();
</del><ins>+ const auto& children = m_object->children();
</ins><span class="cx"> unsigned childCount = children.size();
</span><span class="cx"> if (index >= childCount)
</span><span class="cx"> return nil;
</span></span></pre>
</div>
</div>
</body>
</html>