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

Side by Side Diff: Source/core/dom/DocumentOrderedMap.cpp

Issue 667403002: Rename nodes/elements traversal function names. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename to startsAt (and startsAfter) Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/ElementTraversal.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 MapEntry* entry = m_map.get(key); 115 MapEntry* entry = m_map.get(key);
116 if (!entry) 116 if (!entry)
117 return 0; 117 return 0;
118 118
119 ASSERT(entry->count); 119 ASSERT(entry->count);
120 if (entry->element) 120 if (entry->element)
121 return entry->element; 121 return entry->element;
122 122
123 // We know there's at least one node that matches; iterate to find the first one. 123 // We know there's at least one node that matches; iterate to find the first one.
124 for (Element& element : ElementTraversal::fromNext(scope->rootNode())) { 124 for (Element& element : ElementTraversal::startsAfter(scope->rootNode())) {
125 if (!keyMatches(key, element)) 125 if (!keyMatches(key, element))
126 continue; 126 continue;
127 entry->element = &element; 127 entry->element = &element;
128 return &element; 128 return &element;
129 } 129 }
130 ASSERT_NOT_REACHED(); 130 ASSERT_NOT_REACHED();
131 return 0; 131 return 0;
132 } 132 }
133 133
134 Element* DocumentOrderedMap::getElementById(const AtomicString& key, const TreeS cope* scope) const 134 Element* DocumentOrderedMap::getElementById(const AtomicString& key, const TreeS cope* scope) const
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 188
189 void DocumentOrderedMap::MapEntry::trace(Visitor* visitor) 189 void DocumentOrderedMap::MapEntry::trace(Visitor* visitor)
190 { 190 {
191 visitor->trace(element); 191 visitor->trace(element);
192 #if ENABLE(OILPAN) 192 #if ENABLE(OILPAN)
193 visitor->trace(orderedList); 193 visitor->trace(orderedList);
194 #endif 194 #endif
195 } 195 }
196 196
197 } // namespace blink 197 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/ElementTraversal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698