| 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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All r
ights reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All r
ights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 { | 54 { |
| 55 if (isLengthCacheValid()) | 55 if (isLengthCacheValid()) |
| 56 return cachedLength() == 1; | 56 return cachedLength() == 1; |
| 57 if (isItemCacheValid()) | 57 if (isItemCacheValid()) |
| 58 return cachedItem() && !cachedItemOffset() && !item(1); | 58 return cachedItem() && !cachedItemOffset() && !item(1); |
| 59 return item(0) && !item(1); | 59 return item(0) && !item(1); |
| 60 } | 60 } |
| 61 | 61 |
| 62 virtual Element* virtualItemAfter(Element*) const; | 62 virtual Element* virtualItemAfter(Element*) const; |
| 63 | 63 |
| 64 Element* traverseFirstElement(ContainerNode& root) const; | 64 Element* traverseToFirstElement(ContainerNode& root) const; |
| 65 Element* traverseForwardToOffset(unsigned offset, Element& currentElement, u
nsigned& currentOffset, ContainerNode* root) const; | 65 Element* traverseForwardToOffset(unsigned offset, Element& currentElement, u
nsigned& currentOffset, ContainerNode* root) const; |
| 66 | 66 |
| 67 protected: | 67 protected: |
| 68 HTMLCollection(Node* base, CollectionType, ItemAfterOverrideType); | 68 HTMLCollection(Node* base, CollectionType, ItemAfterOverrideType); |
| 69 | 69 |
| 70 virtual void updateNameCache() const; | 70 virtual void updateNameCache() const; |
| 71 | 71 |
| 72 typedef HashMap<StringImpl*, OwnPtr<Vector<Element*> > > NodeCacheMap; | 72 typedef HashMap<StringImpl*, OwnPtr<Vector<Element*> > > NodeCacheMap; |
| 73 Vector<Element*>* idCache(const AtomicString& name) const { return m_idCache
.get(name.impl()); } | 73 Vector<Element*>* idCache(const AtomicString& name) const { return m_idCache
.get(name.impl()); } |
| 74 Vector<Element*>* nameCache(const AtomicString& name) const { return m_nameC
ache.get(name.impl()); } | 74 Vector<Element*>* nameCache(const AtomicString& name) const { return m_nameC
ache.get(name.impl()); } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 88 | 88 |
| 89 mutable NodeCacheMap m_idCache; | 89 mutable NodeCacheMap m_idCache; |
| 90 mutable NodeCacheMap m_nameCache; | 90 mutable NodeCacheMap m_nameCache; |
| 91 | 91 |
| 92 friend class LiveNodeListBase; | 92 friend class LiveNodeListBase; |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 } // namespace | 95 } // namespace |
| 96 | 96 |
| 97 #endif | 97 #endif |
| OLD | NEW |