OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com> | 3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 void removeEmptyChildNodeList(EmptyNodeList* list) | 73 void removeEmptyChildNodeList(EmptyNodeList* list) |
74 { | 74 { |
75 ASSERT(m_childNodeList == list); | 75 ASSERT(m_childNodeList == list); |
76 if (deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList(list->ownerNo
de())) | 76 if (deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList(list->ownerNo
de())) |
77 return; | 77 return; |
78 m_childNodeList = nullptr; | 78 m_childNodeList = nullptr; |
79 } | 79 } |
80 #endif | 80 #endif |
81 | 81 |
82 struct NodeListAtomicCacheMapEntryHash { | 82 struct NodeListAtomicCacheMapEntryHash { |
| 83 STATIC_ONLY(NodeListAtomicCacheMapEntryHash); |
83 static unsigned hash(const std::pair<unsigned char, StringImpl*>& entry) | 84 static unsigned hash(const std::pair<unsigned char, StringImpl*>& entry) |
84 { | 85 { |
85 return DefaultHash<StringImpl*>::Hash::hash(entry.second) + entry.fi
rst; | 86 return DefaultHash<StringImpl*>::Hash::hash(entry.second) + entry.fi
rst; |
86 } | 87 } |
87 static bool equal(const std::pair<unsigned char, StringImpl*>& a, const
std::pair<unsigned char, StringImpl*>& b) { return a == b; } | 88 static bool equal(const std::pair<unsigned char, StringImpl*>& a, const
std::pair<unsigned char, StringImpl*>& b) { return a == b; } |
88 static const bool safeToCompareToEmptyOrDeleted = DefaultHash<StringImpl
*>::Hash::safeToCompareToEmptyOrDeleted; | 89 static const bool safeToCompareToEmptyOrDeleted = DefaultHash<StringImpl
*>::Hash::safeToCompareToEmptyOrDeleted; |
89 }; | 90 }; |
90 | 91 |
91 // Oilpan: keep a weak reference to the collection objects. | 92 // Oilpan: keep a weak reference to the collection objects. |
92 // Explicit object unregistration in a non-Oilpan setting | 93 // Explicit object unregistration in a non-Oilpan setting |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 template <typename Collection> | 259 template <typename Collection> |
259 inline Collection* ContainerNode::cachedCollection(CollectionType type) | 260 inline Collection* ContainerNode::cachedCollection(CollectionType type) |
260 { | 261 { |
261 NodeListsNodeData* nodeLists = this->nodeLists(); | 262 NodeListsNodeData* nodeLists = this->nodeLists(); |
262 return nodeLists ? nodeLists->cached<Collection>(type) : 0; | 263 return nodeLists ? nodeLists->cached<Collection>(type) : 0; |
263 } | 264 } |
264 | 265 |
265 } // namespace blink | 266 } // namespace blink |
266 | 267 |
267 #endif // NodeListsNodeData_h | 268 #endif // NodeListsNodeData_h |
OLD | NEW |