| Index: Source/modules/accessibility/AXTableColumn.cpp
|
| diff --git a/Source/modules/accessibility/AXTableColumn.cpp b/Source/modules/accessibility/AXTableColumn.cpp
|
| index 3c37232dfd693c63c7c9e17af3610a4710dcb6c0..2f8d5c7161d2337c782abd5952002b29300006fc 100644
|
| --- a/Source/modules/accessibility/AXTableColumn.cpp
|
| +++ b/Source/modules/accessibility/AXTableColumn.cpp
|
| @@ -52,6 +52,7 @@ PassRefPtr<AXTableColumn> AXTableColumn::create(AXObjectCacheImpl* axObjectCache
|
| return adoptRef(new AXTableColumn(axObjectCache));
|
| }
|
|
|
| +
|
| void AXTableColumn::setParent(AXObject* parent)
|
| {
|
| AXMockObject::setParent(parent);
|
| @@ -65,6 +66,39 @@ LayoutRect AXTableColumn::elementRect() const
|
| return m_columnRect;
|
| }
|
|
|
| +void AXTableColumn::headerObjectsForColumn(AccessibilityChildrenVector& headers)
|
| +{
|
| + if (!m_parent)
|
| + return;
|
| +
|
| + RenderObject* renderer = m_parent->renderer();
|
| + if (!renderer || !renderer->isTable())
|
| + return;
|
| +
|
| + RenderTable* table = toRenderTable(renderer);
|
| + RenderTableSection* tableSection = table->topSection();
|
| + for (; tableSection; tableSection = table->sectionBelow(tableSection, SkipEmptySections)) {
|
| + unsigned numRows = tableSection->numRows();
|
| + for (unsigned r = 0; r < numRows; r++) {
|
| + RenderTableCell* renderCell = tableSection->primaryCellAt(r, m_columnIndex);
|
| + if (!renderCell)
|
| + continue;
|
| +
|
| + // Whenever cell's col is less then current column index, we've found the cell with colspan.
|
| + // We do not need to add this cell, it's already been added.
|
| + if (renderCell->col() < m_columnIndex)
|
| + continue;
|
| +
|
| + AXObject* cell = axObjectCache()->getOrCreate(renderCell->node());
|
| + if (!cell)
|
| + continue;
|
| +
|
| + if (toAXTableCell(cell)->scanToDecideHeaderRole() == ColumnHeaderRole)
|
| + headers.append(cell);
|
| + }
|
| + }
|
| +}
|
| +
|
| AXObject* AXTableColumn::headerObject()
|
| {
|
| if (!m_parent)
|
|
|