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

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

Issue 179333004: Add template parameter to ElementTraversal to iterate over Elements of a specific type (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix failures and port more code to the new API 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/NodeIteratorBase.h ('k') | Source/core/dom/Traversal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/NodeIteratorBase.cpp
diff --git a/Source/core/dom/Traversal.cpp b/Source/core/dom/NodeIteratorBase.cpp
similarity index 87%
rename from Source/core/dom/Traversal.cpp
rename to Source/core/dom/NodeIteratorBase.cpp
index a9262cc934d7d70b0c93f1e1834b5885f42120a6..aa450fe29c6676d028b4063ebdf73f3fa6389877 100644
--- a/Source/core/dom/Traversal.cpp
+++ b/Source/core/dom/NodeIteratorBase.cpp
@@ -23,21 +23,21 @@
*/
#include "config.h"
-#include "core/dom/Traversal.h"
+#include "core/dom/NodeIteratorBase.h"
#include "core/dom/Node.h"
#include "core/dom/NodeFilter.h"
namespace WebCore {
-Traversal::Traversal(PassRefPtr<Node> rootNode, unsigned whatToShow, PassRefPtr<NodeFilter> nodeFilter)
+NodeIteratorBase::NodeIteratorBase(PassRefPtr<Node> rootNode, unsigned whatToShow, PassRefPtr<NodeFilter> nodeFilter)
: m_root(rootNode)
, m_whatToShow(whatToShow)
, m_filter(nodeFilter)
{
}
-short Traversal::acceptNode(ScriptState* state, Node* node) const
+short NodeIteratorBase::acceptNode(ScriptState* state, Node* node) const
{
// The bit twiddling here is done to map DOM node types, which are given as integers from
// 1 through 14, to whatToShow bit masks.
« no previous file with comments | « Source/core/dom/NodeIteratorBase.h ('k') | Source/core/dom/Traversal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698