| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 namespace WebCore { | 43 namespace WebCore { |
| 44 | 44 |
| 45 class LabelsNodeList; | 45 class LabelsNodeList; |
| 46 class RadioNodeList; | 46 class RadioNodeList; |
| 47 class TreeScope; | 47 class TreeScope; |
| 48 | 48 |
| 49 struct NodeListsNodeData { | 49 struct NodeListsNodeData { |
| 50 WTF_MAKE_NONCOPYABLE(NodeListsNodeData); WTF_MAKE_FAST_ALLOCATED; | 50 WTF_MAKE_NONCOPYABLE(NodeListsNodeData); WTF_MAKE_FAST_ALLOCATED; |
| 51 public: | 51 public: |
| 52 template <typename StringType> | 52 template <typename StringType> |
| 53 struct NodeListCacheMapEntryHash : public WTF::PairHash<unsigned char, Strin
gType> { | 53 struct NodeListCacheMapEntryHash { |
| 54 static unsigned hash(const std::pair<unsigned char, StringType>& entry) | 54 static unsigned hash(const std::pair<unsigned char, StringType>& entry) |
| 55 { | 55 { |
| 56 return DefaultHash<StringType>::Hash::hash(entry.second) + entry.fir
st; | 56 return DefaultHash<StringType>::Hash::hash(entry.second) + entry.fir
st; |
| 57 } | 57 } |
| 58 static bool equal(const std::pair<unsigned char, StringType>& a, const s
td::pair<unsigned char, StringType>& b) { return a == b; } | 58 static bool equal(const std::pair<unsigned char, StringType>& a, const s
td::pair<unsigned char, StringType>& b) { return a == b; } |
| 59 static const bool safeToCompareToEmptyOrDeleted = DefaultHash<StringType
>::Hash::safeToCompareToEmptyOrDeleted; | 59 static const bool safeToCompareToEmptyOrDeleted = DefaultHash<StringType
>::Hash::safeToCompareToEmptyOrDeleted; |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 typedef HashMap<std::pair<unsigned char, AtomicString>, DynamicSubtreeNodeLi
st*, NodeListCacheMapEntryHash<AtomicString> > NodeListAtomicNameCacheMap; | 62 typedef HashMap<std::pair<unsigned char, AtomicString>, DynamicSubtreeNodeLi
st*, NodeListCacheMapEntryHash<AtomicString> > NodeListAtomicNameCacheMap; |
| 63 typedef HashMap<std::pair<unsigned char, String>, DynamicSubtreeNodeList*, N
odeListCacheMapEntryHash<String> > NodeListNameCacheMap; | 63 typedef HashMap<std::pair<unsigned char, String>, DynamicSubtreeNodeList*, N
odeListCacheMapEntryHash<String> > NodeListNameCacheMap; |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 #endif | 372 #endif |
| 373 | 373 |
| 374 #if ENABLE(STYLE_SCOPED) | 374 #if ENABLE(STYLE_SCOPED) |
| 375 size_t m_numberOfScopedHTMLStyleChildren; | 375 size_t m_numberOfScopedHTMLStyleChildren; |
| 376 #endif | 376 #endif |
| 377 }; | 377 }; |
| 378 | 378 |
| 379 } // namespace WebCore | 379 } // namespace WebCore |
| 380 | 380 |
| 381 #endif // NodeRareData_h | 381 #endif // NodeRareData_h |
| OLD | NEW |