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

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

Issue 120593002: Move traverseLiveNodeListForwardToOffset() to LiveNodeList class (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 12 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 | « no previous file | Source/core/html/CollectionType.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/LiveNodeList.h
diff --git a/Source/core/dom/LiveNodeList.h b/Source/core/dom/LiveNodeList.h
index c84c648a03ccaf5666abec6ab8598a2690e96219..aec68fc0b30260bfbd9644ea2faa5b297c1f0f7f 100644
--- a/Source/core/dom/LiveNodeList.h
+++ b/Source/core/dom/LiveNodeList.h
@@ -64,7 +64,7 @@ public:
ASSERT(m_rootType == static_cast<unsigned>(rootType));
ASSERT(m_invalidationType == static_cast<unsigned>(invalidationType));
ASSERT(m_collectionType == static_cast<unsigned>(collectionType));
- ASSERT(!m_overridesItemAfter || !isNodeList(collectionType));
+ ASSERT(!m_overridesItemAfter || !isLiveNodeListType(collectionType));
if (collectionType != ChildNodeListType)
document().registerNodeList(this);
@@ -79,7 +79,7 @@ public:
unsigned length() const;
Node* item(unsigned offset) const;
- ALWAYS_INLINE bool hasIdNameCache() const { return !isNodeList(type()); }
+ ALWAYS_INLINE bool hasIdNameCache() const { return !isLiveNodeListType(type()); }
ALWAYS_INLINE bool isRootedAtDocument() const { return m_rootType == NodeListIsRootedAtDocument || m_rootType == NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr; }
ALWAYS_INLINE NodeListInvalidationType invalidationType() const { return static_cast<NodeListInvalidationType>(m_invalidationType); }
ALWAYS_INLINE CollectionType type() const { return static_cast<CollectionType>(m_collectionType); }
@@ -129,9 +129,7 @@ protected:
private:
Node* itemBeforeOrAfterCachedItem(unsigned offset, ContainerNode* root) const;
- Node* traverseChildNodeListForwardToOffset(unsigned offset, Node* currentNode, unsigned& currentOffset) const;
Element* traverseLiveNodeListFirstElement(ContainerNode& root) const;
- Element* traverseLiveNodeListForwardToOffset(unsigned offset, Element& currentElement, unsigned& currentOffset, ContainerNode* root) const;
bool isLastItemCloserThanLastOrCachedItem(unsigned offset) const;
bool isFirstItemCloserThanCachedItem(unsigned offset) const;
Node* iterateForPreviousNode(Node* current) const;
@@ -191,6 +189,8 @@ public:
virtual Node* namedItem(const AtomicString&) const OVERRIDE FINAL;
virtual bool nodeMatches(Element*) const = 0;
+ Node* traverseForwardToOffset(unsigned offset, Node& currentNode, unsigned& currentOffset, ContainerNode* root) const;
+
private:
virtual bool isLiveNodeList() const OVERRIDE FINAL { return true; }
};
« no previous file with comments | « no previous file | Source/core/html/CollectionType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698