| Index: Source/core/html/HTMLTableRowsCollection.cpp
|
| diff --git a/Source/core/html/HTMLTableRowsCollection.cpp b/Source/core/html/HTMLTableRowsCollection.cpp
|
| index 5dbaeddc23f71d10e9e074579bfdadc11a3eb904..0f4623c850fa9a8dd91f255b12d4c2d1c0000ac5 100644
|
| --- a/Source/core/html/HTMLTableRowsCollection.cpp
|
| +++ b/Source/core/html/HTMLTableRowsCollection.cpp
|
| @@ -55,11 +55,7 @@ static bool isInFoot(Element* row)
|
|
|
| static inline HTMLTableRowElement* findTableRowElementInChildren(Element& current)
|
| {
|
| - for (Element* child = ElementTraversal::firstWithin(current); child; child = ElementTraversal::nextSibling(*child)) {
|
| - if (isHTMLTableRowElement(child))
|
| - return toHTMLTableRowElement(child);
|
| - }
|
| - return 0;
|
| + return Traversal<HTMLTableRowElement>::firstWithin(current);
|
| }
|
|
|
| HTMLTableRowElement* HTMLTableRowsCollection::rowAfter(HTMLTableElement* table, HTMLTableRowElement* previous)
|
| @@ -69,10 +65,8 @@ HTMLTableRowElement* HTMLTableRowsCollection::rowAfter(HTMLTableElement* table,
|
| // Start by looking for the next row in this section.
|
| // Continue only if there is none.
|
| if (previous && previous->parentNode() != table) {
|
| - for (child = ElementTraversal::nextSibling(*previous); child; child = ElementTraversal::nextSibling(*child)) {
|
| - if (isHTMLTableRowElement(child))
|
| - return toHTMLTableRowElement(child);
|
| - }
|
| + if (HTMLTableRowElement* row = Traversal<HTMLTableRowElement>::nextSibling(*previous))
|
| + return row;
|
| }
|
|
|
| // If still looking at head sections, find the first row in the next head section.
|
|
|