b=324537, fix windows/cairo options menu crash due to unimplemented gfxPlatform call, r=me

This commit is contained in:
vladimir%pobox.com 2006-01-25 09:29:31 +00:00
Родитель 21ed6bb9ad
Коммит 7333368c51
2 изменённых файлов: 7 добавлений и 2 удалений

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

@ -80,7 +80,11 @@ nsThebesFontEnumerator::EnumerateFonts(const char *aLangGroup,
else
generic.SetIsVoid(PR_TRUE);
rv = gfxPlatform::GetPlatform()->GetFontList(langGroup, generic, fontList);
// XXX windows doesn't implement gfxPlatform yet
if (gfxPlatform::GetPlatform())
rv = gfxPlatform::GetPlatform()->GetFontList(langGroup, generic, fontList);
else
rv = NS_ERROR_NOT_IMPLEMENTED;
if (NS_FAILED(rv)) {
*aCount = 0;

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

@ -421,12 +421,13 @@ TRY_AGAIN_SAME_SCRIPT:
PRInt32 *spacing = 0;
PRInt32 justTotal = 0;
if (aSpacing) {
PRUint32 j;
/* need to correct for layout/gfx spacing mismatch */
// hacky inefficient justification: take the excess of what layout
// thinks the width is over what uniscribe thinks the width is and
// share it evenly between the justification opportunities
PRInt32 layoutTotal = 0;
for (PRUint32 j = items[i].iCharPos; j < items[i+1].iCharPos; j++) {
for (j = items[i].iCharPos; j < items[i+1].iCharPos; j++) {
layoutTotal += aSpacing[j];
}
PRInt32 gfxTotal = abc.abcA + abc.abcB + abc.abcC;