summaryrefslogtreecommitdiff
path: root/render/layout.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2003-03-08 21:25:56 +0000
committerJames Bursa <james@netsurf-browser.org>2003-03-08 21:25:56 +0000
commite517a39dfbaf633ec449dab351bca094e6be4239 (patch)
treee62b94ded0c36f9d563b6afc9ed347e32d0684bc /render/layout.c
parentd3265936b9121353af2220b7048eaff46cbe5ccb (diff)
downloadnetsurf-e517a39dfbaf633ec449dab351bca094e6be4239.tar.gz
netsurf-e517a39dfbaf633ec449dab351bca094e6be4239.tar.bz2
[project @ 2003-03-08 21:25:56 by bursa]
Cell height changes. svn path=/import/netsurf/; revision=106
Diffstat (limited to 'render/layout.c')
-rw-r--r--render/layout.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/render/layout.c b/render/layout.c
index a74dda48a..25f27844d 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -1,5 +1,5 @@
/**
- * $Id: layout.c,v 1.34 2003/03/04 11:59:35 bursa Exp $
+ * $Id: layout.c,v 1.35 2003/03/08 21:25:56 bursa Exp $
*/
#include <assert.h>
@@ -657,12 +657,20 @@ void layout_table(struct box * table, unsigned long width, struct box * cont,
c->width = xs[i + c->columns] - xs[i];
c->float_children = 0;
c->height = layout_block_children(c, c->width, c, 0, 0);
- if (c->style->height.height == CSS_HEIGHT_LENGTH)
- c->height = len(&c->style->height.length, c->style);
+ if (c->style->height.height == CSS_HEIGHT_LENGTH) {
+ /* some sites use height="1" or similar to attempt
+ * to make cells as small as possible, so treat
+ * it as a minimum */
+ unsigned long h = len(&c->style->height.length, c->style);
+ if (c->height < h)
+ c->height = h;
+ }
c->x = xs[i];
c->y = 0;
if (c->height > row_height) row_height = c->height;
}
+ for (c = row->children; c != 0; c = c->next)
+ c->height = row_height;
row->x = 0;
row->y = row_group_height;
row->width = table_width;