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

Unified Diff: Source/core/inspector/DOMPatchSupport.cpp

Issue 425223005: Move Node/ContainerNode's traverseToChildAt() to NodeTraversal (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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/editing/VisibleUnits.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/DOMPatchSupport.cpp
diff --git a/Source/core/inspector/DOMPatchSupport.cpp b/Source/core/inspector/DOMPatchSupport.cpp
index f68df028b7bf97be20ff36cfb6e55e4b2c7f90ba..8c4547bbc16e4fd4f842124a56887de9bfddbcba 100644
--- a/Source/core/inspector/DOMPatchSupport.cpp
+++ b/Source/core/inspector/DOMPatchSupport.cpp
@@ -38,6 +38,7 @@
#include "core/dom/Document.h"
#include "core/dom/DocumentFragment.h"
#include "core/dom/Node.h"
+#include "core/dom/NodeTraversal.h"
#include "core/dom/XMLDocument.h"
#include "core/html/HTMLBodyElement.h"
#include "core/html/HTMLDocument.h"
@@ -380,7 +381,7 @@ bool DOMPatchSupport::innerPatchChildren(ContainerNode* parentNode, const Vector
for (size_t i = 0; i < newMap.size(); ++i) {
if (newMap[i].first || merges.contains(newList[i].get()))
continue;
- if (!insertBeforeAndMarkAsUsed(parentNode, newList[i].get(), parentNode->traverseToChildAt(i), exceptionState))
+ if (!insertBeforeAndMarkAsUsed(parentNode, newList[i].get(), NodeTraversal::childAt(*parentNode, i), exceptionState))
return false;
}
@@ -389,7 +390,7 @@ bool DOMPatchSupport::innerPatchChildren(ContainerNode* parentNode, const Vector
if (!oldMap[i].first)
continue;
RefPtrWillBeRawPtr<Node> node = oldMap[i].first->m_node;
- Node* anchorNode = parentNode->traverseToChildAt(oldMap[i].second);
+ Node* anchorNode = NodeTraversal::childAt(*parentNode, oldMap[i].second);
if (node == anchorNode)
continue;
if (isHTMLBodyElement(*node) || isHTMLHeadElement(*node))
« no previous file with comments | « Source/core/editing/VisibleUnits.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698