From 9125bd1fa4aa636ec3497fed9a7622257490d383 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 24 Feb 2011 15:45:10 +0000 Subject: Apply margin before clear. svn path=/trunk/netsurf/; revision=11786 --- render/layout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'render/layout.c') diff --git a/render/layout.c b/render/layout.c index fc21ef284..f8f7e16ed 100644 --- a/render/layout.c +++ b/render/layout.c @@ -365,8 +365,8 @@ bool layout_block_context(struct box *block, int viewport_height, * floats. */ int x0, x1, top; struct box *left, *right; - top = cy > y ? cy : y; - top += max_pos_margin - max_neg_margin; + top = cy + max_pos_margin - max_neg_margin; + top = (top > y) ? top : y; x0 = cx; x1 = cx + box->parent->width - box->parent->padding[LEFT] - -- cgit v1.2.3