Chromium Code Reviews (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out

Unified Diff: Source/core/dom/LiveNodeList.cpp

Issue 159503003: Do not cause unnecessary node lists invalidation on id/name attribute change (Closed) Base URL: svn://
Patch Set: Rebase Created 6 years, 10 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
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
static_cast<const HTMLCollection*>(this)->invalidateIdNameCacheMaps();
-void LiveNodeList::invalidateCache() const
+void LiveNodeList::invalidateCache(Document*) const

Powered by Google App Engine
This is Rietveld 408576698