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

Unified Diff: Source/modules/accessibility/AXTableRow.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 | « Source/modules/accessibility/AXTableRow.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXTableRow.cpp
diff --git a/Source/modules/accessibility/AXTableRow.cpp b/Source/modules/accessibility/AXTableRow.cpp
index 9cebfe2a8f102362421f16b9579850e485a23f59..14e166e3a8091b90a9c0c5e50008c16f3ec4536c 100644
--- a/Source/modules/accessibility/AXTableRow.cpp
+++ b/Source/modules/accessibility/AXTableRow.cpp
@@ -126,4 +126,21 @@ AXObject* AXTableRow::headerObject()
return cell;
}
+void AXTableRow::headerObjectsForRow(AccessibilityChildrenVector& headers)
+{
+ if (!m_renderer || !m_renderer->isTableRow())
+ return;
+
+ AccessibilityChildrenVector rowChildren = children();
+ unsigned childrenCount = rowChildren.size();
+ for (unsigned i = 0; i < childrenCount; i++) {
+ AXObject* cell = rowChildren[i].get();
+ if (!cell->isTableCell())
+ continue;
+
+ if (toAXTableCell(cell)->scanToDecideHeaderRole() == RowHeaderRole)
+ headers.append(cell);
+ }
+}
+
} // namespace blink
« no previous file with comments | « Source/modules/accessibility/AXTableRow.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698