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

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

Issue 862543003: Table headers are not retrieved properly by Accessibility API (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Minor fixes, correct comment and very small refactoring Created 5 years, 11 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/table-headers-expected.txt ('k') | Source/modules/accessibility/AXTableCell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXTable.cpp
diff --git a/Source/modules/accessibility/AXTable.cpp b/Source/modules/accessibility/AXTable.cpp
index bcd0cb9a6c5fef3c7ca4d466d44cd45e09fd2ec3..3fc0d4e0ae701f8cd2f562def0120a1e87d14e5b 100644
--- a/Source/modules/accessibility/AXTable.cpp
+++ b/Source/modules/accessibility/AXTable.cpp
@@ -469,14 +469,9 @@ void AXTable::columnHeaders(AccessibilityChildrenVector& headers)
return;
updateChildrenIfNecessary();
-
- unsigned colCount = m_columns.size();
- for (unsigned k = 0; k < colCount; ++k) {
- AXObject* header = toAXTableColumn(m_columns[k].get())->headerObject();
- if (!header)
- continue;
- headers.append(header);
- }
+ unsigned columnCount = m_columns.size();
+ for (unsigned c = 0; c < columnCount; c++)
+ toAXTableColumn(m_columns[c].get())->headerObjectsForColumn(headers);
}
void AXTable::rowHeaders(AccessibilityChildrenVector& headers)
@@ -485,12 +480,9 @@ void AXTable::rowHeaders(AccessibilityChildrenVector& headers)
return;
updateChildrenIfNecessary();
-
unsigned rowCount = m_rows.size();
- for (unsigned r = 0; r < rowCount; r++) {
- if (AXObject* header = toAXTableRow(m_rows[r].get())->headerObject())
- headers.append(header);
- }
+ for (unsigned r = 0; r < rowCount; r++)
+ toAXTableRow(m_rows[r].get())->headerObjectsForRow(headers);
}
void AXTable::cells(AXObject::AccessibilityChildrenVector& cells)
« no previous file with comments | « LayoutTests/accessibility/table-headers-expected.txt ('k') | Source/modules/accessibility/AXTableCell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698