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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 "string created by StringImpl::empty16Bit"); | 47 "string created by StringImpl::empty16Bit"); |
48 return &emptyString; | 48 return &emptyString; |
49 } | 49 } |
50 | 50 |
51 WTF_EXPORT DEFINE_GLOBAL(AtomicString, nullAtom); | 51 WTF_EXPORT DEFINE_GLOBAL(AtomicString, nullAtom); |
52 WTF_EXPORT DEFINE_GLOBAL(AtomicString, emptyAtom); | 52 WTF_EXPORT DEFINE_GLOBAL(AtomicString, emptyAtom); |
53 WTF_EXPORT DEFINE_GLOBAL(AtomicString, starAtom); | 53 WTF_EXPORT DEFINE_GLOBAL(AtomicString, starAtom); |
54 WTF_EXPORT DEFINE_GLOBAL(AtomicString, xmlAtom); | 54 WTF_EXPORT DEFINE_GLOBAL(AtomicString, xmlAtom); |
55 WTF_EXPORT DEFINE_GLOBAL(AtomicString, xmlnsAtom); | 55 WTF_EXPORT DEFINE_GLOBAL(AtomicString, xmlnsAtom); |
56 WTF_EXPORT DEFINE_GLOBAL(AtomicString, xlinkAtom); | 56 WTF_EXPORT DEFINE_GLOBAL(AtomicString, xlinkAtom); |
| 57 WTF_EXPORT DEFINE_GLOBAL(AtomicString, httpAtom); |
| 58 WTF_EXPORT DEFINE_GLOBAL(AtomicString, httpsAtom); |
57 | 59 |
58 // This is not an AtomicString because it is unlikely to be used as an | 60 // 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 hash | 61 // event/element/attribute name, so it shouldn't pollute the AtomicString hash |
60 // table. | 62 // table. |
61 WTF_EXPORT DEFINE_GLOBAL(String, xmlnsWithColon); | 63 WTF_EXPORT DEFINE_GLOBAL(String, xmlnsWithColon); |
62 | 64 |
63 NEVER_INLINE unsigned StringImpl::hashSlowCase() const { | 65 NEVER_INLINE unsigned StringImpl::hashSlowCase() const { |
64 if (is8Bit()) | 66 if (is8Bit()) |
65 setHash(StringHasher::computeHashAndMaskTop8Bits(characters8(), m_length)); | 67 setHash(StringHasher::computeHashAndMaskTop8Bits(characters8(), m_length)); |
66 else | 68 else |
(...skipping 19 matching lines...) Expand all Loading... |
86 | 88 |
87 void StringStatics::init() { | 89 void StringStatics::init() { |
88 ASSERT(isMainThread()); | 90 ASSERT(isMainThread()); |
89 | 91 |
90 // FIXME: These should be allocated at compile time. | 92 // FIXME: These should be allocated at compile time. |
91 new (NotNull, (void*)&starAtom) AtomicString("*"); | 93 new (NotNull, (void*)&starAtom) AtomicString("*"); |
92 new (NotNull, (void*)&xmlAtom) AtomicString(addStaticASCIILiteral("xml")); | 94 new (NotNull, (void*)&xmlAtom) AtomicString(addStaticASCIILiteral("xml")); |
93 new (NotNull, (void*)&xmlnsAtom) AtomicString(addStaticASCIILiteral("xmlns")); | 95 new (NotNull, (void*)&xmlnsAtom) AtomicString(addStaticASCIILiteral("xmlns")); |
94 new (NotNull, (void*)&xlinkAtom) AtomicString(addStaticASCIILiteral("xlink")); | 96 new (NotNull, (void*)&xlinkAtom) AtomicString(addStaticASCIILiteral("xlink")); |
95 new (NotNull, (void*)&xmlnsWithColon) String("xmlns:"); | 97 new (NotNull, (void*)&xmlnsWithColon) String("xmlns:"); |
| 98 new (NotNull, (void*)&httpAtom) AtomicString(addStaticASCIILiteral("http")); |
| 99 new (NotNull, (void*)&httpsAtom) AtomicString(addStaticASCIILiteral("https")); |
96 } | 100 } |
97 | 101 |
98 } // namespace WTF | 102 } // namespace WTF |
OLD | NEW |