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

Unified Diff: Source/web/WebAXObject.cpp

Issue 903833003: Return table headers from the table cell level. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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/AXTableCell.cpp ('k') | public/web/WebAXObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebAXObject.cpp
diff --git a/Source/web/WebAXObject.cpp b/Source/web/WebAXObject.cpp
index 379167a740e1007fc53f20f15527151044544242..926bf4d7098e4caa3ff60ae15b49e5de331f3bff 100644
--- a/Source/web/WebAXObject.cpp
+++ b/Source/web/WebAXObject.cpp
@@ -1250,6 +1250,46 @@ WebAXSortDirection WebAXObject::sortDirection() const
return static_cast<WebAXSortDirection>(m_private->sortDirection());
}
+void WebAXObject::rowHeadersForCell(WebVector<WebAXObject>& rowHeaders) const
+{
+ if (isDetached())
+ return;
+
+ if (!m_private->isTableCell())
+ return;
+
+ AXObject::AccessibilityChildrenVector headers;
+ toAXTableCell(m_private.get())->rowHeadersForCell(headers);
+
+ size_t headerCount = headers.size();
+ WebVector<WebAXObject> result(headerCount);
+
+ for (size_t i = 0; i < headerCount; i++)
+ result[i] = WebAXObject(headers[i]);
+
+ rowHeaders.swap(result);
+}
+
+void WebAXObject::columnHeadersForCell(WebVector<WebAXObject>& columnHeaders) const
+{
+ if (isDetached())
+ return;
+
+ if (!m_private->isTableCell())
+ return;
+
+ AXObject::AccessibilityChildrenVector headers;
+ toAXTableCell(m_private.get())->columnHeadersForCell(headers);
+
+ size_t headerCount = headers.size();
+ WebVector<WebAXObject> result(headerCount);
+
+ for (size_t i = 0; i < headerCount; i++)
+ result[i] = WebAXObject(headers[i]);
+
+ columnHeaders.swap(result);
+}
+
void WebAXObject::loadInlineTextBoxes() const
{
if (isDetached())
« no previous file with comments | « Source/modules/accessibility/AXTableCell.cpp ('k') | public/web/WebAXObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698