Bug 840869 - division-by-zero possible in gfxFont::Draw when mAdjusted == 0.0 r=bas.schouten

This commit is contained in:
Oleg Romashin 2013-02-17 10:24:55 -08:00
Родитель aa015e5e97
Коммит 8fa4339c77
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -2045,7 +2045,8 @@ gfxFont::Draw(gfxTextRun *aTextRun, uint32_t aStart, uint32_t aEnd,
mat = ToMatrix(*reinterpret_cast<gfxMatrix*>(&matrix));
mat._11 = mat._22 = 1.0;
mat._21 /= mAdjustedSize;
float adjustedSize = mAdjustedSize > 0 ? mAdjustedSize : GetStyle()->size;
mat._21 /= adjustedSize;
dt->SetTransform(mat * oldMat);