| Index: Source/core/dom/NodeTraversal.cpp
|
| diff --git a/Source/core/dom/NodeTraversal.cpp b/Source/core/dom/NodeTraversal.cpp
|
| index 37e37cc38814a9f3a022d2deefab6ff67a56f757..0f4a9f16a088c5522ada0984c9f3606287d37b00 100644
|
| --- a/Source/core/dom/NodeTraversal.cpp
|
| +++ b/Source/core/dom/NodeTraversal.cpp
|
| @@ -96,6 +96,14 @@ Node* NodeTraversal::nextAncestorSibling(const Node& current, const Node* stayWi
|
| return 0;
|
| }
|
|
|
| +Node* NodeTraversal::lastWithin(const ContainerNode& current)
|
| +{
|
| + Node* descendant = current.lastChild();
|
| + for (Node* child = descendant; child; child = child->lastChild())
|
| + descendant = child;
|
| + return descendant;
|
| +}
|
| +
|
| Node* NodeTraversal::previous(const Node& current, const Node* stayWithin)
|
| {
|
| if (current == stayWithin)
|
|
|