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

Unified Diff: Source/core/html/HTMLTableRowElement.cpp

Issue 189923002: Use new Traversal<HTML*Element> API in HTML code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/core/html/HTMLTableElement.cpp ('k') | Source/core/html/HTMLTableSectionElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLTableRowElement.cpp
diff --git a/Source/core/html/HTMLTableRowElement.cpp b/Source/core/html/HTMLTableRowElement.cpp
index 802e96bc94d905490c77a3abbe2d5e4b12bd4375..51f5245d039deefcbe772a8ea03acb8c4b9bb4da 100644
--- a/Source/core/html/HTMLTableRowElement.cpp
+++ b/Source/core/html/HTMLTableRowElement.cpp
@@ -66,32 +66,29 @@ int HTMLTableRowElement::rowIndex() const
int rIndex = 0;
if (HTMLTableSectionElement* head = toHTMLTableElement(table)->tHead()) {
- for (Element* row = ElementTraversal::firstWithin(*head); row; row = ElementTraversal::nextSibling(*row)) {
+ for (HTMLTableRowElement* row = Traversal<HTMLTableRowElement>::firstChild(*head); row; row = Traversal<HTMLTableRowElement>::nextSibling(*row)) {
if (row == this)
return rIndex;
- if (row->hasTagName(trTag))
- ++rIndex;
+ ++rIndex;
}
}
for (Element* child = ElementTraversal::firstWithin(*table); child; child = ElementTraversal::nextSibling(*child)) {
if (child->hasTagName(tbodyTag)) {
HTMLTableSectionElement* section = toHTMLTableSectionElement(child);
- for (Element* row = ElementTraversal::firstWithin(*section); row; row = ElementTraversal::nextSibling(*row)) {
+ for (HTMLTableRowElement* row = Traversal<HTMLTableRowElement>::firstChild(*section); row; row = Traversal<HTMLTableRowElement>::nextSibling(*row)) {
if (row == this)
return rIndex;
- if (row->hasTagName(trTag))
- ++rIndex;
+ ++rIndex;
}
}
}
if (HTMLTableSectionElement* foot = toHTMLTableElement(table)->tFoot()) {
- for (Element* row = ElementTraversal::firstWithin(*foot); row; row = ElementTraversal::nextSibling(*row)) {
+ for (HTMLTableRowElement* row = Traversal<HTMLTableRowElement>::firstChild(*foot); row; row = Traversal<HTMLTableRowElement>::nextSibling(*row)) {
if (row == this)
return rIndex;
- if (row->hasTagName(trTag))
- ++rIndex;
+ ++rIndex;
}
}
« no previous file with comments | « Source/core/html/HTMLTableElement.cpp ('k') | Source/core/html/HTMLTableSectionElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698