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