зеркало из https://github.com/mozilla/pjs.git
Bug 427602. Switch use of TArray<nsAutoString> to TArray<nsString> within gfx code. r=stuart, a=schrep (reland)
This commit is contained in:
Родитель
6deca5732d
Коммит
348e3b735d
|
@ -336,7 +336,7 @@ public:
|
|||
static PRUint8 CharRangeBit(PRUint32 ch);
|
||||
|
||||
// for a given font list pref name, set up a list of font names
|
||||
static void GetPrefsFontList(const char *aPrefName, nsTArray<nsAutoString>& aFontList);
|
||||
static void GetPrefsFontList(const char *aPrefName, nsTArray<nsString>& aFontList);
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -428,7 +428,7 @@ PRUint8 gfxFontUtils::CharRangeBit(PRUint32 ch) {
|
|||
return NO_RANGE_FOUND;
|
||||
}
|
||||
|
||||
void gfxFontUtils::GetPrefsFontList(const char *aPrefName, nsTArray<nsAutoString>& aFontList)
|
||||
void gfxFontUtils::GetPrefsFontList(const char *aPrefName, nsTArray<nsString>& aFontList)
|
||||
{
|
||||
const PRUnichar kComma = PRUnichar(',');
|
||||
|
||||
|
|
|
@ -861,7 +861,7 @@ gfxQuartzFontCache::ReadOtherFamilyNamesForFamily(const nsAString& aFamilyName)
|
|||
void
|
||||
gfxQuartzFontCache::InitSingleFaceList()
|
||||
{
|
||||
nsAutoTArray<nsAutoString, 10> singleFaceFonts;
|
||||
nsAutoTArray<nsString, 10> singleFaceFonts;
|
||||
gfxFontUtils::GetPrefsFontList("font.single-face-list", singleFaceFonts);
|
||||
|
||||
PRUint32 numFonts = singleFaceFonts.Length();
|
||||
|
@ -906,7 +906,7 @@ gfxQuartzFontCache::InitSingleFaceList()
|
|||
void
|
||||
gfxQuartzFontCache::PreloadNamesList()
|
||||
{
|
||||
nsAutoTArray<nsAutoString, 10> preloadFonts;
|
||||
nsAutoTArray<nsString, 10> preloadFonts;
|
||||
gfxFontUtils::GetPrefsFontList("font.preload-names-list", preloadFonts);
|
||||
|
||||
PRUint32 numFonts = preloadFonts.Length();
|
||||
|
@ -978,7 +978,7 @@ gfxQuartzFontCache::EliminateDuplicateFaces(const nsAString& aFamilyName)
|
|||
void
|
||||
gfxQuartzFontCache::InitBadUnderlineList()
|
||||
{
|
||||
nsAutoTArray<nsAutoString, 10> blacklist;
|
||||
nsAutoTArray<nsString, 10> blacklist;
|
||||
gfxFontUtils::GetPrefsFontList("font.blacklist.underline_offset", blacklist);
|
||||
PRUint32 numFonts = blacklist.Length();
|
||||
for (PRUint32 i = 0; i < numFonts; i++) {
|
||||
|
|
|
@ -700,7 +700,7 @@ AddFontNameToArray(const nsAString& aName,
|
|||
void *closure)
|
||||
{
|
||||
if (!aName.IsEmpty()) {
|
||||
nsTArray<nsAutoString> *list = static_cast<nsTArray<nsAutoString> *>(closure);
|
||||
nsTArray<nsString> *list = static_cast<nsTArray<nsString> *>(closure);
|
||||
|
||||
if (list->IndexOf(aName) == list->NoIndex)
|
||||
list->AppendElement(aName);
|
||||
|
@ -712,7 +712,7 @@ AddFontNameToArray(const nsAString& aName,
|
|||
void
|
||||
gfxWindowsFontGroup::GroupFamilyListToArrayList(nsTArray<nsRefPtr<FontEntry> > *list)
|
||||
{
|
||||
nsAutoTArray<nsAutoString, 15> fonts;
|
||||
nsAutoTArray<nsString, 15> fonts;
|
||||
ForEachFont(AddFontNameToArray, &fonts);
|
||||
|
||||
PRUint32 len = fonts.Length();
|
||||
|
@ -727,12 +727,12 @@ gfxWindowsFontGroup::FamilyListToArrayList(const nsString& aFamilies,
|
|||
const nsCString& aLangGroup,
|
||||
nsTArray<nsRefPtr<FontEntry> > *list)
|
||||
{
|
||||
nsAutoTArray<nsAutoString, 15> fonts;
|
||||
nsAutoTArray<nsString, 15> fonts;
|
||||
ForEachFont(aFamilies, aLangGroup, AddFontNameToArray, &fonts);
|
||||
|
||||
PRUint32 len = fonts.Length();
|
||||
for (PRUint32 i = 0; i < len; ++i) {
|
||||
const nsAutoString& str = fonts[i];
|
||||
const nsString& str = fonts[i];
|
||||
nsRefPtr<FontEntry> fe = gfxWindowsPlatform::GetPlatform()->FindFontEntry(str, mStyle);
|
||||
list->AppendElement(fe);
|
||||
}
|
||||
|
|
|
@ -307,7 +307,7 @@ static PRBool SimpleResolverCallback(const nsAString& aName, void* aClosure)
|
|||
void
|
||||
gfxWindowsPlatform::InitBadUnderlineList()
|
||||
{
|
||||
nsAutoTArray<nsAutoString, 10> blacklist;
|
||||
nsAutoTArray<nsString, 10> blacklist;
|
||||
gfxFontUtils::GetPrefsFontList("font.blacklist.underline_offset", blacklist);
|
||||
PRUint32 numFonts = blacklist.Length();
|
||||
for (PRUint32 i = 0; i < numFonts; i++) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче