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

Unified Diff: Source/core/dom/TreeScopeAdopter.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/TreeScope.cpp ('k') | Source/core/dom/VisitedLinkState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/TreeScopeAdopter.cpp
diff --git a/Source/core/dom/TreeScopeAdopter.cpp b/Source/core/dom/TreeScopeAdopter.cpp
index 6561b09fe58d81c2ddc0aea865c2f8bc008c8658..366b4af3fa15f793b06ee6ab9733cfd114fc46f2 100644
--- a/Source/core/dom/TreeScopeAdopter.cpp
+++ b/Source/core/dom/TreeScopeAdopter.cpp
@@ -51,7 +51,7 @@ void TreeScopeAdopter::moveTreeToNewScope(Node& root) const
if (willMoveToNewDocument)
oldDocument->incDOMTreeVersion();
- for (Node* node = &root; node; node = NodeTraversal::next(node, &root)) {
+ for (Node* node = &root; node; node = NodeTraversal::next(*node, &root)) {
updateTreeScope(*node);
if (willMoveToNewDocument)
@@ -83,7 +83,7 @@ void TreeScopeAdopter::moveTreeToNewScope(Node& root) const
void TreeScopeAdopter::moveTreeToNewDocument(Node& root, Document& oldDocument, Document* newDocument) const
{
- for (Node* node = &root; node; node = NodeTraversal::next(node, &root)) {
+ for (Node* node = &root; node; node = NodeTraversal::next(*node, &root)) {
moveNodeToNewDocument(*node, oldDocument, newDocument);
for (ShadowRoot* shadow = node->youngestShadowRoot(); shadow; shadow = shadow->olderShadowRoot())
moveTreeToNewDocument(*shadow, oldDocument, newDocument);
« no previous file with comments | « Source/core/dom/TreeScope.cpp ('k') | Source/core/dom/VisitedLinkState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698