diff options
author | James Bursa <james@netsurf-browser.org> | 2003-10-08 20:49:57 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2003-10-08 20:49:57 +0000 |
commit | b510716c1dd2144cf1cad40b97056c72f4eaaf65 (patch) | |
tree | 67819e04bf36197c30a67c6ef2a2de3f1fd14721 /render | |
parent | 43736de9961a500f803c947c4ca1c23c5f3d0455 (diff) | |
download | netsurf-b510716c1dd2144cf1cad40b97056c72f4eaaf65.tar.gz netsurf-b510716c1dd2144cf1cad40b97056c72f4eaaf65.tar.bz2 |
[project @ 2003-10-08 20:49:57 by bursa]
Fix column width recalculation when objects are loaded.
svn path=/import/netsurf/; revision=354
Diffstat (limited to 'render')
-rw-r--r-- | render/html.c | 5 | ||||
-rw-r--r-- | render/layout.c | 7 |
2 files changed, 3 insertions, 9 deletions
diff --git a/render/html.c b/render/html.c index 568613fc8..dc6646821 100644 --- a/render/html.c +++ b/render/html.c @@ -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 || diff --git a/render/layout.c b/render/layout.c index 7474f2755..ea3ea06b7 100644 --- a/render/layout.c +++ b/render/layout.c @@ -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)); } |