Backing out changeset 432c4be058b5 which landed with no bug.

This commit is contained in:
Dave Townsend 2012-03-30 22:23:24 -07:00
Родитель 9d47f4aa9f
Коммит 78017778de
15 изменённых файлов: 334 добавлений и 142 удалений

Просмотреть файл

@ -1865,48 +1865,6 @@ 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")

Просмотреть файл

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

104
gfx/thebes/gfxAtomList.h Normal file
Просмотреть файл

@ -0,0 +1,104 @@
/* -*- 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")

62
gfx/thebes/gfxAtoms.cpp Normal file
Просмотреть файл

@ -0,0 +1,62 @@
/* -*- 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);
}

59
gfx/thebes/gfxAtoms.h Normal file
Просмотреть файл

@ -0,0 +1,59 @@
/* -*- 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 */

Просмотреть файл

@ -59,7 +59,7 @@
#ifdef MOZ_GRAPHITE
#include "gfxGraphiteShaper.h"
#endif
#include "nsGkAtoms.h"
#include "gfxAtoms.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(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;
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;
}
#else
const char *ctype = setlocale(LC_CTYPE, NULL);
if (ctype) {
if (!PL_strncasecmp(ctype, "ja", 2)) {
GetPrefFonts(nsGkAtoms::Japanese, aFontEntryList);
GetPrefFonts(gfxAtoms::ja, aFontEntryList);
} else if (!PL_strncasecmp(ctype, "zh_cn", 5)) {
GetPrefFonts(nsGkAtoms::zh_cn, aFontEntryList);
GetPrefFonts(gfxAtoms::zh_cn, aFontEntryList);
} else if (!PL_strncasecmp(ctype, "zh_hk", 5)) {
GetPrefFonts(nsGkAtoms::zh_hk, aFontEntryList);
GetPrefFonts(gfxAtoms::zh_hk, aFontEntryList);
} else if (!PL_strncasecmp(ctype, "zh_tw", 5)) {
GetPrefFonts(nsGkAtoms::zh_tw, aFontEntryList);
GetPrefFonts(gfxAtoms::zh_tw, aFontEntryList);
} else if (!PL_strncasecmp(ctype, "ko", 2)) {
GetPrefFonts(nsGkAtoms::ko, aFontEntryList);
GetPrefFonts(gfxAtoms::ko, aFontEntryList);
}
}
#endif
// last resort...
GetPrefFonts(nsGkAtoms::Japanese, aFontEntryList);
GetPrefFonts(nsGkAtoms::ko, aFontEntryList);
GetPrefFonts(nsGkAtoms::zh_cn, aFontEntryList);
GetPrefFonts(nsGkAtoms::zh_hk, aFontEntryList);
GetPrefFonts(nsGkAtoms::zh_tw, aFontEntryList);
GetPrefFonts(gfxAtoms::ja, aFontEntryList);
GetPrefFonts(gfxAtoms::ko, aFontEntryList);
GetPrefFonts(gfxAtoms::zh_cn, aFontEntryList);
GetPrefFonts(gfxAtoms::zh_hk, aFontEntryList);
GetPrefFonts(gfxAtoms::zh_tw, aFontEntryList);
platform->SetPrefFontEntries(key, aFontEntryList);
}

Просмотреть файл

@ -51,7 +51,7 @@
#include "gfxFont.h"
#include "gfxPlatform.h"
#include "nsGkAtoms.h"
#include "gfxAtoms.h"
#include "prtypes.h"
#include "gfxTypes.h"
@ -3114,7 +3114,7 @@ gfxFontGroup::ForEachFontInternal(const nsAString& aFamilies,
}
}
if (!groupAtom) {
groupAtom = nsGkAtoms::Unicode;
groupAtom = gfxAtoms::x_unicode;
}
groupAtom->ToUTF8String(groupString);
@ -4005,7 +4005,7 @@ gfxFontStyle::ParseFontLanguageOverride(const nsString& aLangTag)
}
gfxFontStyle::gfxFontStyle() :
language(nsGkAtoms::x_western),
language(gfxAtoms::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 = nsGkAtoms::x_western;
language = gfxAtoms::x_western;
}
}

Просмотреть файл

@ -41,7 +41,7 @@
#include "gfxFontconfigUtils.h"
#include "gfxFont.h"
#include "nsGkAtoms.h"
#include "gfxAtoms.h"
#include <locale.h>
#include <fontconfig/fontconfig.h>
@ -405,28 +405,28 @@ struct MozLangGroupData {
};
const MozLangGroupData MozLangGroups[] = {
{ 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 }
{ 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 }
};
static bool

Просмотреть файл

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

Просмотреть файл

@ -45,7 +45,7 @@
#include "gfxOS2Surface.h"
#include "gfxOS2Fonts.h"
#include "nsTArray.h"
#include "nsGkAtoms.h"
#include "gfxAtoms.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(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);
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);
// 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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -37,40 +37,40 @@
#include "nsUnicodeRange.h"
#include "nsIAtom.h"
#include "nsGkAtoms.h"
#include "gfxAtoms.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[] =
{
&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
&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
};
/**********************************************************************

Просмотреть файл

@ -39,7 +39,7 @@
#include "nsTextFrameUtils.h"
#include "gfxSkipChars.h"
#include "nsGkAtoms.h"
#include "gfxAtoms.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 == nsGkAtoms::tr || lang == nsGkAtoms::az ||
lang == nsGkAtoms::ba || lang == nsGkAtoms::crh ||
lang == nsGkAtoms::tt) {
if (lang == gfxAtoms::tr || lang == gfxAtoms::az ||
lang == gfxAtoms::ba || lang == gfxAtoms::crh ||
lang == gfxAtoms::tt) {
languageSpecificCasing = eTurkish;
} else if (lang == nsGkAtoms::nl) {
} else if (lang == gfxAtoms::nl) {
languageSpecificCasing = eDutch;
} else {
languageSpecificCasing = eNone;