diff --git a/gfx/thebes/src/gfxFT2FontList.cpp b/gfx/thebes/src/gfxFT2FontList.cpp index 31db9502d4cc..731bc149e103 100644 --- a/gfx/thebes/src/gfxFT2FontList.cpp +++ b/gfx/thebes/src/gfxFT2FontList.cpp @@ -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); diff --git a/gfx/thebes/src/gfxGDIFontList.cpp b/gfx/thebes/src/gfxGDIFontList.cpp index f3904bca0ca8..73b5125447ec 100644 --- a/gfx/thebes/src/gfxGDIFontList.cpp +++ b/gfx/thebes/src/gfxGDIFontList.cpp @@ -634,7 +634,7 @@ gfxGDIFontList::EnumFontFamExProc(ENUMLOGFONTEXW *lpelfe, nsDependentString faceName(lf.lfFaceName); nsRefPtr family = new GDIFontFamily(faceName); fontList->mFontFamilies.Put(name, family); - if (fontList->mBadUnderlineFamilyNames.GetEntry(name)) + if (fontList->mBadUnderlineFamilyNames.Contains(name)) family->SetBadUnderlineFamily(); } diff --git a/gfx/thebes/src/gfxMacPlatformFontList.mm b/gfx/thebes/src/gfxMacPlatformFontList.mm index ba217aa73b49..eb0196776301 100644 --- a/gfx/thebes/src/gfxMacPlatformFontList.mm +++ b/gfx/thebes/src/gfxMacPlatformFontList.mm @@ -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(); } diff --git a/gfx/thebes/src/gfxPlatformFontList.cpp b/gfx/thebes/src/gfxPlatformFontList.cpp index 351601d32708..65fa084fdbf3 100644 --- a/gfx/thebes/src/gfxPlatformFontList.cpp +++ b/gfx/thebes/src/gfxPlatformFontList.cpp @@ -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(); } } diff --git a/gfx/thebes/src/gfxPlatformFontList.h b/gfx/thebes/src/gfxPlatformFontList.h index 4b9e80ec3975..8dda35a76e07 100644 --- a/gfx/thebes/src/gfxPlatformFontList.h +++ b/gfx/thebes/src/gfxPlatformFontList.h @@ -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 mBadUnderlineFamilyNames; + nsStringHashSet mBadUnderlineFamilyNames; // data used as part of the font cmap loading process nsTArray > mFontFamiliesToLoad;