From 40a034b08fe424ed08e5b9d41b442e5409f3e2f8 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 9 Jan 2011 19:09:30 +0000 Subject: Don't clear floats if there aren't floats to clear. svn path=/trunk/netsurf/; revision=11270 --- render/layout.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'render') diff --git a/render/layout.c b/render/layout.c index 73fa18cca..52f5d1ac2 100644 --- a/render/layout.c +++ b/render/layout.c @@ -2315,8 +2315,15 @@ bool layout_line(struct box *first, int *width, int *y, place_float_below(b, *width, cx, fy, cont); fy = b->y; - if (d->style && css_computed_clear(d->style) != - CSS_CLEAR_NONE) { + if (d->style && ( + (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 * floats */ if (b->type == BOX_FLOAT_LEFT) -- cgit v1.2.3