Index: Source/core/html/HTMLCollection.cpp |
diff --git a/Source/core/html/HTMLCollection.cpp b/Source/core/html/HTMLCollection.cpp |
index 85be33adee94189b9952e65dfb4460c1a65eada2..6402d501849435ac64123ad87c3b3f89c9e09bd0 100644 |
--- a/Source/core/html/HTMLCollection.cpp |
+++ b/Source/core/html/HTMLCollection.cpp |
@@ -191,6 +191,16 @@ void HTMLCollection::invalidateCache(Document* oldDocument) const |
invalidateIdNameCacheMaps(oldDocument); |
} |
+unsigned HTMLCollection::length() const |
+{ |
+ return m_collectionIndexCache.nodeCount(*this); |
+} |
+ |
+Element* HTMLCollection::item(unsigned offset) const |
+{ |
+ return m_collectionIndexCache.nodeAt(*this, offset); |
+} |
+ |
static inline bool isMatchingHTMLElement(const HTMLCollection& htmlCollection, const HTMLElement& element) |
{ |
switch (htmlCollection.type()) { |