summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2005-08-06 22:29:30 +0000
committerJames Bursa <james@netsurf-browser.org>2005-08-06 22:29:30 +0000
commit362a6000b4cac49ea7bbbdb678d7cdd7c93de62c (patch)
treec117edcbdd2c1ca67ac8d263252a96c17160c543
parent3b4baa8008e78ef4176964a253c0ba02a9db3ef7 (diff)
downloadnetsurf-362a6000b4cac49ea7bbbdb678d7cdd7c93de62c.tar.gz
netsurf-362a6000b4cac49ea7bbbdb678d7cdd7c93de62c.tar.bz2
[project @ 2005-08-06 22:29:30 by bursa]
Use given width as initial min/max width of fixed-width table columns. This improves the layout of certain tables with colspans. svn path=/import/netsurf/; revision=1841
-rw-r--r--render/layout.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/render/layout.c b/render/layout.c
index dc1111d70..3f8d87320 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -2159,8 +2159,13 @@ void layout_minmax_table(struct box *table)
if (table->max_width != UNKNOWN_MAX_WIDTH)
return;
- for (i = 0; i != table->columns; i++)
- col[i].min = col[i].max = 0;
+ /* start with 0 except for fixed-width columns */
+ for (i = 0; i != table->columns; i++) {
+ if (col[i].type == COLUMN_WIDTH_FIXED)
+ col[i].min = col[i].max = col[i].width;
+ else
+ col[i].min = col[i].max = 0;
+ }
/* border-spacing is used in the separated borders model */
if (table->style->border_collapse == CSS_BORDER_COLLAPSE_SEPARATE)