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

Side by Side Diff: Source/WebCore/dom/NodeRareData.h

Issue 10689138: Merge 120868 (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 unified diff | Download patch
« no previous file with comments | « Source/WebCore/dom/Node.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com> 3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 namespace WebCore { 45 namespace WebCore {
46 46
47 class LabelsNodeList; 47 class LabelsNodeList;
48 class RadioNodeList; 48 class RadioNodeList;
49 class TreeScope; 49 class TreeScope;
50 50
51 struct NodeListsNodeData { 51 struct NodeListsNodeData {
52 WTF_MAKE_NONCOPYABLE(NodeListsNodeData); WTF_MAKE_FAST_ALLOCATED; 52 WTF_MAKE_NONCOPYABLE(NodeListsNodeData); WTF_MAKE_FAST_ALLOCATED;
53 public: 53 public:
54 typedef HashSet<DynamicSubtreeNodeList*> NodeListSet;
55 NodeListSet m_listsInvalidatedAtDocument;
56
57 typedef HashMap<String, ClassNodeList*> ClassNodeListCache; 54 typedef HashMap<String, ClassNodeList*> ClassNodeListCache;
58 ClassNodeListCache m_classNodeListCache; 55 ClassNodeListCache m_classNodeListCache;
59 56
60 typedef HashMap<String, NameNodeList*> NameNodeListCache; 57 typedef HashMap<String, NameNodeList*> NameNodeListCache;
61 NameNodeListCache m_nameNodeListCache; 58 NameNodeListCache m_nameNodeListCache;
62 59
63 typedef HashMap<AtomicString, TagNodeList*> TagNodeListCache; 60 typedef HashMap<AtomicString, TagNodeList*> TagNodeListCache;
64 TagNodeListCache m_tagNodeListCache; 61 TagNodeListCache m_tagNodeListCache;
65 62
66 typedef HashMap<RefPtr<QualifiedName::QualifiedNameImpl>, TagNodeList*> TagN odeListCacheNS; 63 typedef HashMap<RefPtr<QualifiedName::QualifiedNameImpl>, TagNodeList*> TagN odeListCacheNS;
67 TagNodeListCacheNS m_tagNodeListCacheNS; 64 TagNodeListCacheNS m_tagNodeListCacheNS;
68 65
69 #if ENABLE(MICRODATA) 66 #if ENABLE(MICRODATA)
70 typedef HashMap<String, MicroDataItemList*> MicroDataItemListCache; 67 typedef HashMap<String, MicroDataItemList*> MicroDataItemListCache;
71 MicroDataItemListCache m_microDataItemListCache; 68 MicroDataItemListCache m_microDataItemListCache;
72 #endif 69 #endif
73 70
74 LabelsNodeList* m_labelsNodeListCache; 71 LabelsNodeList* m_labelsNodeListCache;
75 72
76 typedef HashMap<String, RadioNodeList*> RadioNodeListCache; 73 typedef HashMap<String, RadioNodeList*> RadioNodeListCache;
77 RadioNodeListCache m_radioNodeListCache; 74 RadioNodeListCache m_radioNodeListCache;
78 75
79 static PassOwnPtr<NodeListsNodeData> create() 76 static PassOwnPtr<NodeListsNodeData> create()
80 { 77 {
81 return adoptPtr(new NodeListsNodeData); 78 return adoptPtr(new NodeListsNodeData);
82 } 79 }
83 80
84 void invalidateCaches(); 81 void invalidateCaches();
85 void invalidateCachesForDocument();
86 void invalidateCachesThatDependOnAttributes(); 82 void invalidateCachesThatDependOnAttributes();
87 83
88 bool isEmpty() const; 84 bool isEmpty() const;
89 85
90 private: 86 private:
91 NodeListsNodeData() : m_labelsNodeListCache(0) {} 87 NodeListsNodeData() : m_labelsNodeListCache(0) {}
92 }; 88 };
93 89
94 class NodeRareData { 90 class NodeRareData {
95 WTF_MAKE_NONCOPYABLE(NodeRareData); WTF_MAKE_FAST_ALLOCATED; 91 WTF_MAKE_NONCOPYABLE(NodeRareData); WTF_MAKE_FAST_ALLOCATED;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 #endif 283 #endif
288 284
289 #if ENABLE(STYLE_SCOPED) 285 #if ENABLE(STYLE_SCOPED)
290 size_t m_numberOfScopedHTMLStyleChildren; 286 size_t m_numberOfScopedHTMLStyleChildren;
291 #endif 287 #endif
292 }; 288 };
293 289
294 } // namespace WebCore 290 } // namespace WebCore
295 291
296 #endif // NodeRareData_h 292 #endif // NodeRareData_h
OLDNEW
« no previous file with comments | « Source/WebCore/dom/Node.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698