diff options
author | James Bursa <james@netsurf-browser.org> | 2003-07-18 21:02:01 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2003-07-18 21:02:01 +0000 |
commit | d6053c3cb00772dc1c1f5422f0cdb7cdff03beb4 (patch) | |
tree | d543ccc62a2ae10851b01df3e6c5f3735d4d8b67 /render | |
parent | afd675a5a8bc77ce73d8dce959c3ddb387e684a0 (diff) | |
download | netsurf-d6053c3cb00772dc1c1f5422f0cdb7cdff03beb4.tar.gz netsurf-d6053c3cb00772dc1c1f5422f0cdb7cdff03beb4.tar.bz2 |
[project @ 2003-07-18 21:02:01 by bursa]
Fix table positioning.
svn path=/import/netsurf/; revision=234
Diffstat (limited to 'render')
-rw-r--r-- | render/layout.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/render/layout.c b/render/layout.c index 689490fc6..6ebc589f2 100644 --- a/render/layout.c +++ b/render/layout.c @@ -574,6 +574,7 @@ void layout_table(struct box * table, unsigned long width, struct box * cont, unsigned int *row_span, *excess_y, min; unsigned long x0; unsigned long x1; + unsigned long cy1; struct box *left; struct box *right; struct box *c; @@ -750,10 +751,11 @@ void layout_table(struct box * table, unsigned long width, struct box * cont, table->height = table_height; /* find sides and move table down if it doesn't fit in available width */ + cy1 = cy; while (1) { x0 = 0; x1 = width; - find_sides(cont->float_children, cy, cy + table_height, + find_sides(cont->float_children, cy1, cy1 + table_height, &x0, &x1, &left, &right); if (table_width <= x1 - x0) break; @@ -761,16 +763,16 @@ void layout_table(struct box * table, unsigned long width, struct box * cont, break; /* move down to the next place where the space may increase */ if (left == 0) - cy = right->y + right->height + 1; + cy1 = right->y + right->height + 1; else if (right == 0) - cy = left->y + left->height + 1; + cy1 = left->y + left->height + 1; else if (left->y + left->height < right->y + right->height) - cy = left->y + left->height + 1; + cy1 = left->y + left->height + 1; else - cy = right->y + right->height + 1; + cy1 = right->y + right->height + 1; } table->x = x0; - table->y = cy; + table->y += cy1 - cy; } |