| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights |
| 3 * reserved. | 3 * 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 entry->orderedList.clear(); | 114 entry->orderedList.clear(); |
| 115 } | 115 } |
| 116 } | 116 } |
| 117 | 117 |
| 118 template <bool keyMatches(const AtomicString&, const Element&)> | 118 template <bool keyMatches(const AtomicString&, const Element&)> |
| 119 inline Element* DocumentOrderedMap::get(const AtomicString& key, | 119 inline Element* DocumentOrderedMap::get(const AtomicString& key, |
| 120 const TreeScope* scope) const { | 120 const TreeScope* scope) const { |
| 121 DCHECK(key); | 121 DCHECK(key); |
| 122 DCHECK(scope); | 122 DCHECK(scope); |
| 123 | 123 |
| 124 MapEntry* entry = m_map.get(key); | 124 MapEntry* entry = m_map.at(key); |
| 125 if (!entry) | 125 if (!entry) |
| 126 return 0; | 126 return 0; |
| 127 | 127 |
| 128 DCHECK(entry->count); | 128 DCHECK(entry->count); |
| 129 if (entry->element) | 129 if (entry->element) |
| 130 return entry->element; | 130 return entry->element; |
| 131 | 131 |
| 132 // Iterate to find the node that matches. Nothing will match iff an element | 132 // Iterate to find the node that matches. Nothing will match iff an element |
| 133 // with children having duplicate IDs is being removed -- the tree traversal | 133 // with children having duplicate IDs is being removed -- the tree traversal |
| 134 // will be over an updated tree not having that subtree. In all other cases, | 134 // will be over an updated tree not having that subtree. In all other cases, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 DEFINE_TRACE(DocumentOrderedMap) { | 205 DEFINE_TRACE(DocumentOrderedMap) { |
| 206 visitor->trace(m_map); | 206 visitor->trace(m_map); |
| 207 } | 207 } |
| 208 | 208 |
| 209 DEFINE_TRACE(DocumentOrderedMap::MapEntry) { | 209 DEFINE_TRACE(DocumentOrderedMap::MapEntry) { |
| 210 visitor->trace(element); | 210 visitor->trace(element); |
| 211 visitor->trace(orderedList); | 211 visitor->trace(orderedList); |
| 212 } | 212 } |
| 213 | 213 |
| 214 } // namespace blink | 214 } // namespace blink |
| OLD | NEW |