Index: Source/core/html/HTMLTableRowElement.cpp |
diff --git a/Source/core/html/HTMLTableRowElement.cpp b/Source/core/html/HTMLTableRowElement.cpp |
index 8d37d0eb0cc43ddf796049e7ead1b6257de12e3c..79882ae1ce9f78185857686d30cc423344e1debf 100644 |
--- a/Source/core/html/HTMLTableRowElement.cpp |
+++ b/Source/core/html/HTMLTableRowElement.cpp |
@@ -59,7 +59,7 @@ int HTMLTableRowElement::rowIndex() const |
if (!table) |
return -1; |
table = table->parentNode(); |
- if (!table || !table->hasTagName(tableTag)) |
+ if (!table || !isHTMLTableElement(table)) |
return -1; |
// To match Firefox, the row indices work like this: |
@@ -69,7 +69,7 @@ int HTMLTableRowElement::rowIndex() const |
int rIndex = 0; |
- if (HTMLTableSectionElement* head = static_cast<HTMLTableElement*>(table)->tHead()) { |
+ if (HTMLTableSectionElement* head = toHTMLTableElement(table)->tHead()) { |
for (Node *row = head->firstChild(); row; row = row->nextSibling()) { |
if (row == this) |
return rIndex; |
@@ -77,7 +77,7 @@ int HTMLTableRowElement::rowIndex() const |
++rIndex; |
} |
} |
- |
+ |
for (Node *node = table->firstChild(); node; node = node->nextSibling()) { |
if (node->hasTagName(tbodyTag)) { |
HTMLTableSectionElement* section = static_cast<HTMLTableSectionElement*>(node); |
@@ -90,7 +90,7 @@ int HTMLTableRowElement::rowIndex() const |
} |
} |
- if (HTMLTableSectionElement* foot = static_cast<HTMLTableElement*>(table)->tFoot()) { |
+ if (HTMLTableSectionElement* foot = toHTMLTableElement(table)->tFoot()) { |
for (Node *row = foot->firstChild(); row; row = row->nextSibling()) { |
if (row == this) |
return rIndex; |