Bug 741048: Remove gfxAtoms. r=roc

This commit is contained in:
Ms2ger 2012-03-30 23:08:46 -07:00
parent f5853d4d7a
commit 9f1fbf3676
15 changed files with 142 additions and 334 deletions

View File

@ -1865,6 +1865,48 @@ GK_ATOM(Taiwanese, "zh-TW")
GK_ATOM(HongKongChinese, "zh-HK")
GK_ATOM(Unicode, "x-unicode")
// language codes specifically referenced in the gfx code
GK_ATOM(ko, "ko")
GK_ATOM(zh_cn, "zh-cn")
GK_ATOM(zh_hk, "zh-hk")
GK_ATOM(zh_tw, "zh-tw")
// additional codes used in nsUnicodeRange.cpp
GK_ATOM(x_cyrillic, "x-cyrillic")
GK_ATOM(he, "he")
GK_ATOM(ar, "ar")
GK_ATOM(x_baltic, "x-baltic")
GK_ATOM(x_devanagari, "x-devanagari")
GK_ATOM(x_tamil, "x-tamil")
GK_ATOM(x_armn, "x-armn")
GK_ATOM(x_beng, "x-beng")
GK_ATOM(x_cans, "x-cans")
GK_ATOM(x_ethi, "x-ethi")
GK_ATOM(x_geor, "x-geor")
GK_ATOM(x_gujr, "x-gujr")
GK_ATOM(x_guru, "x-guru")
GK_ATOM(x_khmr, "x-khmr")
GK_ATOM(x_knda, "x-knda")
GK_ATOM(x_mlym, "x-mlym")
GK_ATOM(x_orya, "x-orya")
GK_ATOM(x_sinh, "x-sinh")
GK_ATOM(x_telu, "x-telu")
GK_ATOM(x_tibt, "x-tibt")
// used in gfxGDIFontList.h
GK_ATOM(ko_xxx, "ko-xxx")
GK_ATOM(x_central_euro, "x-central-euro")
GK_ATOM(x_symbol, "x-symbol")
// referenced in all.js
GK_ATOM(x_user_def, "x-user-def")
// additional languages that have special case transformations
GK_ATOM(az, "az")
GK_ATOM(ba, "ba")
GK_ATOM(crh, "crh")
GK_ATOM(nl, "nl")
// Names for editor transactions
GK_ATOM(TypingTxnName, "Typing")
GK_ATOM(IMETxnName, "IME")

View File

@ -50,8 +50,6 @@ EXPORTS = \
gfx3DMatrix.h \
gfxASurface.h \
gfxAlphaRecovery.h \
gfxAtomList.h \
gfxAtoms.h \
gfxBlur.h \
gfxCachedTempSurface.h \
gfxColor.h \
@ -175,8 +173,6 @@ EXPORTS += \
gfxGDIFont.h \
gfxGDIFontList.h \
gfxPlatformFontList.h \
gfxAtoms.h \
gfxAtomList.h \
$(NULL)
endif
@ -193,7 +189,6 @@ CPPSRCS = \
gfxFontMissingGlyphs.cpp \
gfxFontTest.cpp \
gfxFontUtils.cpp \
gfxAtoms.cpp \
gfxMatrix.cpp \
gfxPath.cpp \
gfxPattern.cpp \

View File

