зеркало из https://github.com/mozilla/gecko-dev.git
Bug 541924 followup - use the predefined nsStringHashSet class instead of nsTHashtable<nsStringHashKey>. r=jdaggett
This commit is contained in:
Родитель
f51ad94a17
Коммит
8e56dadbb9
|
@ -121,7 +121,7 @@ gfxFT2FontList::AppendFacesFromFontFile(const PRUnichar *aFileName)
|
|||
if (!family) {
|
||||
family = new gfxFontFamily(name);
|
||||
mFontFamilies.Put(name, family);
|
||||
if (mBadUnderlineFamilyNames.GetEntry(name))
|
||||
if (mBadUnderlineFamilyNames.Contains(name))
|
||||
family->SetBadUnderlineFamily();
|
||||
}
|
||||
family->AddFontEntry(fe);
|
||||
|
|
|
@ -634,7 +634,7 @@ gfxGDIFontList::EnumFontFamExProc(ENUMLOGFONTEXW *lpelfe,
|
|||
nsDependentString faceName(lf.lfFaceName);
|
||||
nsRefPtr<gfxFontFamily> family = new GDIFontFamily(faceName);
|
||||
fontList->mFontFamilies.Put(name, family);
|
||||
if (fontList->mBadUnderlineFamilyNames.GetEntry(name))
|
||||
if (fontList->mBadUnderlineFamilyNames.Contains(name))
|
||||
family->SetBadUnderlineFamily();
|
||||
}
|
||||
|
||||
|
|
|
@ -652,7 +652,7 @@ gfxMacPlatformFontList::InitFontList()
|
|||
mFontFamilies.Put(availableFamilyName, familyEntry);
|
||||
|
||||
// check the bad underline blacklist
|
||||
if (mBadUnderlineFamilyNames.GetEntry(availableFamilyName))
|
||||
if (mBadUnderlineFamilyNames.Contains(availableFamilyName))
|
||||
familyEntry->SetBadUnderlineFamily();
|
||||
}
|
||||
|
||||
|
|
|
@ -247,7 +247,7 @@ gfxPlatformFontList::LoadBadUnderlineList()
|
|||
for (PRUint32 i = 0; i < numFonts; i++) {
|
||||
nsAutoString key;
|
||||
GenerateFontListKey(blacklist[i], key);
|
||||
mBadUnderlineFamilyNames.PutEntry(key);
|
||||
mBadUnderlineFamilyNames.Put(key);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -466,7 +466,7 @@ gfxPlatformFontList::AddOtherFamilyName(gfxFontFamily *aFamilyEntry, nsAString&
|
|||
PR_LOG(gFontListLog, PR_LOG_DEBUG, ("(fontlist-otherfamily) canonical family: %s, other family: %s\n",
|
||||
NS_ConvertUTF16toUTF8(aFamilyEntry->Name()).get(),
|
||||
NS_ConvertUTF16toUTF8(aOtherFamilyName).get()));
|
||||
if (mBadUnderlineFamilyNames.GetEntry(key))
|
||||
if (mBadUnderlineFamilyNames.Contains(key))
|
||||
aFamilyEntry->SetBadUnderlineFamily();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
|
||||
#include "nsDataHashtable.h"
|
||||
#include "nsRefPtrHashtable.h"
|
||||
#include "nsHashSets.h"
|
||||
|
||||
#include "gfxFontUtils.h"
|
||||
#include "gfxFont.h"
|
||||
|
@ -205,7 +206,7 @@ protected:
|
|||
// on pages with lots of problems
|
||||
nsString mReplacementCharFallbackFamily;
|
||||
|
||||
nsTHashtable<nsStringHashKey> mBadUnderlineFamilyNames;
|
||||
nsStringHashSet mBadUnderlineFamilyNames;
|
||||
|
||||
// data used as part of the font cmap loading process
|
||||
nsTArray<nsRefPtr<gfxFontFamily> > mFontFamiliesToLoad;
|
||||
|
|
Загрузка…
Ссылка в новой задаче