| OLD | NEW |
| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 135 { | 135 { |
| 136 return get<keyMatchesId>(key, scope); | 136 return get<keyMatchesId>(key, scope); |
| 137 } | 137 } |
| 138 | 138 |
| 139 const WillBeHeapVector<RawPtrWillBeMember<Element> >& DocumentOrderedMap::getAll
ElementsById(const AtomicString& key, const TreeScope* scope) const | 139 const WillBeHeapVector<RawPtrWillBeMember<Element>>& DocumentOrderedMap::getAllE
lementsById(const AtomicString& key, const TreeScope* scope) const |
| 140 { | 140 { |
| 141 ASSERT(key); | 141 ASSERT(key); |
| 142 ASSERT(scope); | 142 ASSERT(scope); |
| 143 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<WillBeHeapVector<RawPtrWillBeMemb
er<Element> > >, emptyVector, (adoptPtrWillBeNoop(new WillBeHeapVector<RawPtrWil
lBeMember<Element> >()))); | 143 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<WillBeHeapVector<RawPtrWillBeMemb
er<Element>>>, emptyVector, (adoptPtrWillBeNoop(new WillBeHeapVector<RawPtrWillB
eMember<Element>>()))); |
| 144 | 144 |
| 145 Map::iterator it = m_map.find(key); | 145 Map::iterator it = m_map.find(key); |
| 146 if (it == m_map.end()) | 146 if (it == m_map.end()) |
| 147 return *emptyVector; | 147 return *emptyVector; |
| 148 | 148 |
| 149 OwnPtrWillBeMember<MapEntry>& entry = it->value; | 149 OwnPtrWillBeMember<MapEntry>& entry = it->value; |
| 150 ASSERT(entry->count); | 150 ASSERT(entry->count); |
| 151 | 151 |
| 152 if (entry->orderedList.isEmpty()) { | 152 if (entry->orderedList.isEmpty()) { |
| 153 entry->orderedList.reserveCapacity(entry->count); | 153 entry->orderedList.reserveCapacity(entry->count); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 | 188 |
| 189 DEFINE_TRACE(DocumentOrderedMap::MapEntry) | 189 DEFINE_TRACE(DocumentOrderedMap::MapEntry) |
| 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 |
| OLD | NEW |