Don't clear floats if there aren't floats to clear.

svn path=/trunk/netsurf/; revision=11270
This commit is contained in:
Michael Drake 2011-01-09 19:09:30 +00:00
parent 4f75b67cdd
commit 40a034b08f

View File

@ -2315,8 +2315,15 @@ bool layout_line(struct box *first, int *width, int *y,
place_float_below(b, *width, cx, fy, cont); place_float_below(b, *width, cx, fy, cont);
fy = b->y; fy = b->y;
if (d->style && css_computed_clear(d->style) != if (d->style && (
CSS_CLEAR_NONE) { (css_computed_clear(d->style) ==
CSS_CLEAR_LEFT && left != 0) ||
(css_computed_clear(d->style) ==
CSS_CLEAR_RIGHT &&
right != 0) ||
(css_computed_clear(d->style) ==
CSS_CLEAR_BOTH &&
(left != 0 || right != 0)))) {
/* to be cleared below existing /* to be cleared below existing
* floats */ * floats */
if (b->type == BOX_FLOAT_LEFT) if (b->type == BOX_FLOAT_LEFT)