| /* |
| * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT. |
| * |
| * This file was generated by the dom/make_names.pl script. |
| * |
| * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights reserved. |
| * |
| * Redistribution and use in source and binary forms, with or without |
| * modification, are permitted provided that the following conditions |
| * are met: |
| * 1. Redistributions of source code must retain the above copyright |
| * notice, this list of conditions and the following disclaimer. |
| * 2. Redistributions in binary form must reproduce the above copyright |
| * notice, this list of conditions and the following disclaimer in the |
| * documentation and/or other materials provided with the distribution. |
| * |
| * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY |
| * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR |
| * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| |
| #include "config.h" |
| |
| #ifdef SKIP_STATIC_CONSTRUCTORS_ON_GCC |
| #define CSS_WebKitFontFamily_NAMES_HIDE_GLOBALS 1 |
| #else |
| #define QNAME_DEFAULT_CONSTRUCTOR 1 |
| #endif |
| |
| #include "WebKitFontFamilyNames.h" |
| |
| #include <wtf/StaticConstructors.h> |
| namespace WebCore { |
| |
| namespace WebKitFontFamilyNames { |
| |
| using namespace WTF; |
| |
| static const LChar cursiveFamilyString8[] = "-webkit-cursive"; |
| static const LChar fantasyFamilyString8[] = "-webkit-fantasy"; |
| static const LChar monospaceFamilyString8[] = "-webkit-monospace"; |
| static const LChar pictographFamilyString8[] = "-webkit-pictograph"; |
| static const LChar sansSerifFamilyString8[] = "-webkit-sans-serif"; |
| static const LChar serifFamilyString8[] = "-webkit-serif"; |
| static const LChar standardFamilyString8[] = "-webkit-standard"; |
| |
| static StringImpl::StaticASCIILiteral cursiveFamilyData = { |
| StringImpl::StaticASCIILiteral::s_initialRefCount, |
| 15, |
| cursiveFamilyString8, |
| StringImpl::StaticASCIILiteral::s_initialFlags | (7063387 << StringImpl::StaticASCIILiteral::s_hashShift) |
| }; |
| static StringImpl::StaticASCIILiteral fantasyFamilyData = { |
| StringImpl::StaticASCIILiteral::s_initialRefCount, |
| 15, |
| fantasyFamilyString8, |
| StringImpl::StaticASCIILiteral::s_initialFlags | (16384875 << StringImpl::StaticASCIILiteral::s_hashShift) |
| }; |
| static StringImpl::StaticASCIILiteral monospaceFamilyData = { |
| StringImpl::StaticASCIILiteral::s_initialRefCount, |
| 17, |
| monospaceFamilyString8, |
| StringImpl::StaticASCIILiteral::s_initialFlags | (14315487 << StringImpl::StaticASCIILiteral::s_hashShift) |
| }; |
| static StringImpl::StaticASCIILiteral pictographFamilyData = { |
| StringImpl::StaticASCIILiteral::s_initialRefCount, |
| 18, |
| pictographFamilyString8, |
| StringImpl::StaticASCIILiteral::s_initialFlags | (7921289 << StringImpl::StaticASCIILiteral::s_hashShift) |
| }; |
| static StringImpl::StaticASCIILiteral sansSerifFamilyData = { |
| StringImpl::StaticASCIILiteral::s_initialRefCount, |
| 18, |
| sansSerifFamilyString8, |
| StringImpl::StaticASCIILiteral::s_initialFlags | (1961926 << StringImpl::StaticASCIILiteral::s_hashShift) |
| }; |
| static StringImpl::StaticASCIILiteral serifFamilyData = { |
| StringImpl::StaticASCIILiteral::s_initialRefCount, |
| 13, |
| serifFamilyString8, |
| StringImpl::StaticASCIILiteral::s_initialFlags | (7070799 << StringImpl::StaticASCIILiteral::s_hashShift) |
| }; |
| static StringImpl::StaticASCIILiteral standardFamilyData = { |
| StringImpl::StaticASCIILiteral::s_initialRefCount, |
| 16, |
| standardFamilyString8, |
| StringImpl::StaticASCIILiteral::s_initialFlags | (6994621 << StringImpl::StaticASCIILiteral::s_hashShift) |
| }; |
| |
| DEFINE_GLOBAL(AtomicString, cursiveFamily) |
| DEFINE_GLOBAL(AtomicString, fantasyFamily) |
| DEFINE_GLOBAL(AtomicString, monospaceFamily) |
| DEFINE_GLOBAL(AtomicString, pictographFamily) |
| DEFINE_GLOBAL(AtomicString, sansSerifFamily) |
| DEFINE_GLOBAL(AtomicString, serifFamily) |
| DEFINE_GLOBAL(AtomicString, standardFamily) |
| |
| void init() |
| { |
| static bool initialized = false; |
| if (initialized) |
| return; |
| initialized = true; |
| |
| // Use placement new to initialize the globals. |
| |
| AtomicString::init(); |
| |
| #ifndef NDEBUG |
| reinterpret_cast<StringImpl*>(&cursiveFamilyData)->assertHashIsCorrect(); |
| reinterpret_cast<StringImpl*>(&fantasyFamilyData)->assertHashIsCorrect(); |
| reinterpret_cast<StringImpl*>(&monospaceFamilyData)->assertHashIsCorrect(); |
| reinterpret_cast<StringImpl*>(&pictographFamilyData)->assertHashIsCorrect(); |
| reinterpret_cast<StringImpl*>(&sansSerifFamilyData)->assertHashIsCorrect(); |
| reinterpret_cast<StringImpl*>(&serifFamilyData)->assertHashIsCorrect(); |
| reinterpret_cast<StringImpl*>(&standardFamilyData)->assertHashIsCorrect(); |
| #endif // NDEBUG |
| |
| new (NotNull, (void*)&cursiveFamily) AtomicString(reinterpret_cast<StringImpl*>(&cursiveFamilyData)); |
| new (NotNull, (void*)&fantasyFamily) AtomicString(reinterpret_cast<StringImpl*>(&fantasyFamilyData)); |
| new (NotNull, (void*)&monospaceFamily) AtomicString(reinterpret_cast<StringImpl*>(&monospaceFamilyData)); |
| new (NotNull, (void*)&pictographFamily) AtomicString(reinterpret_cast<StringImpl*>(&pictographFamilyData)); |
| new (NotNull, (void*)&sansSerifFamily) AtomicString(reinterpret_cast<StringImpl*>(&sansSerifFamilyData)); |
| new (NotNull, (void*)&serifFamily) AtomicString(reinterpret_cast<StringImpl*>(&serifFamilyData)); |
| new (NotNull, (void*)&standardFamily) AtomicString(reinterpret_cast<StringImpl*>(&standardFamilyData)); |
| } |
| } |
| } |