Index: Source/core/dom/LiveNodeList.cpp |
diff --git a/Source/core/dom/LiveNodeList.cpp b/Source/core/dom/LiveNodeList.cpp |
index 21d078323f9031a1ea2f5d746d4381750948d0b3..d43ce2f541815711ce5d4b231688acc7fa8415be 100644 |
--- a/Source/core/dom/LiveNodeList.cpp |
+++ b/Source/core/dom/LiveNodeList.cpp |
@@ -35,6 +35,13 @@ ContainerNode& LiveNodeListBase::rootNode() const |
return *m_ownerNode; |
} |
+void LiveNodeListBase::didMoveToDocument(Document& oldDocument, Document& newDocument) |
+{ |
+ invalidateCache(&oldDocument); |
+ oldDocument.unregisterNodeList(this); |
+ newDocument.registerNodeList(this); |
+} |
+ |
void LiveNodeListBase::invalidateIdNameCacheMaps() const |
{ |
ASSERT(hasIdNameCache()); |
@@ -46,7 +53,7 @@ Node* LiveNodeList::virtualOwnerNode() const |
return ownerNode(); |
} |
-void LiveNodeList::invalidateCache() const |
+void LiveNodeList::invalidateCache(Document*) const |
{ |
m_collectionIndexCache.invalidate(); |
} |