From 50a8bae10f4786a04613030994fdb60b70be3043 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 26 Jun 2006 22:00:10 +0000 Subject: Box x,y coordinates are of padding edge relative to parent; top,left,bottom,right are of margin edge relative to parent, so add margin and border width when calculating x,y from left,top. svn path=/trunk/netsurf/; revision=2652 --- render/layout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/render/layout.c b/render/layout.c index d0a69b65a..391f884b5 100644 --- a/render/layout.c +++ b/render/layout.c @@ -2572,7 +2572,7 @@ bool layout_absolute(struct box *box, struct content *content) padding[RIGHT], border[RIGHT], margin[RIGHT], right, containing_block->width)); - box->x = left; + box->x = left + margin[LEFT] + border[LEFT]; box->width = width; box->height = height; @@ -2685,7 +2685,7 @@ bool layout_absolute(struct box *box, struct content *content) padding[BOTTOM], border[BOTTOM], margin[BOTTOM], bottom, containing_block->height)); - box->y = top; + box->y = top + margin[TOP] + border[TOP]; box->height = height; return true; -- cgit v1.2.3