summaryrefslogtreecommitdiff
path: root/render/layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/layout.c')
-rw-r--r--render/layout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/render/layout.c b/render/layout.c
index d00cf6af4..02374e755 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -1505,7 +1505,8 @@ bool layout_line(struct box *first, int *width, int *y,
d->x += x0;
d->y = *y - d->padding[TOP];
}
- if (d->type == BOX_INLINE_BLOCK) {
+ if ((d->type == BOX_INLINE && (d->object || d->gadget)) ||
+ d->type == BOX_INLINE_BLOCK) {
d->x += x0;
d->y = *y + d->border[TOP] + d->margin[TOP];
}