Index: third_party/WebKit/Source/modules/accessibility/AXTableCell.cpp |
diff --git a/third_party/WebKit/Source/modules/accessibility/AXTableCell.cpp b/third_party/WebKit/Source/modules/accessibility/AXTableCell.cpp |
index 4880b6f1f6fc1c462ffada39467a276e4e2b434e..f5277ea1c4e1fa7f578305915297dc27222aca2f 100644 |
--- a/third_party/WebKit/Source/modules/accessibility/AXTableCell.cpp |
+++ b/third_party/WebKit/Source/modules/accessibility/AXTableCell.cpp |
@@ -30,6 +30,7 @@ |
#include "core/layout/LayoutTableCell.h" |
#include "modules/accessibility/AXObjectCacheImpl.h" |
+#include "modules/accessibility/AXTableRow.h" |
namespace blink { |
@@ -101,6 +102,32 @@ bool AXTableCell::isTableCell() const { |
return true; |
} |
+unsigned AXTableCell::ariaColumnIndex() const |
+{ |
+ const AtomicString& colIndex = getAttribute(aria_colindexAttr); |
+ if (colIndex.toInt() >= 1) |
+ return colIndex.toInt(); |
+ |
+ AXObject* parent = parentObjectUnignored(); |
+ if (!parent || !parent->isTableRow()) |
aboxhall
2016/11/29 17:36:54
Is this check necessary? How would m_ariaColIndexF
dmazzoni
2016/11/30 22:48:17
This can happen in teardown, or if the AX tree is
|
+ return 0; |
+ |
+ return m_ariaColIndexFromRow; |
+} |
+ |
+unsigned AXTableCell::ariaRowIndex() const |
+{ |
+ const AtomicString& rowIndex = getAttribute(aria_rowindexAttr); |
+ if (rowIndex.toInt() >= 1) |
+ return rowIndex.toInt(); |
+ |
+ AXObject* parent = parentObjectUnignored(); |
+ if (!parent || !parent->isTableRow()) |
+ return 0; |
+ |
+ return toAXTableRow(parent)->ariaRowIndex(); |
+} |
+ |
static AccessibilityRole decideRoleFromSibling(LayoutTableCell* siblingCell) { |
if (!siblingCell) |
return CellRole; |