| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 namespace WebCore { | 39 namespace WebCore { |
| 40 | 40 |
| 41 static const int staticQualifiedNamesCount = HTMLNames::HTMLTagsCount + HTMLName
s::HTMLAttrsCount | 41 static const int staticQualifiedNamesCount = HTMLNames::HTMLTagsCount + HTMLName
s::HTMLAttrsCount |
| 42 + SVGNames::SVGTagsCount + SVGNames::SVGAttrsCount | 42 + SVGNames::SVGTagsCount + SVGNames::SVGAttrsCount |
| 43 + XLinkNames::XLinkAttrsCount | 43 + XLinkNames::XLinkAttrsCount |
| 44 + XMLNSNames::XMLNSAttrsCount | 44 + XMLNSNames::XMLNSAttrsCount |
| 45 + XMLNames::XMLAttrsCount; | 45 + XMLNames::XMLAttrsCount; |
| 46 | 46 |
| 47 struct QualifiedNameHashTraits : public HashTraits<QualifiedName::QualifiedNameI
mpl*> { | 47 struct QualifiedNameHashTraits : public HashTraits<QualifiedName::QualifiedNameI
mpl*> { |
| 48 static const int minimumTableSize = WTF::HashTableCapacityForSize<staticQual
ifiedNamesCount>::value; | 48 static const unsigned minimumTableSize = WTF::HashTableCapacityForSize<stati
cQualifiedNamesCount>::value; |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 typedef HashSet<QualifiedName::QualifiedNameImpl*, QualifiedNameHash, QualifiedN
ameHashTraits> QualifiedNameCache; | 51 typedef HashSet<QualifiedName::QualifiedNameImpl*, QualifiedNameHash, QualifiedN
ameHashTraits> QualifiedNameCache; |
| 52 | 52 |
| 53 static QualifiedNameCache& qualifiedNameCache() | 53 static QualifiedNameCache& qualifiedNameCache() |
| 54 { | 54 { |
| 55 // This code is lockless and thus assumes it all runs on one thread! | 55 // This code is lockless and thus assumes it all runs on one thread! |
| 56 ASSERT(isMainThread()); | 56 ASSERT(isMainThread()); |
| 57 static QualifiedNameCache* gNameCache = new QualifiedNameCache; | 57 static QualifiedNameCache* gNameCache = new QualifiedNameCache; |
| 58 return *gNameCache; | 58 return *gNameCache; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 { | 142 { |
| 143 new (targetAddress) QualifiedName(nullAtom, AtomicString(name), nameNamespac
e); | 143 new (targetAddress) QualifiedName(nullAtom, AtomicString(name), nameNamespac
e); |
| 144 } | 144 } |
| 145 | 145 |
| 146 void createQualifiedName(void* targetAddress, StringImpl* name) | 146 void createQualifiedName(void* targetAddress, StringImpl* name) |
| 147 { | 147 { |
| 148 new (targetAddress) QualifiedName(nullAtom, AtomicString(name), nullAtom); | 148 new (targetAddress) QualifiedName(nullAtom, AtomicString(name), nullAtom); |
| 149 } | 149 } |
| 150 | 150 |
| 151 } | 151 } |
| OLD | NEW |