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

Side by Side Diff: third_party/WebKit/Source/core/html/CollectionItemsCache.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) 2012,2013 Google Inc. All rights reserved. 2 * Copyright (C) 2012,2013 Google Inc. All rights reserved.
3 * Copyright (C) 2014 Apple Inc. All rights reserved. 3 * Copyright (C) 2014 Apple Inc. 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 visitor->trace(m_cachedList); 52 visitor->trace(m_cachedList);
53 Base::trace(visitor); 53 Base::trace(visitor);
54 } 54 }
55 55
56 unsigned nodeCount(const Collection&); 56 unsigned nodeCount(const Collection&);
57 NodeType* nodeAt(const Collection&, unsigned index); 57 NodeType* nodeAt(const Collection&, unsigned index);
58 void invalidate(); 58 void invalidate();
59 59
60 private: 60 private:
61 bool m_listValid; 61 bool m_listValid;
62 WillBeHeapVector<RawPtrWillBeMember<NodeType>> m_cachedList; 62 HeapVector<Member<NodeType>> m_cachedList;
63 }; 63 };
64 64
65 template <typename Collection, typename NodeType> 65 template <typename Collection, typename NodeType>
66 CollectionItemsCache<Collection, NodeType>::CollectionItemsCache() 66 CollectionItemsCache<Collection, NodeType>::CollectionItemsCache()
67 : m_listValid(false) 67 : m_listValid(false)
68 { 68 {
69 } 69 }
70 70
71 template <typename Collection, typename NodeType> 71 template <typename Collection, typename NodeType>
72 CollectionItemsCache<Collection, NodeType>::~CollectionItemsCache() 72 CollectionItemsCache<Collection, NodeType>::~CollectionItemsCache()
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 if (m_listValid) { 107 if (m_listValid) {
108 ASSERT(this->isCachedNodeCountValid()); 108 ASSERT(this->isCachedNodeCountValid());
109 return index < this->cachedNodeCount() ? m_cachedList[index] : nullptr; 109 return index < this->cachedNodeCount() ? m_cachedList[index] : nullptr;
110 } 110 }
111 return Base::nodeAt(collection, index); 111 return Base::nodeAt(collection, index);
112 } 112 }
113 113
114 } // namespace blink 114 } // namespace blink
115 115
116 #endif // CollectionItemsCache_h 116 #endif // CollectionItemsCache_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698