Bug #180721. floating point error when visiting web page. Paper over the fact that the style system is passing is a pixel size of 0. Not part of the default build.

This commit is contained in:
blizzard%redhat.com 2002-11-20 03:35:59 +00:00
Родитель 739b4d4f2f
Коммит 49e3a77960
1 изменённых файлов: 9 добавлений и 0 удалений

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

@ -272,6 +272,15 @@ nsFontMetricsXft::Init(const nsFont& aFont, nsIAtom* aLangGroup,
mPointSize = minimum;
}
// Make sure that the point size is at least greater than zero
if (mPointSize < 1) {
#ifdef DEBUG
printf("*** Warning: nsFontMetricsXft was passed a point size of %d\n",
mPointSize);
#endif
mPointSize = 1;
}
if (NS_FAILED(RealizeFont()))
return NS_ERROR_FAILURE;