[project @ 2003-10-08 20:49:57 by bursa]

Fix column width recalculation when objects are loaded.

svn path=/import/netsurf/; revision=354
This commit is contained in:
James Bursa 2003-10-08 20:49:57 +00:00
parent 43736de996
commit b510716c1d
2 changed files with 3 additions and 9 deletions

View File

@ -418,10 +418,7 @@ void html_object_callback(content_msg msg, struct content *object,
/* invalidate parent min, max widths */
if (box->parent && box->parent->max_width != UNKNOWN_MAX_WIDTH) {
struct box *b = box->parent;
if (b->min_width < object->width)
b->min_width = object->width;
if (b->max_width < object->width)
b->max_width = object->width;
b->max_width = UNKNOWN_MAX_WIDTH;
for (b = b->parent; b != 0 &&
(b->type == BOX_TABLE_ROW_GROUP ||
b->type == BOX_TABLE_ROW ||

View File

@ -931,10 +931,8 @@ void calculate_table_widths(struct box *table)
if (table->max_width != UNKNOWN_MAX_WIDTH)
return;
if (table->col)
col = table->col;
else
col = xcalloc(table->columns, sizeof(*col));
free(table->col);
table->col = col = xcalloc(table->columns, sizeof(*col));
assert(table->children != 0 && table->children->children != 0);
@ -1082,7 +1080,6 @@ void calculate_table_widths(struct box *table)
}
table->min_width = min_width;
table->max_width = max_width;
table->col = col;
LOG(("min_width %lu, max_width %lu", min_width, max_width));
}