diff options
author | James Bursa <james@netsurf-browser.org> | 2005-07-20 22:25:56 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2005-07-20 22:25:56 +0000 |
commit | 5e148741154019d69338c0f8781ed8a084cdd53d (patch) | |
tree | 24e9d9bc13b72faa093833038d7a72dad852229e /render/layout.c | |
parent | e24bed7715a35038bcbe91b2b960a8d346147e7c (diff) | |
download | netsurf-5e148741154019d69338c0f8781ed8a084cdd53d.tar.gz netsurf-5e148741154019d69338c0f8781ed8a084cdd53d.tar.bz2 |
[project @ 2005-07-20 22:25:56 by bursa]
Fix fixed width table min / max width calculations.
svn path=/import/netsurf/; revision=1811
Diffstat (limited to 'render/layout.c')
-rw-r--r-- | render/layout.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/render/layout.c b/render/layout.c index efedac3e2..9d8d4e6cc 100644 --- a/render/layout.c +++ b/render/layout.c @@ -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); |