| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 void DocumentOrderedMap::add(StringImpl* key, Element* element) | 64 void DocumentOrderedMap::add(StringImpl* key, Element* element) |
| 65 { | 65 { |
| 66 ASSERT(key); | 66 ASSERT(key); |
| 67 ASSERT(element); | 67 ASSERT(element); |
| 68 | 68 |
| 69 Map::AddResult addResult = m_map.add(key, adoptPtr(new MapEntry(element))); | 69 Map::AddResult addResult = m_map.add(key, adoptPtr(new MapEntry(element))); |
| 70 if (addResult.isNewEntry) | 70 if (addResult.isNewEntry) |
| 71 return; | 71 return; |
| 72 | 72 |
| 73 OwnPtr<MapEntry>& entry = addResult.iterator->value; | 73 OwnPtr<MapEntry>& entry = addResult.storedValue->value; |
| 74 ASSERT(entry->count); | 74 ASSERT(entry->count); |
| 75 entry->element = 0; | 75 entry->element = 0; |
| 76 entry->count++; | 76 entry->count++; |
| 77 entry->orderedList.clear(); | 77 entry->orderedList.clear(); |
| 78 } | 78 } |
| 79 | 79 |
| 80 void DocumentOrderedMap::remove(StringImpl* key, Element* element) | 80 void DocumentOrderedMap::remove(StringImpl* key, Element* element) |
| 81 { | 81 { |
| 82 ASSERT(key); | 82 ASSERT(key); |
| 83 ASSERT(element); | 83 ASSERT(element); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 { | 168 { |
| 169 return get<keyMatchesLowercasedMapName>(key, scope); | 169 return get<keyMatchesLowercasedMapName>(key, scope); |
| 170 } | 170 } |
| 171 | 171 |
| 172 Element* DocumentOrderedMap::getElementByLabelForAttribute(StringImpl* key, cons
t TreeScope* scope) const | 172 Element* DocumentOrderedMap::getElementByLabelForAttribute(StringImpl* key, cons
t TreeScope* scope) const |
| 173 { | 173 { |
| 174 return get<keyMatchesLabelForAttribute>(key, scope); | 174 return get<keyMatchesLabelForAttribute>(key, scope); |
| 175 } | 175 } |
| 176 | 176 |
| 177 } // namespace WebCore | 177 } // namespace WebCore |
| OLD | NEW |