From 8c2e33b39924e1f6e02554a6db15ec1da32fdcc0 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 29 Jun 2006 19:55:08 +0000 Subject: [PATCH] Fix clipping of page background if body shorter than window height svn path=/trunk/netsurf/; revision=2675 --- render/html.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/render/html.c b/render/html.c index 7baf4ca91..b4bd25fdd 100644 --- a/render/html.c +++ b/render/html.c @@ -1050,7 +1050,8 @@ void html_object_callback(content_msg msg, struct content *object, c->status == CONTENT_STATUS_DONE) content_reformat(c, - c->available_width, 0); + c->available_width, + c->height); } break; @@ -1169,7 +1170,7 @@ void html_object_callback(content_msg msg, struct content *object, msg == CONTENT_MSG_REDIRECT || msg == CONTENT_MSG_AUTH)) { /* all objects have arrived */ - content_reformat(c, c->available_width, 0); + content_reformat(c, c->available_width, c->height); c->status = CONTENT_STATUS_DONE; content_set_status(c, messages_get("Done")); content_broadcast(c, CONTENT_MSG_DONE, data); @@ -1376,11 +1377,11 @@ void html_reformat(struct content *c, int width, int height) struct box *doc; layout_document(c, width, height); doc = c->data.html.layout; - - c->width = doc->descendant_x1 + + + c->width = doc->descendant_x1 + doc->margin[LEFT] + doc->margin[RIGHT]; - - c->height = doc->descendant_y1 + + + c->height = doc->descendant_y1 + doc->margin[TOP] + doc->margin[BOTTOM]; }