From 48ee62b660ec68ae4a905a81544b4c3f18e69a8f Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sun, 21 Nov 2004 19:45:51 +0000 Subject: [project @ 2004-11-21 19:45:51 by bursa] Take objects into account when calculating descendant boxes. svn path=/import/netsurf/; revision=1367 --- render/layout.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'render/layout.c') diff --git a/render/layout.c b/render/layout.c index 96255b540..8ab3223a9 100644 --- a/render/layout.c +++ b/render/layout.c @@ -1902,6 +1902,17 @@ void layout_calculate_descendant_bboxes(struct box *box) box->descendant_y1 = box->padding[TOP] + box->height + box->padding[BOTTOM] + box->border[BOTTOM]; + if (box->object) { + LOG(("%i %i %i %i", + box->descendant_x1, box->object->width, + box->descendant_y1, box->object->height)); + if (box->descendant_x1 < box->object->width) + box->descendant_x1 = box->object->width; + if (box->descendant_y1 < box->object->height) + box->descendant_y1 = box->object->height; + return; + } + for (child = box->children; child; child = child->next) { if (child->type == BOX_FLOAT_LEFT || child->type == BOX_FLOAT_RIGHT) -- cgit v1.2.3