@ -1,104 +0,0 @@
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Foundation code.
*
* The Initial Developer of the Original Code is Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/******
This file contains the list of all gfx language nsIAtoms and their values
It is designed to be used as inline input to gfxAtoms.cpp *only*
through the magic of C preprocessing.
All entries must be enclosed in the macro GFX_ATOM which will have cruel
and unusual things done to it
It is recommended (but not strictly necessary) to keep all entries
in alphabetical order
The first argument to GFX_ATOM is the C++ identifier of the atom
The second argument is the string value of the atom
******/
// language codes specifically referenced in the gfx code
GFX_ATOM(en, "en")
GFX_ATOM(x_unicode, "x-unicode")
GFX_ATOM(x_western, "x-western")
GFX_ATOM(ja, "ja")
GFX_ATOM(ko, "ko")
GFX_ATOM(zh_cn, "zh-cn")
GFX_ATOM(zh_hk, "zh-hk")
GFX_ATOM(zh_tw, "zh-tw")
// additional codes used in nsUnicodeRange.cpp
GFX_ATOM(x_cyrillic, "x-cyrillic")
GFX_ATOM(el, "el")
GFX_ATOM(tr, "tr")
GFX_ATOM(he, "he")
GFX_ATOM(ar, "ar")
GFX_ATOM(x_baltic, "x-baltic")
GFX_ATOM(th, "th")
GFX_ATOM(x_devanagari, "x-devanagari")
GFX_ATOM(x_tamil, "x-tamil")
GFX_ATOM(x_armn, "x-armn")
GFX_ATOM(x_beng, "x-beng")
GFX_ATOM(x_cans, "x-cans")
GFX_ATOM(x_ethi, "x-ethi")
GFX_ATOM(x_geor, "x-geor")
GFX_ATOM(x_gujr, "x-gujr")
GFX_ATOM(x_guru, "x-guru")
GFX_ATOM(x_khmr, "x-khmr")
GFX_ATOM(x_knda, "x-knda")
GFX_ATOM(x_mlym, "x-mlym")
GFX_ATOM(x_orya, "x-orya")
GFX_ATOM(x_sinh, "x-sinh")
GFX_ATOM(x_telu, "x-telu")
GFX_ATOM(x_tibt, "x-tibt")
// used in gfxGDIFontList.h
GFX_ATOM(ko_xxx, "ko-xxx")
GFX_ATOM(x_central_euro, "x-central-euro")
GFX_ATOM(x_symbol, "x-symbol")
// referenced in all.js
GFX_ATOM(x_user_def, "x-user-def")
// additional languages that have special case transformations
GFX_ATOM(az, "az")
GFX_ATOM(ba, "ba")
GFX_ATOM(crh, "crh")
GFX_ATOM(tt, "tt")
GFX_ATOM(nl, "nl")

View File

@ -1,62 +0,0 @@
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Foundation code.
*
* The Initial Developer of the Original Code is Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "mozilla/Util.h"
#include "gfxAtoms.h"
#include "nsStaticAtom.h"
#include "nsMemory.h"
using namespace mozilla;
#define GFX_ATOM(name_, value_) nsIAtom* gfxAtoms::name_ = 0;
#include "gfxAtomList.h"
#undef GFX_ATOM
#define GFX_ATOM(name_, value_) NS_STATIC_ATOM_BUFFER(name_##_buffer, value_)
#include "gfxAtomList.h"
#undef GFX_ATOM
static const nsStaticAtom atoms[] = {
#define GFX_ATOM(name_, value_) NS_STATIC_ATOM(name_##_buffer, &gfxAtoms::name_),
#include "gfxAtomList.h"
#undef GFX_ATOM
};
void gfxAtoms::RegisterAtoms()
{
NS_RegisterStaticAtoms(atoms);
}

View File

@ -1,59 +0,0 @@
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozilla Foundation code.
*
* The Initial Developer of the Original Code is Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef GFX_ATOMS_H
#define GFX_ATOMS_H
#include "prtypes.h"
#include "nsIAtom.h"
class gfxAtoms {
public:
static void RegisterAtoms();
/* Declare all atoms
The atom names and values are stored in gfxAtomList.h and
are brought to you by the magic of C preprocessing
Add new atoms to gfxAtomList.h and all support logic will be auto-generated
*/
#define GFX_ATOM(_name, _value) static nsIAtom* _name;
#include "gfxAtomList.h"
#undef GFX_ATOM
};
#endif /* GFX_ATOMS_H */

View File

