| 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 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 #include "core/HTMLNames.h" | 24 #include "core/HTMLNames.h" |
| 25 #include "core/MathMLNames.h" | 25 #include "core/MathMLNames.h" |
| 26 #include "core/SVGNames.h" | 26 #include "core/SVGNames.h" |
| 27 #include "core/XLinkNames.h" | 27 #include "core/XLinkNames.h" |
| 28 #include "core/XMLNSNames.h" | 28 #include "core/XMLNSNames.h" |
| 29 #include "core/XMLNames.h" | 29 #include "core/XMLNames.h" |
| 30 #include "wtf/Assertions.h" | 30 #include "wtf/Assertions.h" |
| 31 #include "wtf/HashSet.h" | 31 #include "wtf/HashSet.h" |
| 32 #include "wtf/MainThread.h" | 32 #include "wtf/MainThread.h" |
| 33 #include "wtf/SizeAssertions.h" |
| 33 #include "wtf/StaticConstructors.h" | 34 #include "wtf/StaticConstructors.h" |
| 34 | 35 |
| 35 namespace blink { | 36 namespace blink { |
| 36 | 37 |
| 37 struct SameSizeAsQualifiedNameImpl : public RefCounted<SameSizeAsQualifiedNameIm
pl> { | 38 ASSERT_SIZE(QualifiedName::QualifiedNameImpl, 24, 40); |
| 38 unsigned bitfield; | |
| 39 void* pointers[4]; | |
| 40 }; | |
| 41 | |
| 42 static_assert(sizeof(QualifiedName::QualifiedNameImpl) == sizeof(SameSizeAsQuali
fiedNameImpl), "QualifiedNameImpl should stay small"); | |
| 43 | 39 |
| 44 static const int staticQualifiedNamesCount = HTMLNames::HTMLTagsCount + HTMLName
s::HTMLAttrsCount | 40 static const int staticQualifiedNamesCount = HTMLNames::HTMLTagsCount + HTMLName
s::HTMLAttrsCount |
| 45 + MathMLNames::MathMLTagsCount + MathMLNames::MathMLAttrsCount | 41 + MathMLNames::MathMLTagsCount + MathMLNames::MathMLAttrsCount |
| 46 + SVGNames::SVGTagsCount + SVGNames::SVGAttrsCount | 42 + SVGNames::SVGTagsCount + SVGNames::SVGAttrsCount |
| 47 + XLinkNames::XLinkAttrsCount | 43 + XLinkNames::XLinkAttrsCount |
| 48 + XMLNSNames::XMLNSAttrsCount | 44 + XMLNSNames::XMLNSAttrsCount |
| 49 + XMLNames::XMLAttrsCount; | 45 + XMLNames::XMLAttrsCount; |
| 50 | 46 |
| 51 struct QualifiedNameHashTraits : public HashTraits<QualifiedName::QualifiedNameI
mpl*> { | 47 struct QualifiedNameHashTraits : public HashTraits<QualifiedName::QualifiedNameI
mpl*> { |
| 52 static const unsigned minimumTableSize = WTF::HashTableCapacityForSize<stati
cQualifiedNamesCount>::value; | 48 static const unsigned minimumTableSize = WTF::HashTableCapacityForSize<stati
cQualifiedNamesCount>::value; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 { | 140 { |
| 145 new (targetAddress) QualifiedName(nullAtom, AtomicString(name), nameNamespac
e, true); | 141 new (targetAddress) QualifiedName(nullAtom, AtomicString(name), nameNamespac
e, true); |
| 146 } | 142 } |
| 147 | 143 |
| 148 void QualifiedName::createStatic(void* targetAddress, StringImpl* name) | 144 void QualifiedName::createStatic(void* targetAddress, StringImpl* name) |
| 149 { | 145 { |
| 150 new (targetAddress) QualifiedName(nullAtom, AtomicString(name), nullAtom, tr
ue); | 146 new (targetAddress) QualifiedName(nullAtom, AtomicString(name), nullAtom, tr
ue); |
| 151 } | 147 } |
| 152 | 148 |
| 153 } | 149 } |
| OLD | NEW |