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

Unified Diff: Source/core/dom/Node.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/LiveNodeList.h ('k') | Source/core/dom/NodeIterator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 8ee85254c4ffd4eec82422953aa67a91c3caf2f8..1f230ec745150afadb7a9b21074a4bfb0ecd07be 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -737,7 +737,7 @@ bool Node::inActiveDocument() const
void Node::lazyAttach()
{
markAncestorsWithChildNeedsStyleRecalc();
- for (Node* node = this; node; node = NodeTraversal::next(node, this)) {
+ for (Node* node = this; node; node = NodeTraversal::next(*node, this)) {
node->setAttached();
node->setStyleChange(NeedsReattachStyleChange);
if (node->isContainerNode())
@@ -1880,7 +1880,7 @@ void Node::showNodePathForThis() const
static void traverseTreeAndMark(const String& baseIndent, const Node* rootNode, const Node* markedNode1, const char* markedLabel1, const Node* markedNode2, const char* markedLabel2)
{
- for (const Node* node = rootNode; node; node = NodeTraversal::next(node)) {
+ for (const Node* node = rootNode; node; node = NodeTraversal::next(*node)) {
if (node == markedNode1)
fprintf(stderr, "%s", markedLabel1);
if (node == markedNode2)
« no previous file with comments | « Source/core/dom/LiveNodeList.h ('k') | Source/core/dom/NodeIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698