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

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

Issue 134193005: Move caching out of LiveNodeListBase and into a new CollectionIndexCache class (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 11 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
« no previous file with comments | « Source/core/dom/LiveNodeList.h ('k') | Source/core/html/CollectionIndexCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/LiveNodeList.cpp
diff --git a/Source/core/dom/LiveNodeList.cpp b/Source/core/dom/LiveNodeList.cpp
index 56c164ad1b0e15b4b404e876cfb111d669807d64..c0c2034974f2727ac70a59a019facc92941e6fbc 100644
--- a/Source/core/dom/LiveNodeList.cpp
+++ b/Source/core/dom/LiveNodeList.cpp
@@ -35,18 +35,17 @@ ContainerNode& LiveNodeListBase::rootNode() const
return *m_ownerNode;
}
-void LiveNodeListBase::invalidateCache() const
-{
- m_cachedItem = 0;
- m_isLengthCacheValid = false;
-}
-
void LiveNodeListBase::invalidateIdNameCacheMaps() const
{
ASSERT(hasIdNameCache());
static_cast<const HTMLCollection*>(this)->invalidateIdNameCacheMaps();
}
+void LiveNodeList::invalidateCache() const
+{
+ m_collectionIndexCache.invalidate();
+}
+
Node* LiveNodeList::namedItem(const AtomicString& elementId) const
{
Node& rootNode = this->rootNode();
« no previous file with comments | « Source/core/dom/LiveNodeList.h ('k') | Source/core/html/CollectionIndexCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698