From b85fcf590fde253bb6449b6076488b5ad64e1216 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 8 Jan 2011 17:34:45 +0000 Subject: [PATCH] Table top/bottom margin is 0px when computed value is 'auto'. svn path=/trunk/netsurf/; revision=11257 --- render/layout.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/render/layout.c b/render/layout.c index bd951a252..3c610d752 100644 --- a/render/layout.c +++ b/render/layout.c @@ -3445,6 +3445,12 @@ bool layout_table(struct box *table, int available_width, } } + /* Top and bottom margins of 'auto' are set to 0. CSS2.1 10.6.3 */ + if (table->margin[TOP] == AUTO) + table->margin[TOP] = 0; + if (table->margin[BOTTOM] == AUTO) + table->margin[BOTTOM] = 0; + free(col); free(excess_y); free(row_span);