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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 } | 194 } |
195 | 195 |
196 TagCollectionCacheNS::const_iterator tagEnd = m_tagCollectionCacheNS.end
(); | 196 TagCollectionCacheNS::const_iterator tagEnd = m_tagCollectionCacheNS.end
(); |
197 for (TagCollectionCacheNS::const_iterator it = m_tagCollectionCacheNS.be
gin(); it != tagEnd; ++it) { | 197 for (TagCollectionCacheNS::const_iterator it = m_tagCollectionCacheNS.be
gin(); it != tagEnd; ++it) { |
198 LiveNodeListBase* list = it->value; | 198 LiveNodeListBase* list = it->value; |
199 ASSERT(!list->isRootedAtDocument()); | 199 ASSERT(!list->isRootedAtDocument()); |
200 list->didMoveToDocument(oldDocument, newDocument); | 200 list->didMoveToDocument(oldDocument, newDocument); |
201 } | 201 } |
202 } | 202 } |
203 | 203 |
204 void trace(Visitor*); | 204 DECLARE_TRACE(); |
205 | 205 |
206 private: | 206 private: |
207 NodeListsNodeData() | 207 NodeListsNodeData() |
208 : m_childNodeList(nullptr) | 208 : m_childNodeList(nullptr) |
209 { } | 209 { } |
210 | 210 |
211 std::pair<unsigned char, StringImpl*> namedNodeListKey(CollectionType type,
const AtomicString& name) | 211 std::pair<unsigned char, StringImpl*> namedNodeListKey(CollectionType type,
const AtomicString& name) |
212 { | 212 { |
213 // Holding the raw StringImpl is safe because |name| is retained by the
NodeList and the NodeList | 213 // Holding the raw StringImpl is safe because |name| is retained by the
NodeList and the NodeList |
214 // is reponsible for removing itself from the cache on deletion. | 214 // is reponsible for removing itself from the cache on deletion. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 template <typename Collection> | 258 template <typename Collection> |
259 inline Collection* ContainerNode::cachedCollection(CollectionType type) | 259 inline Collection* ContainerNode::cachedCollection(CollectionType type) |
260 { | 260 { |
261 NodeListsNodeData* nodeLists = this->nodeLists(); | 261 NodeListsNodeData* nodeLists = this->nodeLists(); |
262 return nodeLists ? nodeLists->cached<Collection>(type) : 0; | 262 return nodeLists ? nodeLists->cached<Collection>(type) : 0; |
263 } | 263 } |
264 | 264 |
265 } // namespace blink | 265 } // namespace blink |
266 | 266 |
267 #endif // NodeListsNodeData_h | 267 #endif // NodeListsNodeData_h |
OLD | NEW |