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

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

Issue 113653006: Remove complexity related to m_cachedElementsArrayOffset from LiveNodeListBase (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 12 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/HTMLCollection.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 4e437fa60fd0fa287616a2537526b9bf725cc387..9c664b6b8f0ce6dd06b0e69919c3e5adf10e86a7 100644
--- a/Source/core/dom/LiveNodeList.cpp
+++ b/Source/core/dom/LiveNodeList.cpp
@@ -49,21 +49,12 @@ void LiveNodeListBase::invalidateCache() const
m_isLengthCacheValid = false;
m_isItemCacheValid = false;
m_isNameCacheValid = false;
- if (isNodeList(type()))
- return;
-
- const HTMLCollection* cacheBase = static_cast<const HTMLCollection*>(this);
- cacheBase->m_idCache.clear();
- cacheBase->m_nameCache.clear();
- cacheBase->m_cachedElementsArrayOffset = 0;
}
void LiveNodeListBase::invalidateIdNameCacheMaps() const
{
ASSERT(hasIdNameCache());
- const HTMLCollection* cacheBase = static_cast<const HTMLCollection*>(this);
- cacheBase->m_idCache.clear();
- cacheBase->m_nameCache.clear();
+ static_cast<const HTMLCollection*>(this)->invalidateIdNameCacheMaps();
eseidel 2014/01/03 17:45:00 Bleh.
}
Node* LiveNodeList::namedItem(const AtomicString& elementId) const
« no previous file with comments | « Source/core/dom/LiveNodeList.h ('k') | Source/core/html/HTMLCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698