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

Unified Diff: Source/core/xml/XPathStep.cpp

Issue 67473002: Have ElementTraversal / NodeTraversal's next() methods take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 years, 1 month 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/xml/XPathNodeSet.cpp ('k') | Source/core/xml/XPathUtil.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XPathStep.cpp
diff --git a/Source/core/xml/XPathStep.cpp b/Source/core/xml/XPathStep.cpp
index d7bca15681865e6de699116e3b0f211173762249..d08013e005eb5561c8ed82d18384eb68f0f47f97 100644
--- a/Source/core/xml/XPathStep.cpp
+++ b/Source/core/xml/XPathStep.cpp
@@ -254,7 +254,7 @@ void Step::nodesInAxis(Node* context, NodeSet& nodes) const
if (context->isAttributeNode()) // In XPath model, attribute nodes do not have children.
return;
- for (Node* n = context->firstChild(); n; n = NodeTraversal::next(n, context))
+ for (Node* n = context->firstChild(); n; n = NodeTraversal::next(*n, context))
if (nodeMatches(n, DescendantAxis, m_nodeTest))
nodes.append(n);
return;
@@ -305,7 +305,7 @@ void Step::nodesInAxis(Node* context, NodeSet& nodes) const
case FollowingAxis:
if (context->isAttributeNode()) {
Node* p = toAttr(context)->ownerElement();
- while ((p = NodeTraversal::next(p))) {
+ while ((p = NodeTraversal::next(*p))) {
if (nodeMatches(p, FollowingAxis, m_nodeTest))
nodes.append(p);
}
@@ -314,7 +314,7 @@ void Step::nodesInAxis(Node* context, NodeSet& nodes) const
for (Node* n = p->nextSibling(); n; n = n->nextSibling()) {
if (nodeMatches(n, FollowingAxis, m_nodeTest))
nodes.append(n);
- for (Node* c = n->firstChild(); c; c = NodeTraversal::next(c, n))
+ for (Node* c = n->firstChild(); c; c = NodeTraversal::next(*c, n))
if (nodeMatches(c, FollowingAxis, m_nodeTest))
nodes.append(c);
}
@@ -374,7 +374,7 @@ void Step::nodesInAxis(Node* context, NodeSet& nodes) const
if (context->isAttributeNode()) // In XPath model, attribute nodes do not have children.
return;
- for (Node* n = context->firstChild(); n; n = NodeTraversal::next(n, context))
+ for (Node* n = context->firstChild(); n; n = NodeTraversal::next(*n, context))
if (nodeMatches(n, DescendantOrSelfAxis, m_nodeTest))
nodes.append(n);
return;
« no previous file with comments | « Source/core/xml/XPathNodeSet.cpp ('k') | Source/core/xml/XPathUtil.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698