OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Apple Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 } | 49 } |
50 | 50 |
51 WTF_EXPORT DEFINE_GLOBAL(AtomicString, nullAtom) WTF_EXPORT | 51 WTF_EXPORT DEFINE_GLOBAL(AtomicString, nullAtom) WTF_EXPORT |
52 DEFINE_GLOBAL(AtomicString, emptyAtom) WTF_EXPORT | 52 DEFINE_GLOBAL(AtomicString, emptyAtom) WTF_EXPORT |
53 DEFINE_GLOBAL(AtomicString, starAtom) WTF_EXPORT | 53 DEFINE_GLOBAL(AtomicString, starAtom) WTF_EXPORT |
54 DEFINE_GLOBAL(AtomicString, xmlAtom) WTF_EXPORT | 54 DEFINE_GLOBAL(AtomicString, xmlAtom) WTF_EXPORT |
55 DEFINE_GLOBAL(AtomicString, xmlnsAtom) WTF_EXPORT | 55 DEFINE_GLOBAL(AtomicString, xmlnsAtom) WTF_EXPORT |
56 DEFINE_GLOBAL(AtomicString, xlinkAtom) | 56 DEFINE_GLOBAL(AtomicString, xlinkAtom) |
57 | 57 |
58 // This is not an AtomicString because it is unlikely to be used as an | 58 // This is not an AtomicString because it is unlikely to be used as an |
59 // event/element/attribute name, so it shouldn't pollute the AtomicString ha
sh | 59 // event/element/attribute name, so it shouldn't pollute the AtomicString |
60 // table. | 60 // hash table. |
61 WTF_EXPORT DEFINE_GLOBAL(String, xmlnsWithColon) | 61 WTF_EXPORT DEFINE_GLOBAL(String, xmlnsWithColon) |
62 | 62 |
63 NEVER_INLINE unsigned StringImpl::hashSlowCase() const { | 63 NEVER_INLINE unsigned StringImpl::hashSlowCase() const { |
64 if (is8Bit()) | 64 if (is8Bit()) |
65 setHash(StringHasher::computeHashAndMaskTop8Bits(characters8(), m_length)); | 65 setHash(StringHasher::computeHashAndMaskTop8Bits(characters8(), m_length)); |
66 else | 66 else |
67 setHash(StringHasher::computeHashAndMaskTop8Bits(characters16(), m_length)); | 67 setHash(StringHasher::computeHashAndMaskTop8Bits(characters16(), m_length)); |
68 return existingHash(); | 68 return existingHash(); |
69 } | 69 } |
70 | 70 |
(...skipping 18 matching lines...) Expand all Loading... |
89 | 89 |
90 // FIXME: These should be allocated at compile time. | 90 // FIXME: These should be allocated at compile time. |
91 new (NotNull, (void*)&starAtom) AtomicString("*"); | 91 new (NotNull, (void*)&starAtom) AtomicString("*"); |
92 new (NotNull, (void*)&xmlAtom) AtomicString(addStaticASCIILiteral("xml")); | 92 new (NotNull, (void*)&xmlAtom) AtomicString(addStaticASCIILiteral("xml")); |
93 new (NotNull, (void*)&xmlnsAtom) AtomicString(addStaticASCIILiteral("xmlns")); | 93 new (NotNull, (void*)&xmlnsAtom) AtomicString(addStaticASCIILiteral("xmlns")); |
94 new (NotNull, (void*)&xlinkAtom) AtomicString(addStaticASCIILiteral("xlink")); | 94 new (NotNull, (void*)&xlinkAtom) AtomicString(addStaticASCIILiteral("xlink")); |
95 new (NotNull, (void*)&xmlnsWithColon) String("xmlns:"); | 95 new (NotNull, (void*)&xmlnsWithColon) String("xmlns:"); |
96 } | 96 } |
97 | 97 |
98 } // namespace WTF | 98 } // namespace WTF |
OLD | NEW |