[project @ 2005-07-20 22:25:56 by bursa]

Fix fixed width table min / max width calculations.

svn path=/import/netsurf/; revision=1811
This commit is contained in:
James Bursa 2005-07-20 22:25:56 +00:00
parent e24bed7715
commit 5e14874115
1 changed files with 10 additions and 0 deletions

View File

@ -2093,6 +2093,16 @@ void layout_minmax_table(struct box *table)
table_max += col[i].max;
}
/* fixed width takes priority, unless it is too narrow */
if (table->style->width.width == CSS_WIDTH_LENGTH) {
int width = css_len2px(&table->style->width.value.length,
table->style);
if (table_min < width)
table_min = width;
if (table_max < width)
table_max = width;
}
/* 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);