summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2008-01-27 17:39:14 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2008-01-27 17:39:14 +0000
commitb2b6fa0f10ebc527eb0e43ca56758753e81ddf29 (patch)
tree0793bd506350a9bf30695da5fa7267a66d15fd73 /render
parent053f2f830cef0dc63667ad1026ed7273c2007eb3 (diff)
downloadnetsurf-b2b6fa0f10ebc527eb0e43ca56758753e81ddf29.tar.gz
netsurf-b2b6fa0f10ebc527eb0e43ca56758753e81ddf29.tar.bz2
Make inline-blocks have margins. Add defualt margin around form inputs.
svn path=/trunk/netsurf/; revision=3779
Diffstat (limited to 'render')
-rw-r--r--render/layout.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/render/layout.c b/render/layout.c
index 31a18cdee..39f7a8995 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -1081,7 +1081,6 @@ bool layout_line(struct box *first, int *width, int *y,
if (b->width == UNKNOWN_WIDTH)
if (!layout_float(b, *width, content))
return false;
- /** \todo should margin be included? spec unclear */
h = b->border[TOP] + b->padding[TOP] + b->height +
b->padding[BOTTOM] + b->border[BOTTOM];
if (height < h)
@@ -1508,7 +1507,7 @@ bool layout_line(struct box *first, int *width, int *y,
}
if (d->type == BOX_INLINE_BLOCK) {
d->x += x0;
- d->y = *y + d->border[TOP];
+ d->y = *y + d->border[TOP] + d->margin[TOP];
}
if (d->type == BOX_INLINE_BLOCK &&
(d->style->position == CSS_POSITION_ABSOLUTE ||
@@ -1516,8 +1515,9 @@ bool layout_line(struct box *first, int *width, int *y,
continue;
if ((d->type == BOX_INLINE && (d->object || d->gadget)) ||
d->type == BOX_INLINE_BLOCK) {
- h = d->border[TOP] + d->padding[TOP] + d->height +
- d->padding[BOTTOM] + d->border[BOTTOM];
+ h = d->margin[TOP] + d->border[TOP] + d->padding[TOP] +
+ d->height + d->padding[BOTTOM] +
+ d->border[BOTTOM] + d->margin[BOTTOM];
if (used_height < h)
used_height = h;
}