| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 inline bool keyMatchesSlotName(const AtomicString& key, | 73 inline bool keyMatchesSlotName(const AtomicString& key, |
| 74 const Element& element) { | 74 const Element& element) { |
| 75 return isHTMLSlotElement(element) && toHTMLSlotElement(element).name() == key; | 75 return isHTMLSlotElement(element) && toHTMLSlotElement(element).name() == key; |
| 76 } | 76 } |
| 77 | 77 |
| 78 void DocumentOrderedMap::add(const AtomicString& key, Element* element) { | 78 void DocumentOrderedMap::add(const AtomicString& key, Element* element) { |
| 79 DCHECK(key); | 79 DCHECK(key); |
| 80 DCHECK(element); | 80 DCHECK(element); |
| 81 | 81 |
| 82 Map::AddResult addResult = m_map.add(key, new MapEntry(element)); | 82 Map::AddResult addResult = m_map.insert(key, new MapEntry(element)); |
| 83 if (addResult.isNewEntry) | 83 if (addResult.isNewEntry) |
| 84 return; | 84 return; |
| 85 | 85 |
| 86 Member<MapEntry>& entry = addResult.storedValue->value; | 86 Member<MapEntry>& entry = addResult.storedValue->value; |
| 87 DCHECK(entry->count); | 87 DCHECK(entry->count); |
| 88 entry->element = nullptr; | 88 entry->element = nullptr; |
| 89 entry->count++; | 89 entry->count++; |
| 90 entry->orderedList.clear(); | 90 entry->orderedList.clear(); |
| 91 } | 91 } |
| 92 | 92 |
| (...skipping 112 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 |