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

Unified Diff: WebCore/dom/Document.cpp

Issue 5753004: Merge 73559 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 10 years 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 | « WebCore/dom/Document.h ('k') | WebCore/dom/Node.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/dom/Document.cpp
===================================================================
--- WebCore/dom/Document.cpp (revision 73793)
+++ WebCore/dom/Document.cpp (working copy)
@@ -3302,6 +3302,18 @@
m_nodeIterators.remove(ni);
}
+void Document::moveNodeIteratorsToNewDocument(Node* node, Document* newDocument)
+{
+ HashSet<NodeIterator*> nodeIteratorsList = m_nodeIterators;
+ HashSet<NodeIterator*>::const_iterator nodeIteratorsEnd = nodeIteratorsList.end();
+ for (HashSet<NodeIterator*>::const_iterator it = nodeIteratorsList.begin(); it != nodeIteratorsEnd; ++it) {
+ if ((*it)->referenceNode() == node) {
+ detachNodeIterator(*it);
+ newDocument->attachNodeIterator(*it);
+ }
+ }
+}
+
void Document::nodeChildrenChanged(ContainerNode* container)
{
if (!disableRangeMutation(page())) {
« no previous file with comments | « WebCore/dom/Document.h ('k') | WebCore/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698