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

Unified Diff: Source/core/html/CollectionIndexCache.h

Issue 167333003: Make CollectionIndexCache::setCachedNode() private (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/CollectionIndexCache.h
diff --git a/Source/core/html/CollectionIndexCache.h b/Source/core/html/CollectionIndexCache.h
index b2aa72bb5fbdae2483fe4cbf27910b6a0fdd88b0..39b60017c195f03f430a2b9eccefcb8087636f4a 100644
--- a/Source/core/html/CollectionIndexCache.h
+++ b/Source/core/html/CollectionIndexCache.h
@@ -63,13 +63,6 @@ public:
void invalidate();
- ALWAYS_INLINE void setCachedNode(NodeType* node, unsigned index)
- {
- ASSERT(node);
- m_currentNode = node;
- m_cachedNodeIndex = index;
- }
-
private:
NodeType* nodeBeforeOrAfterCachedNode(const Collection&, unsigned index, const ContainerNode& root);
bool isLastNodeCloserThanLastOrCachedNode(unsigned index) const;
@@ -77,6 +70,12 @@ private:
ALWAYS_INLINE NodeType* cachedNode() const { return m_currentNode; }
ALWAYS_INLINE unsigned cachedNodeIndex() const { ASSERT(cachedNode()); return m_cachedNodeIndex; }
+ ALWAYS_INLINE void setCachedNode(NodeType* node, unsigned index)
+ {
+ ASSERT(node);
+ m_currentNode = node;
+ m_cachedNodeIndex = index;
+ }
ALWAYS_INLINE bool isCachedNodeCountValid() const { return m_isLengthCacheValid; }
ALWAYS_INLINE unsigned cachedNodeCount() const { return m_cachedNodeCount; }
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698