Index: Source/core/accessibility/AXTable.cpp |
diff --git a/Source/core/accessibility/AXTable.cpp b/Source/core/accessibility/AXTable.cpp |
index cec8734bebe40a81220f330dfa86c156da81ec95..58ba00253c47229a1860b453ba6ffb77752ace0c 100644 |
--- a/Source/core/accessibility/AXTable.cpp |
+++ b/Source/core/accessibility/AXTable.cpp |
@@ -35,6 +35,7 @@ |
#include "core/accessibility/AXTableRow.h" |
#include "core/html/HTMLTableCaptionElement.h" |
#include "core/html/HTMLTableCellElement.h" |
+#include "core/html/HTMLTableColElement.h" |
#include "core/html/HTMLTableElement.h" |
#include "core/rendering/RenderTableCell.h" |
@@ -119,10 +120,8 @@ bool AXTable::isDataTable() const |
return true; |
// if there's a colgroup or col element, it's probably a data table. |
- for (Node* child = tableElement->firstChild(); child; child = child->nextSibling()) { |
- if (child->hasTagName(colTag) || child->hasTagName(colgroupTag)) |
- return true; |
- } |
+ if (Traversal<HTMLTableColElement>::firstChild(*tableElement)) |
+ return true; |
// go through the cell's and check for tell-tale signs of "data" table status |
// cells have borders, or use attributes like headers, abbr, scope or axis |
@@ -191,10 +190,10 @@ bool AXTable::isDataTable() const |
headersInFirstColumnCount++; |
// in this case, the developer explicitly assigned a "data" table attribute |
- if (cellNode->hasTagName(tdTag) || cellNode->hasTagName(thTag)) { |
- HTMLTableCellElement* cellElement = toHTMLTableCellElement(cellNode); |
- if (!cellElement->headers().isEmpty() || !cellElement->abbr().isEmpty() |
- || !cellElement->axis().isEmpty() || !cellElement->scope().isEmpty()) |
+ if (isHTMLTableCellElement(*cellNode)) { |
+ HTMLTableCellElement& cellElement = toHTMLTableCellElement(*cellNode); |
+ if (!cellElement.headers().isEmpty() || !cellElement.abbr().isEmpty() |
+ || !cellElement.axis().isEmpty() || !cellElement.scope().isEmpty()) |
return true; |
} |