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

Side by Side Diff: Source/core/dom/NthIndexCache.h

Issue 1092343005: Removing unused function in NthIndexCache (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NthIndexCache_h 5 #ifndef NthIndexCache_h
6 #define NthIndexCache_h 6 #define NthIndexCache_h
7 7
8 #include "core/dom/Element.h" 8 #include "core/dom/Element.h"
9 #include "core/dom/ElementTraversal.h" 9 #include "core/dom/ElementTraversal.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
(...skipping 27 matching lines...) Expand all
38 38
39 unsigned cacheNthIndices(Element&); 39 unsigned cacheNthIndices(Element&);
40 40
41 WillBeHeapHashMap<RawPtrWillBeMember<Element>, unsigned> m_elementIndexM ap; 41 WillBeHeapHashMap<RawPtrWillBeMember<Element>, unsigned> m_elementIndexM ap;
42 unsigned m_count = 0; 42 unsigned m_count = 0;
43 43
44 DECLARE_TRACE(); 44 DECLARE_TRACE();
45 }; 45 };
46 46
47 NthIndexData& ensureNthIndexDataFor(Node&); 47 NthIndexData& ensureNthIndexDataFor(Node&);
48 inline unsigned nthIndex(Element&);
49 48
50 using ParentMap = WillBeHeapHashMap<RefPtrWillBeMember<Node>, OwnPtrWillBeMe mber<NthIndexData>>; 49 using ParentMap = WillBeHeapHashMap<RefPtrWillBeMember<Node>, OwnPtrWillBeMe mber<NthIndexData>>;
51 50
52 OwnPtrWillBeMember<ParentMap> m_parentMap; 51 OwnPtrWillBeMember<ParentMap> m_parentMap;
53 RawPtrWillBeMember<Document> m_document; 52 RawPtrWillBeMember<Document> m_document;
54 uint64_t m_domTreeVersion; 53 uint64_t m_domTreeVersion;
55 }; 54 };
56 55
57 inline unsigned NthIndexCache::NthIndexData::nthIndex(Element& element) 56 inline unsigned NthIndexCache::NthIndexData::nthIndex(Element& element)
58 { 57 {
(...skipping 23 matching lines...) Expand all
82 81
83 inline unsigned NthIndexCache::nthLastChildIndex(Element& element) 82 inline unsigned NthIndexCache::nthLastChildIndex(Element& element)
84 { 83 {
85 ASSERT(element.parentNode()); 84 ASSERT(element.parentNode());
86 return ensureNthIndexDataFor(*element.parentNode()).nthLastIndex(element); 85 return ensureNthIndexDataFor(*element.parentNode()).nthLastIndex(element);
87 } 86 }
88 87
89 } // namespace blink 88 } // namespace blink
90 89
91 #endif // NthIndexCache_h 90 #endif // NthIndexCache_h
OLDNEW
« 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