diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-03-10 14:17:35 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-03-10 14:17:35 +0000 |
commit | 9468e4abbead228791534f85066c3e062538735d (patch) | |
tree | 2de5a68553b87272ac9f42dc91f50dd2b1d1cf0a /render/layout.c | |
parent | 9d3b7b43fd7852ca2736ec9862f30f9d3cdf43aa (diff) | |
download | netsurf-9468e4abbead228791534f85066c3e062538735d.tar.gz netsurf-9468e4abbead228791534f85066c3e062538735d.tar.bz2 |
Take account of any table height specified through CSS or HTML.
svn path=/trunk/netsurf/; revision=3918
Diffstat (limited to 'render/layout.c')
-rw-r--r-- | render/layout.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/render/layout.c b/render/layout.c index 6e3dba0f3..75bee92f5 100644 --- a/render/layout.c +++ b/render/layout.c @@ -2386,7 +2386,16 @@ bool layout_table(struct box *table, int available_width, free(xs); table->width = table_width; - table->height = table_height; + + /* Take account of any table height specified within CSS/HTML */ + if (style->height.height == CSS_HEIGHT_LENGTH) { + /* This is the minimum height for the table (see 17.5.3) */ + int min_height = css_len2px(&style->height.length, style); + + table->height = max(table_height, min_height); + } else { + table->height = table_height; + } return true; } |