Chromium Code Reviews| Index: Source/core/dom/LiveNodeList.cpp |
| diff --git a/Source/core/dom/LiveNodeList.cpp b/Source/core/dom/LiveNodeList.cpp |
| index 08d9d86b82f384a48cdadda44e60c1f85896c474..1f51dcf09b098169db36dea823059ae1a42a1c06 100644 |
| --- a/Source/core/dom/LiveNodeList.cpp |
| +++ b/Source/core/dom/LiveNodeList.cpp |
| @@ -35,13 +35,20 @@ ContainerNode& LiveNodeListBase::rootNode() const |
| return *m_ownerNode; |
| } |
| +void LiveNodeListBase::didMoveToDocument(Document& oldDocument, Document& newDocument) |
| +{ |
| + invalidateCache(&oldDocument); |
|
Inactive
2014/02/12 18:26:08
We need to pass the oldDocument to invalidateCache
|
| + oldDocument.unregisterNodeList(this); |
| + newDocument.registerNodeList(this); |
| +} |
| + |
| void LiveNodeListBase::invalidateIdNameCacheMaps() const |
| { |
| ASSERT(hasIdNameCache()); |
| static_cast<const HTMLCollection*>(this)->invalidateIdNameCacheMaps(); |
| } |
| -void LiveNodeList::invalidateCache() const |
| +void LiveNodeList::invalidateCache(Document*) const |
| { |
| m_collectionIndexCache.invalidate(); |
| } |