Index: Source/core/html/HTMLCollection.h |
diff --git a/Source/core/html/HTMLCollection.h b/Source/core/html/HTMLCollection.h |
index 26aff438926a2c8925f931130e8822e4ed6ec42a..801094698840bbef37966cc521fc0439330700aa 100644 |
--- a/Source/core/html/HTMLCollection.h |
+++ b/Source/core/html/HTMLCollection.h |
@@ -39,7 +39,7 @@ public: |
// DOM API |
unsigned length() const { return m_collectionIndexCache.nodeCount(*this); } |
- Node* item(unsigned offset) const { return m_collectionIndexCache.nodeAt(*this, offset); } |
+ Element* item(unsigned offset) const { return m_collectionIndexCache.nodeAt(*this, offset); } |
virtual Element* namedItem(const AtomicString& name) const; |
// Non-DOM API |
@@ -50,8 +50,9 @@ public: |
virtual Element* virtualItemAfter(Element*) const; |
// CollectionIndexCache API. |
+ Element* itemBefore(const Node* previousItem) const; |
Element* traverseToFirstElement(const ContainerNode& root) const; |
- Element* traverseForwardToOffset(unsigned offset, Node& currentElement, unsigned& currentOffset, const ContainerNode& root) const; |
+ Element* traverseForwardToOffset(unsigned offset, Element& currentElement, unsigned& currentOffset, const ContainerNode& root) const; |
protected: |
HTMLCollection(ContainerNode* base, CollectionType, ItemAfterOverrideType); |
@@ -81,7 +82,7 @@ private: |
mutable unsigned m_isNameCacheValid : 1; |
mutable NodeCacheMap m_idCache; |
mutable NodeCacheMap m_nameCache; |
- mutable CollectionIndexCache<HTMLCollection> m_collectionIndexCache; |
+ mutable CollectionIndexCache<HTMLCollection, Element> m_collectionIndexCache; |
friend class LiveNodeListBase; |
}; |