From 668dd06dc3a6eb88626d07f67a3e53ebcf434855 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 5 Sep 2008 13:04:30 +0000 Subject: Add comments and change height attribute handling on TR to only alter the height if attribute height is greater than current height. svn path=/trunk/netsurf/; revision=5259 --- render/box_construct.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'render') diff --git a/render/box_construct.c b/render/box_construct.c index f65270e9c..8df7ba016 100644 --- a/render/box_construct.c +++ b/render/box_construct.c @@ -578,12 +578,14 @@ bool box_construct_element(xmlNode *n, struct content *content, float current; for (child = box->children; child; child = child->next) { - if (child->type == BOX_TABLE_CELL) { - current = css_len2px( + current = css_len2px( &child->style->height. length, child->style); - value = (value > current) ? - value : current; + if (child->type == BOX_TABLE_CELL && + value > current) { + /* Row height exceeds cell + * height, increase cell height + * to row height */ child->style->height.height = CSS_HEIGHT_LENGTH; child->style->height.length. -- cgit v1.2.3