diff options
Diffstat (limited to 'WebCore/dom/ClassNodeList.cpp')
-rw-r--r-- | WebCore/dom/ClassNodeList.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/WebCore/dom/ClassNodeList.cpp b/WebCore/dom/ClassNodeList.cpp index a7aefba..d482359 100644 --- a/WebCore/dom/ClassNodeList.cpp +++ b/WebCore/dom/ClassNodeList.cpp @@ -35,12 +35,18 @@ namespace WebCore { -ClassNodeList::ClassNodeList(PassRefPtr<Node> rootNode, const String& classNames, DynamicNodeList::Caches* caches) - : DynamicNodeList(rootNode, caches) +ClassNodeList::ClassNodeList(PassRefPtr<Node> rootNode, const String& classNames) + : DynamicNodeList(rootNode) , m_classNames(classNames, m_rootNode->document()->inCompatMode()) + , m_originalClassNames(classNames) { } +ClassNodeList::~ClassNodeList() +{ + m_rootNode->removeCachedClassNodeList(this, m_originalClassNames); +} + bool ClassNodeList::nodeMatches(Element* testNode) const { if (!testNode->hasClass()) |