[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
This commit is contained in:
Daniel Silverstone 2006-03-26 22:43:22 +00:00
parent f81dfb186a
commit 0f13799768

View File

@ -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];
}