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

Side by Side Diff: third_party/WebKit/Source/core/html/CollectionIndexCache.h

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2013 Apple Inc. All rights reserved.
3 * Copyright (C) 2014 Samsung Electronics. All rights reserved. 3 * Copyright (C) 2014 Samsung Electronics. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 ALWAYS_INLINE void setCachedNodeCount(unsigned length) 82 ALWAYS_INLINE void setCachedNodeCount(unsigned length)
83 { 83 {
84 m_cachedNodeCount = length; 84 m_cachedNodeCount = length;
85 m_isLengthCacheValid = true; 85 m_isLengthCacheValid = true;
86 } 86 }
87 87
88 private: 88 private:
89 NodeType* nodeBeforeCachedNode(const Collection&, unsigned index); 89 NodeType* nodeBeforeCachedNode(const Collection&, unsigned index);
90 NodeType* nodeAfterCachedNode(const Collection&, unsigned index); 90 NodeType* nodeAfterCachedNode(const Collection&, unsigned index);
91 91
92 RawPtrWillBeMember<NodeType> m_currentNode; 92 Member<NodeType> m_currentNode;
93 unsigned m_cachedNodeCount; 93 unsigned m_cachedNodeCount;
94 unsigned m_cachedNodeIndex : 31; 94 unsigned m_cachedNodeIndex : 31;
95 unsigned m_isLengthCacheValid : 1; 95 unsigned m_isLengthCacheValid : 1;
96 }; 96 };
97 97
98 template <typename Collection, typename NodeType> 98 template <typename Collection, typename NodeType>
99 CollectionIndexCache<Collection, NodeType>::CollectionIndexCache() 99 CollectionIndexCache<Collection, NodeType>::CollectionIndexCache()
100 : m_currentNode(nullptr) 100 : m_currentNode(nullptr)
101 , m_cachedNodeCount(0) 101 , m_cachedNodeCount(0)
102 , m_cachedNodeIndex(0) 102 , m_cachedNodeIndex(0)
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 setCachedNodeCount(currentIndex + 1); 198 setCachedNodeCount(currentIndex + 1);
199 return nullptr; 199 return nullptr;
200 } 200 }
201 setCachedNode(currentNode, currentIndex); 201 setCachedNode(currentNode, currentIndex);
202 return currentNode; 202 return currentNode;
203 } 203 }
204 204
205 } // namespace blink 205 } // namespace blink
206 206
207 #endif // CollectionIndexCache_h 207 #endif // CollectionIndexCache_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/ClassList.h ('k') | third_party/WebKit/Source/core/html/CollectionItemsCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698