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())) { |