From 0f13799768d338e4a2d5736a7de688d65c0b10b4 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sun, 26 Mar 2006 22:43:22 +0000 Subject: [PATCH] [project @ 2006-03-26 22:43:22 by dsilvers] First pass at fixing the bug shown by margintest.html in netsurftest svn path=/import/netsurf/; revision=2187 --- render/html.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/render/html.c b/render/html.c index d6a4eff41..7724f8b35 100644 --- a/render/html.c +++ b/render/html.c @@ -1367,9 +1367,17 @@ void html_stop(struct content *c) void html_reformat(struct content *c, int width, int height) { + struct box *doc; layout_document(c, width, height); - c->width = c->data.html.layout->descendant_x1; - c->height = c->data.html.layout->descendant_y1; + doc = c->data.html.layout; + + c->width = doc->descendant_x1 + + doc->margin[LEFT] + doc->margin[RIGHT] + + doc->border[LEFT] + doc->border[RIGHT]; + + c->height = doc->descendant_y1 + + doc->margin[TOP] + doc->margin[BOTTOM] + + doc->border[TOP] + doc->border[BOTTOM]; }