Fix assertion when table has negative mbp (1579981)

svn path=/trunk/netsurf/; revision=3222
This commit is contained in:
John Mark Bell 2007-03-25 16:20:10 +00:00
parent cabed36421
commit a96ef2a906
1 changed files with 4 additions and 0 deletions

View File

@ -2358,6 +2358,10 @@ void layout_minmax_table(struct box *table)
/* add margins, border, padding to min, max widths */
calculate_mbp_width(table->style, LEFT, &extra_fixed, &extra_frac);
calculate_mbp_width(table->style, RIGHT, &extra_fixed, &extra_frac);
if (extra_fixed < 0)
extra_fixed = 0;
if (extra_frac < 0)
extra_frac = 0;
if (1.0 <= extra_frac)
extra_frac = 0.9;
table->min_width = (table_min + extra_fixed) / (1.0 - extra_frac);