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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 ALWAYS_INLINE NodeListRootType rootType() const { return static_cast<NodeLis
tRootType>(m_rootType); } | 130 ALWAYS_INLINE NodeListRootType rootType() const { return static_cast<NodeLis
tRootType>(m_rootType); } |
131 | 131 |
132 bool hasNameCache() const { return m_isNameCacheValid; } | 132 bool hasNameCache() const { return m_isNameCacheValid; } |
133 void setHasNameCache() const { m_isNameCacheValid = true; } | 133 void setHasNameCache() const { m_isNameCacheValid = true; } |
134 | 134 |
135 bool shouldOnlyIncludeDirectChildren() const { return m_shouldOnlyIncludeDir
ectChildren; } | 135 bool shouldOnlyIncludeDirectChildren() const { return m_shouldOnlyIncludeDir
ectChildren; } |
136 | 136 |
137 private: | 137 private: |
138 Node* itemBeforeOrAfterCachedItem(unsigned offset, ContainerNode* root) cons
t; | 138 Node* itemBeforeOrAfterCachedItem(unsigned offset, ContainerNode* root) cons
t; |
139 Node* traverseChildNodeListForwardToOffset(unsigned offset, Node* currentNod
e, unsigned& currentOffset) const; | 139 Node* traverseChildNodeListForwardToOffset(unsigned offset, Node* currentNod
e, unsigned& currentOffset) const; |
140 Element* traverseLiveNodeListFirstElement(ContainerNode* root) const; | 140 Element* traverseLiveNodeListFirstElement(ContainerNode& root) const; |
141 Element* traverseLiveNodeListForwardToOffset(unsigned offset, Element& curre
ntElement, unsigned& currentOffset, ContainerNode* root) const; | 141 Element* traverseLiveNodeListForwardToOffset(unsigned offset, Element& curre
ntElement, unsigned& currentOffset, ContainerNode* root) const; |
142 bool isLastItemCloserThanLastOrCachedItem(unsigned offset) const; | 142 bool isLastItemCloserThanLastOrCachedItem(unsigned offset) const; |
143 bool isFirstItemCloserThanCachedItem(unsigned offset) const; | 143 bool isFirstItemCloserThanCachedItem(unsigned offset) const; |
144 Node* iterateForPreviousNode(Node* current) const; | 144 Node* iterateForPreviousNode(Node* current) const; |
145 Node* itemBefore(Node* previousItem) const; | 145 Node* itemBefore(Node* previousItem) const; |
146 | 146 |
147 RefPtr<Node> m_ownerNode; | 147 RefPtr<Node> m_ownerNode; |
148 mutable Node* m_cachedItem; | 148 mutable Node* m_cachedItem; |
149 mutable unsigned m_cachedLength; | 149 mutable unsigned m_cachedLength; |
150 mutable unsigned m_cachedItemOffset; | 150 mutable unsigned m_cachedItemOffset; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 virtual Node* namedItem(const AtomicString&) const OVERRIDE; | 196 virtual Node* namedItem(const AtomicString&) const OVERRIDE; |
197 virtual bool nodeMatches(Element*) const = 0; | 197 virtual bool nodeMatches(Element*) const = 0; |
198 | 198 |
199 private: | 199 private: |
200 virtual bool isLiveNodeList() const OVERRIDE { return true; } | 200 virtual bool isLiveNodeList() const OVERRIDE { return true; } |
201 }; | 201 }; |
202 | 202 |
203 } // namespace WebCore | 203 } // namespace WebCore |
204 | 204 |
205 #endif // LiveNodeList_h | 205 #endif // LiveNodeList_h |
OLD | NEW |