Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / dom / LiveNodeListBase.cpp
index a4b1202..bfcea21 100644 (file)
 #include "config.h"
 #include "core/dom/LiveNodeListBase.h"
 
+#include "core/dom/LiveNodeList.h"
 #include "core/html/HTMLCollection.h"
 
 namespace WebCore {
 
+void LiveNodeListBase::invalidateCacheForAttribute(const QualifiedName* attrName) const
+{
+    if (isLiveNodeListType(type()))
+        toLiveNodeList(this)->invalidateCacheForAttribute(attrName);
+    else
+        toHTMLCollection(this)->invalidateCacheForAttribute(attrName);
+}
+
 ContainerNode& LiveNodeListBase::rootNode() const
 {
     if (isRootedAtDocument() && m_ownerNode->inDocument())
@@ -42,10 +51,4 @@ void LiveNodeListBase::didMoveToDocument(Document& oldDocument, Document& newDoc
     newDocument.registerNodeList(this);
 }
 
-void LiveNodeListBase::invalidateIdNameCacheMaps() const
-{
-    ASSERT(hasIdNameCache());
-    static_cast<const HTMLCollection*>(this)->invalidateIdNameCacheMaps();
-}
-
 } // namespace WebCore