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

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

Issue 2397233003: Move CollectionIndexCache.h from core/html/ to core/dom/. (Closed)
Patch Set: Created 4 years, 2 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 14 matching lines...) Expand all
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 #ifndef CollectionIndexCache_h 32 #ifndef CollectionIndexCache_h
33 #define CollectionIndexCache_h 33 #define CollectionIndexCache_h
34 34
35 #include "platform/heap/Handle.h"
36
35 namespace blink { 37 namespace blink {
36 38
37 template <typename Collection, typename NodeType> 39 template <typename Collection, typename NodeType>
38 class CollectionIndexCache { 40 class CollectionIndexCache {
39 DISALLOW_NEW(); 41 DISALLOW_NEW();
40 42
41 public: 43 public:
42 CollectionIndexCache(); 44 CollectionIndexCache();
43 45
44 bool isEmpty(const Collection& collection) { 46 bool isEmpty(const Collection& collection) {
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 setCachedNodeCount(currentIndex + 1); 208 setCachedNodeCount(currentIndex + 1);
207 return nullptr; 209 return nullptr;
208 } 210 }
209 setCachedNode(currentNode, currentIndex); 211 setCachedNode(currentNode, currentIndex);
210 return currentNode; 212 return currentNode;
211 } 213 }
212 214
213 } // namespace blink 215 } // namespace blink
214 216
215 #endif // CollectionIndexCache_h 217 #endif // CollectionIndexCache_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ChildNodeList.h ('k') | third_party/WebKit/Source/core/html/CollectionIndexCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698