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

Unified Diff: Source/core/dom/NodeIterator.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/dom/Node.cpp ('k') | Source/core/dom/NodeTraversal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/NodeIterator.cpp
diff --git a/Source/core/dom/NodeIterator.cpp b/Source/core/dom/NodeIterator.cpp
index 0770aa15d939e2f6e86a3898c364e701f6ad2379..348df6955d3243569c24f20f4e1b3ec9a90bd59d 100644
--- a/Source/core/dom/NodeIterator.cpp
+++ b/Source/core/dom/NodeIterator.cpp
@@ -58,7 +58,7 @@ bool NodeIterator::NodePointer::moveToNext(Node* root)
isPointerBeforeNode = false;
return true;
}
- node = NodeTraversal::next(node.get(), root);
+ node = NodeTraversal::next(*node, root);
return node;
}
@@ -174,12 +174,12 @@ void NodeIterator::updateForNodeRemoval(Node& removedNode, NodePointer& referenc
return;
if (referenceNode.isPointerBeforeNode) {
- Node* node = NodeTraversal::next(&removedNode, root());
+ Node* node = NodeTraversal::next(removedNode, root());
if (node) {
// Move out from under the node being removed if the new reference
// node is a descendant of the node being removed.
while (node && node->isDescendantOf(&removedNode))
- node = NodeTraversal::next(node, root());
+ node = NodeTraversal::next(*node, root());
if (node)
referenceNode.node = node;
} else {
@@ -213,7 +213,7 @@ void NodeIterator::updateForNodeRemoval(Node& removedNode, NodePointer& referenc
referenceNode.node = node;
} else {
// FIXME: This branch doesn't appear to have any LayoutTests.
- node = NodeTraversal::next(&removedNode, root());
+ node = NodeTraversal::next(removedNode, root());
// Move out from under the node being removed if the reference node is
// a descendant of the node being removed.
if (willRemoveReferenceNodeAncestor) {
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | Source/core/dom/NodeTraversal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698