OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 30 matching lines...) Expand all Loading... |
41 NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr, | 41 NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr, |
42 }; | 42 }; |
43 | 43 |
44 class LiveNodeListBase : public NodeList { | 44 class LiveNodeListBase : public NodeList { |
45 public: | 45 public: |
46 enum ItemAfterOverrideType { | 46 enum ItemAfterOverrideType { |
47 OverridesItemAfter, | 47 OverridesItemAfter, |
48 DoesNotOverrideItemAfter, | 48 DoesNotOverrideItemAfter, |
49 }; | 49 }; |
50 | 50 |
51 LiveNodeListBase(Node* ownerNode, NodeListRootType rootType, NodeListInvalid
ationType invalidationType, | 51 LiveNodeListBase(const Handle<Node>& ownerNode, NodeListRootType rootType, N
odeListInvalidationType invalidationType, |
52 bool shouldOnlyIncludeDirectChildren, CollectionType collectionType, Ite
mAfterOverrideType itemAfterOverrideType) | 52 bool shouldOnlyIncludeDirectChildren, CollectionType collectionType, Ite
mAfterOverrideType itemAfterOverrideType) |
53 : m_ownerNode(ownerNode) | 53 : m_ownerNode(ownerNode) |
54 , m_cachedItem(0) | 54 , m_cachedItem(0) |
55 , m_isLengthCacheValid(false) | 55 , m_isLengthCacheValid(false) |
56 , m_isItemCacheValid(false) | 56 , m_isItemCacheValid(false) |
57 , m_rootType(rootType) | 57 , m_rootType(rootType) |
58 , m_invalidationType(invalidationType) | 58 , m_invalidationType(invalidationType) |
59 , m_shouldOnlyIncludeDirectChildren(shouldOnlyIncludeDirectChildren) | 59 , m_shouldOnlyIncludeDirectChildren(shouldOnlyIncludeDirectChildren) |
60 , m_isNameCacheValid(false) | 60 , m_isNameCacheValid(false) |
61 , m_collectionType(collectionType) | 61 , m_collectionType(collectionType) |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 case DoNotInvalidateOnAttributeChanges: | 183 case DoNotInvalidateOnAttributeChanges: |
184 return false; | 184 return false; |
185 case InvalidateOnAnyAttrChange: | 185 case InvalidateOnAnyAttrChange: |
186 return true; | 186 return true; |
187 } | 187 } |
188 return false; | 188 return false; |
189 } | 189 } |
190 | 190 |
191 class LiveNodeList : public LiveNodeListBase { | 191 class LiveNodeList : public LiveNodeListBase { |
192 public: | 192 public: |
193 LiveNodeList(PassRefPtr<Node> ownerNode, CollectionType collectionType, Node
ListInvalidationType invalidationType, NodeListRootType rootType = NodeListIsRoo
tedAtNode) | 193 LiveNodeList(const Handle<Node>& ownerNode, CollectionType collectionType, N
odeListInvalidationType invalidationType, NodeListRootType rootType = NodeListIs
RootedAtNode) |
194 : LiveNodeListBase(ownerNode.get(), rootType, invalidationType, collecti
onType == ChildNodeListType, | 194 : LiveNodeListBase(ownerNode, rootType, invalidationType, collectionType
== ChildNodeListType, |
195 collectionType, DoesNotOverrideItemAfter) | 195 collectionType, DoesNotOverrideItemAfter) |
196 { } | 196 { } |
197 | 197 |
198 virtual Result<Node> namedItem(const AtomicString&) const OVERRIDE; | 198 virtual Result<Node> namedItem(const AtomicString&) const OVERRIDE; |
199 virtual bool nodeMatches(const Handle<Element>&) const = 0; | 199 virtual bool nodeMatches(const Handle<Element>&) const = 0; |
200 | 200 |
201 private: | 201 private: |
202 virtual bool isLiveNodeList() const OVERRIDE { return true; } | 202 virtual bool isLiveNodeList() const OVERRIDE { return true; } |
203 }; | 203 }; |
204 | 204 |
205 } // namespace WebCore | 205 } // namespace WebCore |
206 | 206 |
207 #endif // LiveNodeList_h | 207 #endif // LiveNodeList_h |
OLD | NEW |