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

Unified Diff: Source/core/dom/NodeTraversal.cpp

Issue 172313003: Make ElementTraversal / NodeTraversal classes for clarity (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove inline Created 6 years, 10 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/dom/NodeTraversal.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/NodeTraversal.cpp
diff --git a/Source/core/dom/NodeTraversal.cpp b/Source/core/dom/NodeTraversal.cpp
index b5eba511658b779a44fdf5666f002bd6279262ff..37e37cc38814a9f3a022d2deefab6ff67a56f757 100644
--- a/Source/core/dom/NodeTraversal.cpp
+++ b/Source/core/dom/NodeTraversal.cpp
@@ -28,9 +28,8 @@
#include "core/dom/ContainerNode.h"
namespace WebCore {
-namespace NodeTraversal {
-Node* previousIncludingPseudo(const Node& current, const Node* stayWithin)
+Node* NodeTraversal::previousIncludingPseudo(const Node& current, const Node* stayWithin)
{
if (current == stayWithin)
return 0;
@@ -42,7 +41,7 @@ Node* previousIncludingPseudo(const Node& current, const Node* stayWithin)
return current.parentNode();
}
-Node* nextIncludingPseudo(const Node& current, const Node* stayWithin)
+Node* NodeTraversal::nextIncludingPseudo(const Node& current, const Node* stayWithin)
{
if (Node* next = current.pseudoAwareFirstChild())
return next;
@@ -59,7 +58,7 @@ Node* nextIncludingPseudo(const Node& current, const Node* stayWithin)
return 0;
}
-Node* nextIncludingPseudoSkippingChildren(const Node& current, const Node* stayWithin)
+Node* NodeTraversal::nextIncludingPseudoSkippingChildren(const Node& current, const Node* stayWithin)
{
if (current == stayWithin)
return 0;
@@ -74,7 +73,7 @@ Node* nextIncludingPseudoSkippingChildren(const Node& current, const Node* stayW
return 0;
}
-Node* nextAncestorSibling(const Node& current)
+Node* NodeTraversal::nextAncestorSibling(const Node& current)
{
ASSERT(!current.nextSibling());
for (Node* parent = current.parentNode(); parent; parent = parent->parentNode()) {
@@ -84,7 +83,7 @@ Node* nextAncestorSibling(const Node& current)
return 0;
}
-Node* nextAncestorSibling(const Node& current, const Node* stayWithin)
+Node* NodeTraversal::nextAncestorSibling(const Node& current, const Node* stayWithin)
{
ASSERT(!current.nextSibling());
ASSERT(current != stayWithin);
@@ -97,7 +96,7 @@ Node* nextAncestorSibling(const Node& current, const Node* stayWithin)
return 0;
}
-Node* previous(const Node& current, const Node* stayWithin)
+Node* NodeTraversal::previous(const Node& current, const Node* stayWithin)
{
if (current == stayWithin)
return 0;
@@ -110,7 +109,7 @@ Node* previous(const Node& current, const Node* stayWithin)
return current.parentNode();
}
-Node* previousSkippingChildren(const Node& current, const Node* stayWithin)
+Node* NodeTraversal::previousSkippingChildren(const Node& current, const Node* stayWithin)
{
if (current == stayWithin)
return 0;
@@ -125,7 +124,7 @@ Node* previousSkippingChildren(const Node& current, const Node* stayWithin)
return 0;
}
-Node* nextPostOrder(const Node& current, const Node* stayWithin)
+Node* NodeTraversal::nextPostOrder(const Node& current, const Node* stayWithin)
{
if (current == stayWithin)
return 0;
@@ -149,7 +148,7 @@ static Node* previousAncestorSiblingPostOrder(const Node& current, const Node* s
return 0;
}
-Node* previousPostOrder(const Node& current, const Node* stayWithin)
+Node* NodeTraversal::previousPostOrder(const Node& current, const Node* stayWithin)
{
if (current.lastChild())
return current.lastChild();
@@ -160,5 +159,4 @@ Node* previousPostOrder(const Node& current, const Node* stayWithin)
return previousAncestorSiblingPostOrder(current, stayWithin);
}
-}
-}
+} // namespace WebCore
« no previous file with comments | « Source/core/dom/NodeTraversal.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698