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

Unified Diff: Source/WebCore/dom/TagNodeList.cpp

Issue 10695128: Merge 120979 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 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/WebCore/dom/TagNodeList.h ('k') | Source/WebCore/html/LabelableElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/dom/TagNodeList.cpp
===================================================================
--- Source/WebCore/dom/TagNodeList.cpp (revision 122245)
+++ Source/WebCore/dom/TagNodeList.cpp (working copy)
@@ -25,12 +25,13 @@
#include "TagNodeList.h"
#include "Element.h"
+#include "NodeRareData.h"
#include <wtf/Assertions.h>
namespace WebCore {
TagNodeList::TagNodeList(PassRefPtr<Node> rootNode, const AtomicString& namespaceURI, const AtomicString& localName)
- : DynamicSubtreeNodeList(rootNode)
+ : DynamicSubtreeNodeList(rootNode, RootedAtNode, DoNotInvalidateOnAttributeChange)
, m_namespaceURI(namespaceURI)
, m_localName(localName)
{
@@ -40,9 +41,9 @@
TagNodeList::~TagNodeList()
{
if (m_namespaceURI == starAtom)
- node()->removeCachedTagNodeList(this, m_localName);
+ m_node->nodeLists()->removeCacheWithAtomicName(this, DynamicNodeList::TagNodeListType, m_localName);
else
- node()->removeCachedTagNodeList(this, QualifiedName(nullAtom, m_localName, m_namespaceURI));
+ m_node->nodeLists()->removeCacheWithQualifiedName(this, m_namespaceURI, m_localName);
}
bool TagNodeList::nodeMatches(Element* testNode) const
@@ -54,8 +55,8 @@
return m_namespaceURI == starAtom || m_namespaceURI == testNode->namespaceURI();
}
-HTMLTagNodeList::HTMLTagNodeList(PassRefPtr<Node> rootNode, const AtomicString& namespaceURI, const AtomicString& localName)
- : TagNodeList(rootNode, namespaceURI, localName)
+HTMLTagNodeList::HTMLTagNodeList(PassRefPtr<Node> rootNode, const AtomicString& localName)
+ : TagNodeList(rootNode, starAtom, localName)
, m_loweredLocalName(localName.lower())
{
}
@@ -69,7 +70,8 @@
return false;
}
- return m_namespaceURI == starAtom || m_namespaceURI == testNode->namespaceURI();
+ ASSERT(m_namespaceURI == starAtom);
+ return true;
}
} // namespace WebCore
« no previous file with comments | « Source/WebCore/dom/TagNodeList.h ('k') | Source/WebCore/html/LabelableElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698