Index: Source/core/dom/ElementTraversal.h |
diff --git a/Source/core/dom/ElementTraversal.h b/Source/core/dom/ElementTraversal.h |
index e0165aec982dea919c66ad86739af7b5791100ef..9bca3c28ee8433da886bc0c4759e5230a720fa34 100644 |
--- a/Source/core/dom/ElementTraversal.h |
+++ b/Source/core/dom/ElementTraversal.h |
@@ -220,9 +220,9 @@ template <class ElementType> |
template <class NodeType> |
inline ElementType* Traversal<ElementType>::lastWithinTemplate(NodeType& current) |
{ |
- Node* node = current.lastChild(); |
+ Node* node = NodeTraversal::lastWithin(current); |
while (node && !isElementOfType<const ElementType>(*node)) |
- node = NodeTraversal::previous(node, ¤t); |
+ node = NodeTraversal::previous(*node, ¤t); |
return toElement<ElementType>(node); |
} |