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

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

Issue 247263008: LiveNodeListBase code should not need to worry about id/name cache invalidation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Bug fix Created 6 years, 8 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/LiveNodeListBase.h ('k') | Source/core/dom/NodeRareData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/LiveNodeListBase.cpp
diff --git a/Source/core/dom/LiveNodeListBase.cpp b/Source/core/dom/LiveNodeListBase.cpp
index a4b120205760058afa1853005fb5efffc7935c59..bfcea21151d7e4e55e13eaf94657ce3d401b028f 100644
--- a/Source/core/dom/LiveNodeListBase.cpp
+++ b/Source/core/dom/LiveNodeListBase.cpp
@@ -24,10 +24,19 @@
#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
« no previous file with comments | « Source/core/dom/LiveNodeListBase.h ('k') | Source/core/dom/NodeRareData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698