Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(721)

Unified Diff: Source/core/dom/LiveNodeList.cpp

Issue 450273003: Uninline HTMLCollection / LiveNodeList's item() and length() member functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/LiveNodeList.h ('k') | Source/core/html/HTMLCollection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/LiveNodeList.cpp
diff --git a/Source/core/dom/LiveNodeList.cpp b/Source/core/dom/LiveNodeList.cpp
index dba44d312b404495cf22ac5c65049d974be9135e..b437e68908ef5f953b87c4a67035faba2adf0f00 100644
--- a/Source/core/dom/LiveNodeList.cpp
+++ b/Source/core/dom/LiveNodeList.cpp
@@ -40,6 +40,16 @@ void LiveNodeList::invalidateCache(Document*) const
m_collectionIndexCache.invalidate();
}
+unsigned LiveNodeList::length() const
+{
+ return m_collectionIndexCache.nodeCount(*this);
+}
+
+Element* LiveNodeList::item(unsigned offset) const
+{
+ return m_collectionIndexCache.nodeAt(*this, offset);
+}
+
Element* LiveNodeList::traverseToFirstElement() const
{
return firstMatchingElement(*this);
« no previous file with comments | « Source/core/dom/LiveNodeList.h ('k') | Source/core/html/HTMLCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698