summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/dom/NodeRareData.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/dom/NodeRareData.h')
-rw-r--r--Source/WebCore/dom/NodeRareData.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/Source/WebCore/dom/NodeRareData.h b/Source/WebCore/dom/NodeRareData.h
index ac05d3e..b81dd3f 100644
--- a/Source/WebCore/dom/NodeRareData.h
+++ b/Source/WebCore/dom/NodeRareData.h
@@ -22,6 +22,7 @@
#ifndef NodeRareData_h
#define NodeRareData_h
+#include "ChildNodeList.h"
#include "ClassNodeList.h"
#include "DynamicNodeList.h"
#include "NameNodeList.h"
@@ -42,17 +43,20 @@ public:
typedef HashSet<DynamicNodeList*> NodeListSet;
NodeListSet m_listsWithCaches;
- RefPtr<DynamicNodeList::Caches> m_childNodeListCaches;
+ RefPtr<ChildNodeList> m_childNodeListCache;
typedef HashMap<String, ClassNodeList*> ClassNodeListCache;
ClassNodeListCache m_classNodeListCache;
typedef HashMap<String, NameNodeList*> NameNodeListCache;
NameNodeListCache m_nameNodeListCache;
-
- typedef HashMap<RefPtr<QualifiedName::QualifiedNameImpl>, TagNodeList*> TagNodeListCache;
+
+ typedef HashMap<AtomicStringImpl*, TagNodeList*> TagNodeListCache;
TagNodeListCache m_tagNodeListCache;
+ typedef HashMap<RefPtr<QualifiedName::QualifiedNameImpl>, TagNodeListNS*> TagNodeListCacheNS;
+ TagNodeListCacheNS m_tagNodeListCacheNS;
+
RefPtr<DynamicNodeList> m_labelsNodeListCache;
static PassOwnPtr<NodeListsNodeData> create()
@@ -66,7 +70,8 @@ public:
private:
NodeListsNodeData()
- : m_childNodeListCaches(DynamicNodeList::Caches::create()), m_labelsNodeListCache(0)
+ : m_childNodeListCache(0)
+ , m_labelsNodeListCache(0)
{
}
};
@@ -106,6 +111,15 @@ public:
void clearNodeLists() { m_nodeLists.clear(); }
void setNodeLists(PassOwnPtr<NodeListsNodeData> lists) { m_nodeLists = lists; }
NodeListsNodeData* nodeLists() const { return m_nodeLists.get(); }
+ NodeListsNodeData* ensureNodeLists(Node* n)
+ {
+ if (!m_nodeLists) {
+ m_nodeLists = NodeListsNodeData::create();
+ if (n->document())
+ n->document()->addNodeListCache();
+ }
+ return m_nodeLists.get();
+ }
short tabIndex() const { return m_tabIndex; }
void setTabIndexExplicitly(short index) { m_tabIndex = index; m_tabIndexWasSetExplicitly = true; }