summaryrefslogtreecommitdiff
path: root/render/box_construct.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2008-09-05 13:04:30 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2008-09-05 13:04:30 +0000
commit668dd06dc3a6eb88626d07f67a3e53ebcf434855 (patch)
treee290e7a5a15378f5164ec8938d2af1420a800764 /render/box_construct.c
parent9ea2e2c133186ac78b14cf5e51a0c13eb47d3b7a (diff)
downloadnetsurf-668dd06dc3a6eb88626d07f67a3e53ebcf434855.tar.gz
netsurf-668dd06dc3a6eb88626d07f67a3e53ebcf434855.tar.bz2
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
Diffstat (limited to 'render/box_construct.c')
-rw-r--r--render/box_construct.c10
1 files changed, 6 insertions, 4 deletions
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.