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

Unified Diff: Source/core/dom/ElementTraversal.h

Issue 425033002: Remove ContainerNode overload for ElementTraversal::previous() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ElementTraversal.h
diff --git a/Source/core/dom/ElementTraversal.h b/Source/core/dom/ElementTraversal.h
index 2b9ba96a500bb40996b657d935788569fee9e1c2..99de80b26254a9585993d91efa30e394a3c88747 100644
--- a/Source/core/dom/ElementTraversal.h
+++ b/Source/core/dom/ElementTraversal.h
@@ -59,10 +59,8 @@ public:
static ElementType* next(const Node& current) { return nextTemplate(current); }
static ElementType* next(const ContainerNode& current, const Node* stayWithin) { return nextTemplate(current, stayWithin); }
static ElementType* next(const Node& current, const Node* stayWithin) { return nextTemplate(current, stayWithin); }
- static ElementType* previous(const ContainerNode& current) { return previousTemplate(current); }
- static ElementType* previous(const Node& current) { return previousTemplate(current); }
- static ElementType* previous(const ContainerNode& current, const Node* stayWithin) { return previousTemplate(current, stayWithin); }
- static ElementType* previous(const Node& current, const Node* stayWithin) { return previousTemplate(current, stayWithin); }
+ static ElementType* previous(const Node&);
+ static ElementType* previous(const Node&, const Node* stayWithin);
// Like next, but skips children.
static ElementType* nextSkippingChildren(const Node&);
@@ -95,10 +93,6 @@ private:
static ElementType* nextTemplate(NodeType&);
template <class NodeType>
static ElementType* nextTemplate(NodeType&, const Node* stayWithin);
- template <class NodeType>
- static ElementType* previousTemplate(NodeType&);
- template <class NodeType>
- static ElementType* previousTemplate(NodeType&, const Node* stayWithin);
};
typedef Traversal<Element> ElementTraversal;
@@ -211,8 +205,7 @@ inline ElementType* Traversal<ElementType>::nextTemplate(NodeType& current, cons
}
template <class ElementType>
-template <class NodeType>
-inline ElementType* Traversal<ElementType>::previousTemplate(NodeType& current)
+inline ElementType* Traversal<ElementType>::previous(const Node& current)
{
Node* node = NodeTraversal::previous(current);
while (node && !isElementOfType<const ElementType>(*node))
@@ -221,8 +214,7 @@ inline ElementType* Traversal<ElementType>::previousTemplate(NodeType& current)
}
template <class ElementType>
-template <class NodeType>
-inline ElementType* Traversal<ElementType>::previousTemplate(NodeType& current, const Node* stayWithin)
+inline ElementType* Traversal<ElementType>::previous(const Node& current, const Node* stayWithin)
{
Node* node = NodeTraversal::previous(current, stayWithin);
while (node && !isElementOfType<const ElementType>(*node))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698