fix rendering of <font size="+0">. Bug 150022, r=doron, sr=jst

This commit is contained in:
bzbarsky%mit.edu 2002-06-18 02:42:40 +00:00
Родитель 30ad18391d
Коммит cfece5fdc2
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -263,8 +263,9 @@ MapAttributesIntoRule(const nsIHTMLMappedAttributes* aAttributes,
if ((value.GetUnit() == eHTMLUnit_Integer) ||
(value.GetUnit() == eHTMLUnit_Enumerated)) {
PRInt32 size = value.GetIntValue();
if (size) {
if (value.GetUnit() == eHTMLUnit_Integer) // int (+/-)
nsHTMLUnit unit = value.GetUnit();
if (size || unit == eHTMLUnit_Integer) { // unit is integer if attr was "+0" or "-0"
if (unit == eHTMLUnit_Integer) // int (+/-)
size = 3 + size; // XXX should be BASEFONT, not three
size = ((0 < size) ? ((size < 8) ? size : 7) : 1);