From 9b78daf135d7fa555990454c219649e4d54157d2 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sat, 2 Jul 2005 18:17:51 +0000 Subject: [project @ 2005-07-02 18:17:51 by bursa] Rewrite calculation of box minimum and maximum widths to improve layout of many pages. Move calculation of column types and border collapsing to box tree normalising stage, since they are layout independent. Add window height parameter to layout and make and at least window height. svn path=/import/netsurf/; revision=1777 --- render/box_normalise.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'render/box_normalise.c') diff --git a/render/box_normalise.c b/render/box_normalise.c index 22971af8c..5fd78f419 100644 --- a/render/box_normalise.c +++ b/render/box_normalise.c @@ -16,6 +16,7 @@ #include #include "netsurf/css/css.h" #include "netsurf/render/box.h" +#include "netsurf/render/table.h" #ifdef riscos #include "netsurf/desktop/gui.h" #endif @@ -267,8 +268,6 @@ bool box_normalise_table(struct box *table, struct content * c) table->rows = col_info.num_rows; free(col_info.spans); - box_normalise_table_spans(table); - if (table->children == 0) { LOG(("table->children == 0, removing")); if (table->prev == 0) @@ -278,6 +277,13 @@ bool box_normalise_table(struct box *table, struct content * c) if (table->next != 0) table->next->prev = table->prev; box_free(table); + } else { + box_normalise_table_spans(table); + if (!table_calculate_column_types(table)) + return false; + if (table->style->border_collapse == + CSS_BORDER_COLLAPSE_COLLAPSE) + table_collapse_borders(table); } LOG(("table %p done", table)); -- cgit v1.2.3