b=597212 remove unnecessary extra nsILanguageAtomService::LookupLanguage r=jfkthame a=joe

--HG--
extra : transplant_source : p%23%5B%82.%9D70%F6%95%96%85%0C%EE%04%1C%BC9%27%D2
This commit is contained in:
Karl Tomlinson 2010-11-11 08:45:00 +13:00
Родитель c015af3dd6
Коммит f0d51cf121
1 изменённых файлов: 4 добавлений и 10 удалений

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

@ -50,8 +50,6 @@
#include "nsMathUtils.h"
#include "nsTArray.h"
#include "nsServiceManagerUtils.h"
#include "nsILanguageAtomService.h"
#include "gfxContext.h"
#ifdef MOZ_WIDGET_GTK2
@ -2019,19 +2017,15 @@ gfxPangoFontGroup::MakeFontSet(PangoLanguage *aLang, gfxFloat aSizeAdjustFactor,
{
const char *lang = pango_language_to_string(aLang);
nsIAtom *langGroup = nsnull;
nsRefPtr <nsIAtom> langGroup;
if (aLang != mPangoLanguage) {
// Set up langGroup for Mozilla's font prefs.
if (!gLangService) {
CallGetService(NS_LANGUAGEATOMSERVICE_CONTRACTID, &gLangService);
}
if (gLangService) {
langGroup = gLangService->LookupLanguage(NS_ConvertUTF8toUTF16(lang));
}
langGroup = do_GetAtom(lang);
}
nsAutoTArray<nsString, 20> fcFamilyList;
GetFcFamilies(&fcFamilyList, langGroup ? langGroup : mStyle.language.get());
GetFcFamilies(&fcFamilyList,
langGroup ? langGroup.get() : mStyle.language.get());
// To consider: A fontset cache here could be helpful.