From 1244e1069ebf85d77c3dde78e48016db41ddb918 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Mon, 7 Jul 2003 20:30:51 +0000 Subject: [project @ 2003-07-07 20:30:51 by bursa] Fix some rowspan bugs. svn path=/import/netsurf/; revision=208 --- render/layout.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'render/layout.c') diff --git a/render/layout.c b/render/layout.c index 4a8bcd386..7e1349c69 100644 --- a/render/layout.c +++ b/render/layout.c @@ -674,7 +674,7 @@ void layout_table(struct box * table, unsigned long width, struct box * cont, excess_y[i] = 0; row_span_cell[i] = 0; } - + /* position cells */ for (row_group = table->children; row_group != 0; row_group = row_group->next) { unsigned long row_group_height = 0; @@ -717,13 +717,14 @@ void layout_table(struct box * table, unsigned long width, struct box * cont, if (row_span[i] == 0 && row_height < excess_y[i]) row_height = excess_y[i]; for (i = 0; i != columns; i++) { - excess_y[i] -= row_height; + if (row_height < excess_y[i]) + excess_y[i] -= row_height; + else + excess_y[i] = 0; if (row_span_cell[i] != 0) row_span_cell[i]->height += row_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; -- cgit v1.2.3