Fix positioning of floats that come after floats with negative margins.

svn path=/trunk/netsurf/; revision=6156
This commit is contained in:
Michael Drake 2009-01-20 21:36:54 +00:00
parent 161dea3d8b
commit 9134956efe
1 changed files with 8 additions and 4 deletions

View File

@ -1836,12 +1836,16 @@ bool layout_line(struct box *first, int *width, int *y,
* Float affects current line */
if (b->type == BOX_FLOAT_LEFT) {
b->x = cx + x0;
x0 += b->width;
left = b;
if (b->width > 0) {
x0 += b->width;
left = b;
}
} else {
b->x = cx + x1 - b->width;
x1 -= b->width;
right = b;
if (b->width > 0) {
x1 -= b->width;
right = b;
}
}
b->y = cy;
} else {