diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2009-01-20 21:36:54 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2009-01-20 21:36:54 +0000 |
commit | 9134956efe86b99abed3740fdd8c2caf7874dbf8 (patch) | |
tree | fa2b0bca03ab64dab48b209994fecca19aa71735 /render/layout.c | |
parent | 161dea3d8b0ddbb1d3076512e6ae4d71c5f8150a (diff) | |
download | netsurf-9134956efe86b99abed3740fdd8c2caf7874dbf8.tar.gz netsurf-9134956efe86b99abed3740fdd8c2caf7874dbf8.tar.bz2 |
Fix positioning of floats that come after floats with negative margins.
svn path=/trunk/netsurf/; revision=6156
Diffstat (limited to 'render/layout.c')
-rw-r--r-- | render/layout.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/render/layout.c b/render/layout.c index bf5e1b664..1c8220385 100644 --- a/render/layout.c +++ b/render/layout.c @@ -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 { |