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 |