From a99a5bdd707f27c9fb9a92a18f94830d710a7bee Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 28 Apr 2009 20:13:10 +0000 Subject: Move handling of TR height attribute from box construction to layout and add support for height property on TR. svn path=/trunk/netsurf/; revision=7358 --- render/layout.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'render/layout.c') diff --git a/render/layout.c b/render/layout.c index 05b668aad..fd53995b8 100644 --- a/render/layout.c +++ b/render/layout.c @@ -2772,6 +2772,11 @@ bool layout_table(struct box *table, int available_width, int row_group_height = 0; for (row = row_group->children; row; row = row->next) { int row_height = 0; + if (row->style->height.height == CSS_HEIGHT_LENGTH) { + row_height = (int) css_len2px(&row->style-> + height.value.length, + row->style); + } for (c = row->children; c; c = c->next) { assert(c->style); c->width = xs[c->start_column + c->columns] - @@ -2807,6 +2812,10 @@ bool layout_table(struct box *table, int available_width, if (c->height < h) c->height = h; } + /* specified row height is treated as a minimum + */ + if (c->height < row_height) + c->height = row_height; c->x = xs[c->start_column] + c->border[LEFT]; c->y = c->border[TOP]; for (i = 0; i != c->columns; i++) { -- cgit v1.2.3