@ -59,7 +59,7 @@
#ifdef MOZ_GRAPHITE
#include "gfxGraphiteShaper.h"
#endif
#include "gfxAtoms.h"
#include "nsGkAtoms.h"
#include "nsTArray.h"
#include "nsUnicodeRange.h"
#include "nsCRT.h"
@ -303,35 +303,35 @@ void gfxFT2FontGroup::GetCJKPrefFonts(nsTArray<nsRefPtr<gfxFontEntry> >& aFontEn
// Add the system locale
#ifdef XP_WIN
switch (::GetACP()) {
case 932: GetPrefFonts(gfxAtoms::ja, aFontEntryList); break;
case 936: GetPrefFonts(gfxAtoms::zh_cn, aFontEntryList); break;
case 949: GetPrefFonts(gfxAtoms::ko, aFontEntryList); break;
// XXX Don't we need to append gfxAtoms::zh_hk if the codepage is 950?
case 950: GetPrefFonts(gfxAtoms::zh_tw, aFontEntryList); break;
case 932: GetPrefFonts(nsGkAtoms::Japanese, aFontEntryList); break;
case 936: GetPrefFonts(nsGkAtoms::zh_cn, aFontEntryList); break;
case 949: GetPrefFonts(nsGkAtoms::ko, aFontEntryList); break;
// XXX Don't we need to append nsGkAtoms::zh_hk if the codepage is 950?
case 950: GetPrefFonts(nsGkAtoms::zh_tw, aFontEntryList); break;
}
#else
const char *ctype = setlocale(LC_CTYPE, NULL);
if (ctype) {
if (!PL_strncasecmp(ctype, "ja", 2)) {
GetPrefFonts(gfxAtoms::ja, aFontEntryList);
GetPrefFonts(nsGkAtoms::Japanese, aFontEntryList);
} else if (!PL_strncasecmp(ctype, "zh_cn", 5)) {
GetPrefFonts(gfxAtoms::zh_cn, aFontEntryList);
GetPrefFonts(nsGkAtoms::zh_cn, aFontEntryList);
} else if (!PL_strncasecmp(ctype, "zh_hk", 5)) {
GetPrefFonts(gfxAtoms::zh_hk, aFontEntryList);
GetPrefFonts(nsGkAtoms::zh_hk, aFontEntryList);
} else if (!PL_strncasecmp(ctype, "zh_tw", 5)) {
GetPrefFonts(gfxAtoms::zh_tw, aFontEntryList);
GetPrefFonts(nsGkAtoms::zh_tw, aFontEntryList);
} else if (!PL_strncasecmp(ctype, "ko", 2)) {
GetPrefFonts(gfxAtoms::ko, aFontEntryList);
GetPrefFonts(nsGkAtoms::ko, aFontEntryList);
}
}
#endif
// last resort...
GetPrefFonts(gfxAtoms::ja, aFontEntryList);
GetPrefFonts(gfxAtoms::ko, aFontEntryList);
GetPrefFonts(gfxAtoms::zh_cn, aFontEntryList);
GetPrefFonts(gfxAtoms::zh_hk, aFontEntryList);
GetPrefFonts(gfxAtoms::zh_tw, aFontEntryList);
GetPrefFonts(nsGkAtoms::Japanese, aFontEntryList);
GetPrefFonts(nsGkAtoms::ko, aFontEntryList);
GetPrefFonts(nsGkAtoms::zh_cn, aFontEntryList);
GetPrefFonts(nsGkAtoms::zh_hk, aFontEntryList);
GetPrefFonts(nsGkAtoms::zh_tw, aFontEntryList);
platform->SetPrefFontEntries(key, aFontEntryList);
}

View File

@ -51,7 +51,7 @@
#include "gfxFont.h"
#include "gfxPlatform.h"
#include "gfxAtoms.h"
#include "nsGkAtoms.h"
#include "prtypes.h"
#include "gfxTypes.h"
@ -3114,7 +3114,7 @@ gfxFontGroup::ForEachFontInternal(const nsAString& aFamilies,
}
}
if (!groupAtom) {
groupAtom = gfxAtoms::x_unicode;
groupAtom = nsGkAtoms::Unicode;
}
groupAtom->ToUTF8String(groupString);
@ -4005,7 +4005,7 @@ gfxFontStyle::ParseFontLanguageOverride(const nsString& aLangTag)
}
gfxFontStyle::gfxFontStyle() :
language(gfxAtoms::x_western),
language(nsGkAtoms::x_western),
size(DEFAULT_PIXEL_FONT_SIZE), sizeAdjust(0.0f),
languageOverride(NO_FONT_LANGUAGE_OVERRIDE),
weight(NS_FONT_WEIGHT_NORMAL), stretch(NS_FONT_STRETCH_NORMAL),
@ -4044,7 +4044,7 @@ gfxFontStyle::gfxFontStyle(PRUint8 aStyle, PRUint16 aWeight, PRInt16 aStretch,
if (!language) {
NS_WARNING("null language");
language = gfxAtoms::x_western;
language = nsGkAtoms::x_western;
}
}

View File

