зеркало из https://github.com/mozilla/pjs.git
b=324537, fix windows/cairo options menu crash due to unimplemented gfxPlatform call, r=me
This commit is contained in:
Родитель
21ed6bb9ad
Коммит
7333368c51
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче