Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1196)

Unified Diff: Source/modules/accessibility/AXARIAGrid.cpp

Issue 1197723003: Fix aria-owns support in ARIA grids. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix style nit Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/accessibility/aria-owns-grid.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXARIAGrid.cpp
diff --git a/Source/modules/accessibility/AXARIAGrid.cpp b/Source/modules/accessibility/AXARIAGrid.cpp
index db5437ceebc17ae619bbad70d2cbf266c9389c46..b79a372f539e27b0ec7f2542d8eb0297e90a4326 100644
--- a/Source/modules/accessibility/AXARIAGrid.cpp
+++ b/Source/modules/accessibility/AXARIAGrid.cpp
@@ -92,14 +92,18 @@ void AXARIAGrid::addChildren()
if (!m_layoutObject)
return;
+ Vector<AXObject*> children;
+ for (AXObject* child = firstChild(); child; child = child->nextSibling())
+ children.append(child);
+ computeAriaOwnsChildren(children);
+
AXObjectCacheImpl& axCache = axObjectCache();
// add only rows that are labeled as aria rows
HashSet<AXObject*> appendedRows;
unsigned columnCount = 0;
- for (RefPtr<AXObject> child = firstChild(); child; child = child->nextSibling()) {
-
- if (!addTableCellChild(child.get(), appendedRows, columnCount)) {
+ for (const auto& child : children) {
+ if (!addTableCellChild(child, appendedRows, columnCount)) {
// in case the layout tree doesn't match the expected ARIA hierarchy, look at the children
if (!child->hasChildren())
« no previous file with comments | « LayoutTests/accessibility/aria-owns-grid.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698