@ -41,7 +41,7 @@
#include "gfxFontconfigUtils.h"
#include "gfxFont.h"
#include "gfxAtoms.h"
#include "nsGkAtoms.h"
#include <locale.h>
#include <fontconfig/fontconfig.h>
@ -405,28 +405,28 @@ struct MozLangGroupData {
};
const MozLangGroupData MozLangGroups[] = {
{ gfxAtoms::x_western, "en" },
{ gfxAtoms::x_central_euro, "pl" },
{ gfxAtoms::x_cyrillic, "ru" },
{ gfxAtoms::x_baltic, "lv" },
{ gfxAtoms::x_devanagari, "hi" },
{ gfxAtoms::x_tamil, "ta" },
{ gfxAtoms::x_armn, "hy" },
{ gfxAtoms::x_beng, "bn" },
{ gfxAtoms::x_cans, "iu" },
{ gfxAtoms::x_ethi, "am" },
{ gfxAtoms::x_geor, "ka" },
{ gfxAtoms::x_gujr, "gu" },
{ gfxAtoms::x_guru, "pa" },
{ gfxAtoms::x_khmr, "km" },
{ gfxAtoms::x_knda, "kn" },
{ gfxAtoms::x_mlym, "ml" },
{ gfxAtoms::x_orya, "or" },
{ gfxAtoms::x_sinh, "si" },
{ gfxAtoms::x_telu, "te" },
{ gfxAtoms::x_tibt, "bo" },
{ gfxAtoms::x_unicode, 0 },
{ gfxAtoms::x_user_def, 0 }
{ nsGkAtoms::x_western, "en" },
{ nsGkAtoms::x_central_euro, "pl" },
{ nsGkAtoms::x_cyrillic, "ru" },
{ nsGkAtoms::x_baltic, "lv" },
{ nsGkAtoms::x_devanagari, "hi" },
{ nsGkAtoms::x_tamil, "ta" },
{ nsGkAtoms::x_armn, "hy" },
{ nsGkAtoms::x_beng, "bn" },
{ nsGkAtoms::x_cans, "iu" },
{ nsGkAtoms::x_ethi, "am" },
{ nsGkAtoms::x_geor, "ka" },
{ nsGkAtoms::x_gujr, "gu" },
{ nsGkAtoms::x_guru, "pa" },
{ nsGkAtoms::x_khmr, "km" },
{ nsGkAtoms::x_knda, "kn" },
{ nsGkAtoms::x_mlym, "ml" },
{ nsGkAtoms::x_orya, "or" },
{ nsGkAtoms::x_sinh, "si" },
{ nsGkAtoms::x_telu, "te" },
{ nsGkAtoms::x_tibt, "bo" },
{ nsGkAtoms::Unicode, 0 },
{ nsGkAtoms::x_user_def, 0 }
};
static bool

View File

