Index: Source/core/dom/LiveNodeList.h |
diff --git a/Source/core/dom/LiveNodeList.h b/Source/core/dom/LiveNodeList.h |
index e7026bf381edd4d6e5496023b1c191e2b7c3b121..45b96fc52e008cc3a4039188b554f895d5ccf1bf 100644 |
--- a/Source/core/dom/LiveNodeList.h |
+++ b/Source/core/dom/LiveNodeList.h |
@@ -76,7 +76,6 @@ public: |
ContainerNode& rootNode() const; |
bool overridesItemAfter() const { return m_overridesItemAfter; } |
- Node* itemBefore(const Node* previousItem) const; |
ALWAYS_INLINE bool hasIdNameCache() const { return !isLiveNodeListType(type()); } |
ALWAYS_INLINE bool isRootedAtDocument() const { return m_rootType == NodeListIsRootedAtDocument || m_rootType == NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr; } |
@@ -100,8 +99,12 @@ protected: |
ALWAYS_INLINE NodeListRootType rootType() const { return static_cast<NodeListRootType>(m_rootType); } |
bool shouldOnlyIncludeDirectChildren() const { return m_shouldOnlyIncludeDirectChildren; } |
+ template <typename Collection> |
+ static Element* iterateForPreviousNode(const Collection&, Node* current); |
+ template <typename Collection> |
+ static Element* itemBefore(const Collection&, const Node* previousItem); |
+ |
private: |
- Node* iterateForPreviousNode(Node* current) const; |
void invalidateIdNameCacheMaps() const; |
RefPtr<ContainerNode> m_ownerNode; // Cannot be null. |
@@ -156,13 +159,14 @@ public: |
virtual void invalidateCache() const OVERRIDE FINAL; |
// Collection IndexCache API. |
+ Node* itemBefore(const Node* previousItem) const; |
Node* traverseToFirstElement(const ContainerNode& root) const; |
Node* traverseForwardToOffset(unsigned offset, Node& currentNode, unsigned& currentOffset, const ContainerNode& root) const; |
private: |
virtual bool isLiveNodeList() const OVERRIDE FINAL { return true; } |
- mutable CollectionIndexCache<LiveNodeList> m_collectionIndexCache; |
+ mutable CollectionIndexCache<LiveNodeList, Node> m_collectionIndexCache; |
}; |
} // namespace WebCore |