diff options
author | James Bursa <james@netsurf-browser.org> | 2003-07-02 14:31:37 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2003-07-02 14:31:37 +0000 |
commit | 1bcaf2d794b8d26115aea58b3943368a2d380c2e (patch) | |
tree | 49d3731ac97fc861d363fcfea88ad710589a8ccb /render | |
parent | 176d6f8f3d25b26b82580793b737fce0090d8fdc (diff) | |
download | netsurf-1bcaf2d794b8d26115aea58b3943368a2d380c2e.tar.gz netsurf-1bcaf2d794b8d26115aea58b3943368a2d380c2e.tar.bz2 |
[project @ 2003-07-02 14:31:37 by bursa]
Table layout tweaks (news.google.com).
svn path=/import/netsurf/; revision=200
Diffstat (limited to 'render')
-rw-r--r-- | render/layout.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/render/layout.c b/render/layout.c index 56cc2f12d..f2bd019c9 100644 --- a/render/layout.c +++ b/render/layout.c @@ -840,7 +840,7 @@ void calculate_inline_container_widths(struct box *box) void calculate_table_widths(struct box *table) { - unsigned int i; + unsigned int i, pass; struct box *row_group, *row, *cell; unsigned long width, min_width = 0, max_width = 0; struct column *col = xcalloc(table->columns, sizeof(*col)); @@ -848,6 +848,7 @@ void calculate_table_widths(struct box *table) LOG(("table %p, columns %u", table, table->columns)); assert(table->children != 0 && table->children->children != 0); + for (pass = 1; pass != 3; pass++) { for (row_group = table->children; row_group != 0; row_group = row_group->next) { assert(row_group->type == BOX_TABLE_ROW_GROUP); for (row = row_group->children; row != 0; row = row->next) { @@ -857,6 +858,11 @@ void calculate_table_widths(struct box *table) unsigned int j, flexible_columns = 0; unsigned long min = 0, max = 0, extra; + /* consider cells with colspan 1 in 1st pass, rest + * in 2nd pass */ + if (pass != cell->columns) + continue; + assert(cell->type == BOX_TABLE_CELL); assert(cell->style != 0); @@ -940,6 +946,7 @@ void calculate_table_widths(struct box *table) } } } + } for (i = 0; i < table->columns; i++) { LOG(("col %u, type %i, min %lu, max %lu, width %lu", |