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

Unified Diff: Source/core/html/HTMLTableSectionElement.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/HTMLTableRowElement.cpp ('k') | Source/core/html/track/LoadableTextTrack.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLTableSectionElement.cpp
diff --git a/Source/core/html/HTMLTableSectionElement.cpp b/Source/core/html/HTMLTableSectionElement.cpp
index 31a0f3ee7dbfcf68f3ae766b237d619fa5dd159b..1820cabd68610e8b98c517202f4d83df74098afb 100644
--- a/Source/core/html/HTMLTableSectionElement.cpp
+++ b/Source/core/html/HTMLTableSectionElement.cpp
@@ -97,10 +97,8 @@ void HTMLTableSectionElement::deleteRow(int index, ExceptionState& exceptionStat
int HTMLTableSectionElement::numRows() const
{
int rowCount = 0;
- for (const Element* child = ElementTraversal::firstWithin(*this); child; child = ElementTraversal::nextSibling(*child)) {
- if (child->hasTagName(trTag))
- ++rowCount;
- }
+ for (const HTMLTableRowElement* row = Traversal<HTMLTableRowElement>::firstChild(*this); row; row = Traversal<HTMLTableRowElement>::nextSibling(*row))
+ ++rowCount;
return rowCount;
}
« no previous file with comments | « Source/core/html/HTMLTableRowElement.cpp ('k') | Source/core/html/track/LoadableTextTrack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698