mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-17 06:54:42 +03:00
[project @ 2003-07-02 14:31:37 by bursa]
Table layout tweaks (news.google.com). svn path=/import/netsurf/; revision=200
This commit is contained in:
parent
176d6f8f3d
commit
1bcaf2d794
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user