summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-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)