summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2004-11-21 19:45:51 +0000
committerJames Bursa <james@netsurf-browser.org>2004-11-21 19:45:51 +0000
commit48ee62b660ec68ae4a905a81544b4c3f18e69a8f (patch)
tree13d7c4f62110ebfab3163a6bfb1f8b0ef5693b48
parent58401792bd4127d506c85f6352441f17e21b6e30 (diff)
downloadnetsurf-48ee62b660ec68ae4a905a81544b4c3f18e69a8f.tar.gz
netsurf-48ee62b660ec68ae4a905a81544b4c3f18e69a8f.tar.bz2
[project @ 2004-11-21 19:45:51 by bursa]
Take objects into account when calculating descendant boxes. svn path=/import/netsurf/; revision=1367
-rw-r--r--render/layout.c11
1 files changed, 11 insertions, 0 deletions
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)