Backed out changeset c72465a4c424 (bug 1056479)

This commit is contained in:
Carsten "Tomcat" Book 2015-05-12 12:21:14 +02:00
parent c9d696c90e
commit 1f3e44bf6d
3 changed files with 1 additions and 53 deletions

View File

@ -382,39 +382,6 @@ static const char *gPrefLangNames[] = {
"x-unicode",
};
// this needs to match the list of pref font.default.xx entries listed in all.js!
// the order *must* match the order in eFontPrefLang
static nsIAtom* gPrefLangToLangGroups[] = {
nsGkAtoms::x_western,
nsGkAtoms::Japanese,
nsGkAtoms::Taiwanese,
nsGkAtoms::Chinese,
nsGkAtoms::HongKongChinese,
nsGkAtoms::ko,
nsGkAtoms::x_cyrillic,
nsGkAtoms::el,
nsGkAtoms::th,
nsGkAtoms::he,
nsGkAtoms::ar,
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,
nsGkAtoms::Unicode
};
gfxPlatform::gfxPlatform()
: mTileWidth(-1)
, mTileHeight(-1)
@ -1507,19 +1474,6 @@ gfxPlatform::GetFontPrefLangFor(nsIAtom *aLang)
return GetFontPrefLangFor(lang.get());
}
nsIAtom*
gfxPlatform::GetLangGroupForPrefLang(eFontPrefLang aLang)
{
// the special CJK set pref lang should be resolved into separate
// calls to individual CJK pref langs before getting here
NS_ASSERTION(aLang != eFontPrefLang_CJKSet, "unresolved CJK set pref lang");
if (uint32_t(aLang) < ArrayLength(gPrefLangToLangGroups)) {
return gPrefLangToLangGroups[uint32_t(aLang)];
}
return nsGkAtoms::Unicode;
}
const char*
gfxPlatform::GetPrefLangName(eFontPrefLang aLang)
{

View File

@ -470,9 +470,6 @@ public:
// convert a lang group atom to enum constant
static eFontPrefLang GetFontPrefLangFor(nsIAtom *aLang);
// convert an enum constant to a lang group atom
static nsIAtom* GetLangGroupForPrefLang(eFontPrefLang aLang);
// convert a enum constant to lang group string (i.e. eFontPrefLang_ChineseTW ==> "zh-TW")
static const char* GetPrefLangName(eFontPrefLang aLang);

View File

@ -3082,10 +3082,7 @@ struct PrefFontCallbackData {
{
PrefFontCallbackData *prefFontData = static_cast<PrefFontCallbackData*>(aClosure);
// map pref lang to langGroup for language-sensitive lookups
nsIAtom* lang = gfxPlatform::GetLangGroupForPrefLang(aLang);
gfxFontFamily *family =
gfxPlatformFontList::PlatformFontList()->FindFamily(aName, lang);
gfxFontFamily *family = gfxPlatformFontList::PlatformFontList()->FindFamily(aName);
if (family) {
prefFontData->mPrefFamilies.AppendElement(family);
}