@ -43,7 +43,7 @@
#include "gfxWindowsPlatform.h"
#include "gfxPlatformFontList.h"
#include "gfxAtoms.h"
#include "nsGkAtoms.h"
#include <windows.h>
@ -218,42 +218,42 @@ public:
}
virtual bool SupportsLangGroup(nsIAtom* aLangGroup) const {
if (!aLangGroup || aLangGroup == gfxAtoms::x_unicode) {
if (!aLangGroup || aLangGroup == nsGkAtoms::Unicode) {
return true;
}
PRInt16 bit = -1;
/* map our langgroup names in to Windows charset bits */
if (aLangGroup == gfxAtoms::x_western) {
if (aLangGroup == nsGkAtoms::x_western) {
bit = ANSI_CHARSET;
} else if (aLangGroup == gfxAtoms::ja) {
} else if (aLangGroup == nsGkAtoms::Japanese) {
bit = SHIFTJIS_CHARSET;
} else if (aLangGroup == gfxAtoms::ko) {
} else if (aLangGroup == nsGkAtoms::ko) {
bit = HANGEUL_CHARSET;
} else if (aLangGroup == gfxAtoms::ko_xxx) {
} else if (aLangGroup == nsGkAtoms::ko_xxx) {
bit = JOHAB_CHARSET;
} else if (aLangGroup == gfxAtoms::zh_cn) {
} else if (aLangGroup == nsGkAtoms::zh_cn) {
bit = GB2312_CHARSET;
} else if (aLangGroup == gfxAtoms::zh_tw) {
} else if (aLangGroup == nsGkAtoms::zh_tw) {
bit = CHINESEBIG5_CHARSET;
} else if (aLangGroup == gfxAtoms::el) {
} else if (aLangGroup == nsGkAtoms::el_) {
bit = GREEK_CHARSET;
} else if (aLangGroup == gfxAtoms::tr) {
} else if (aLangGroup == nsGkAtoms::tr) {
bit = TURKISH_CHARSET;
} else if (aLangGroup == gfxAtoms::he) {
} else if (aLangGroup == nsGkAtoms::he) {
bit = HEBREW_CHARSET;
} else if (aLangGroup == gfxAtoms::ar) {
} else if (aLangGroup == nsGkAtoms::ar) {
bit = ARABIC_CHARSET;
} else if (aLangGroup == gfxAtoms::x_baltic) {
} else if (aLangGroup == nsGkAtoms::x_baltic) {
bit = BALTIC_CHARSET;
} else if (aLangGroup == gfxAtoms::x_cyrillic) {
} else if (aLangGroup == nsGkAtoms::x_cyrillic) {
bit = RUSSIAN_CHARSET;
} else if (aLangGroup == gfxAtoms::th) {
} else if (aLangGroup == nsGkAtoms::th) {
bit = THAI_CHARSET;
} else if (aLangGroup == gfxAtoms::x_central_euro) {
} else if (aLangGroup == nsGkAtoms::x_central_euro) {
bit = EASTEUROPE_CHARSET;
} else if (aLangGroup == gfxAtoms::x_symbol) {
} else if (aLangGroup == nsGkAtoms::x_symbol) {
bit = SYMBOL_CHARSET;
}

View File

@ -45,7 +45,7 @@
#include "gfxOS2Surface.h"
#include "gfxOS2Fonts.h"
#include "nsTArray.h"
#include "gfxAtoms.h"
#include "nsGkAtoms.h"
#include "nsIPlatformCharset.h"
@ -547,10 +547,10 @@ gfxOS2FontGroup::gfxOS2FontGroup(const nsAString& aFamilies,
// are set up, and if the user was so clever to set up the User Defined fonts,
// then these are probable candidates, too.
nsString fontString;
gfxPlatform::GetPlatform()->GetPrefFonts(gfxAtoms::x_unicode, fontString, false);
ForEachFont(fontString, gfxAtoms::x_unicode, FontCallback, &familyArray);
gfxPlatform::GetPlatform()->GetPrefFonts(gfxAtoms::x_user_def, fontString, false);
ForEachFont(fontString, gfxAtoms::x_user_def, FontCallback, &familyArray);
gfxPlatform::GetPlatform()->GetPrefFonts(nsGkAtoms::Unicode, fontString, false);
ForEachFont(fontString, nsGkAtoms::Unicode, FontCallback, &familyArray);
gfxPlatform::GetPlatform()->GetPrefFonts(nsGkAtoms::x_user_def, fontString, false);
ForEachFont(fontString, nsGkAtoms::x_user_def, FontCallback, &familyArray);
// Should append some default font if there are no available fonts.
// Let's use Helv which should be available on any OS/2 system; if

View File

@ -73,7 +73,6 @@
#include "nsUnicodeScriptCodes.h"
#include "gfxFontconfigUtils.h"
#include "gfxUserFontSet.h"
#include "gfxAtoms.h"
#include <cairo.h>
#include <cairo-ft.h>

View File

@ -57,7 +57,7 @@
#include "gfxAndroidPlatform.h"
#endif
#include "gfxAtoms.h"
#include "nsGkAtoms.h"
#include "gfxPlatformFontList.h"
#include "gfxContext.h"
#include "gfxImageSurface.h"
@ -265,8 +265,6 @@ gfxPlatform::Init()
}
gEverInitialized = true;
gfxAtoms::RegisterAtoms();
#ifdef PR_LOGGING
sFontlistLog = PR_NewLogModule("fontlist");;
sFontInitLog = PR_NewLogModule("fontinit");;
@ -786,7 +784,7 @@ gfxPlatform::GetPrefFonts(nsIAtom *aLanguage, nsString& aFonts, bool aAppendUnic
AppendGenericFontFromPref(aFonts, aLanguage, nsnull);
if (aAppendUnicode)
AppendGenericFontFromPref(aFonts, gfxAtoms::x_unicode, nsnull);
AppendGenericFontFromPref(aFonts, nsGkAtoms::Unicode, nsnull);
}
bool gfxPlatform::ForEachPrefFont(eFontPrefLang aLangArray[], PRUint32 aLangArrayLen, PrefFontCallback aCallback,

View File

@ -45,7 +45,6 @@
#include "gfxContext.h"
#include "gfxUniscribeShaper.h"
#include "gfxWindowsPlatform.h"
#include "gfxAtoms.h"
#include "gfxFontTest.h"

View File

@ -37,40 +37,40 @@
#include "nsUnicodeRange.h"
#include "nsIAtom.h"
#include "gfxAtoms.h"
#include "nsGkAtoms.h"
// This table depends on unicode range definitions.
// Each item's index must correspond unicode range value
// eg. x-cyrillic = LangGroupTable[kRangeCyrillic]
static nsIAtom **gUnicodeRangeToLangGroupAtomTable[] =
{
&gfxAtoms::x_cyrillic,
&gfxAtoms::el,
&gfxAtoms::tr,
&gfxAtoms::he,
&gfxAtoms::ar,
&gfxAtoms::x_baltic,
&gfxAtoms::th,
&gfxAtoms::ko,
&gfxAtoms::ja,
&gfxAtoms::zh_cn,
&gfxAtoms::zh_tw,
&gfxAtoms::x_devanagari,
&gfxAtoms::x_tamil,
&gfxAtoms::x_armn,
&gfxAtoms::x_beng,
&gfxAtoms::x_cans,
&gfxAtoms::x_ethi,
&gfxAtoms::x_geor,
&gfxAtoms::x_gujr,
&gfxAtoms::x_guru,
&gfxAtoms::x_khmr,
&gfxAtoms::x_mlym,
&gfxAtoms::x_orya,
&gfxAtoms::x_telu,
&gfxAtoms::x_knda,
&gfxAtoms::x_sinh,
&gfxAtoms::x_tibt
&nsGkAtoms::x_cyrillic,
&nsGkAtoms::el_,
&nsGkAtoms::tr,
&nsGkAtoms::he,
&nsGkAtoms::ar,
&nsGkAtoms::x_baltic,
&nsGkAtoms::th,
&nsGkAtoms::ko,
&nsGkAtoms::Japanese,
&nsGkAtoms::zh_cn,
&nsGkAtoms::zh_tw,
&nsGkAtoms::x_devanagari,
&nsGkAtoms::x_tamil,
&nsGkAtoms::x_armn,
&nsGkAtoms::x_beng,
&nsGkAtoms::x_cans,
&nsGkAtoms::x_ethi,
&nsGkAtoms::x_geor,
&nsGkAtoms::x_gujr,
&nsGkAtoms::x_guru,
&nsGkAtoms::x_khmr,
&nsGkAtoms::x_mlym,
&nsGkAtoms::x_orya,
&nsGkAtoms::x_telu,
&nsGkAtoms::x_knda,
&nsGkAtoms::x_sinh,
&nsGkAtoms::x_tibt
};
/**********************************************************************

View File

@ -39,7 +39,7 @@
#include "nsTextFrameUtils.h"
#include "gfxSkipChars.h"
#include "gfxAtoms.h"
#include "nsGkAtoms.h"
#include "nsStyleConsts.h"
#include "nsStyleContext.h"
@ -394,11 +394,11 @@ nsCaseTransformTextRunFactory::RebuildTextRun(nsTransformedTextRun* aTextRun,
if (lang != styleContext->GetStyleFont()->mLanguage) {
lang = styleContext->GetStyleFont()->mLanguage;
if (lang == gfxAtoms::tr || lang == gfxAtoms::az ||
lang == gfxAtoms::ba || lang == gfxAtoms::crh ||
lang == gfxAtoms::tt) {
if (lang == nsGkAtoms::tr || lang == nsGkAtoms::az ||
lang == nsGkAtoms::ba || lang == nsGkAtoms::crh ||
lang == nsGkAtoms::tt) {
languageSpecificCasing = eTurkish;
} else if (lang == gfxAtoms::nl) {
} else if (lang == nsGkAtoms::nl) {
languageSpecificCasing = eDutch;
} else {
languageSpecificCasing = eNone;