diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2008-01-27 11:59:01 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2008-01-27 11:59:01 +0000 |
commit | 053f2f830cef0dc63667ad1026ed7273c2007eb3 (patch) | |
tree | 00522afbb3bb029d1165e1aa762219da0d9ff343 /render/layout.c | |
parent | 252aa870f8b13e0ed1753f23d823a8d93b646e6d (diff) | |
download | netsurf-053f2f830cef0dc63667ad1026ed7273c2007eb3.tar.gz netsurf-053f2f830cef0dc63667ad1026ed7273c2007eb3.tar.bz2 |
Hopefully fix inline-block positioning. (Stops form elements from overlapping.)
svn path=/trunk/netsurf/; revision=3778
Diffstat (limited to 'render/layout.c')
-rw-r--r-- | render/layout.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/render/layout.c b/render/layout.c index fdf3856d1..31a18cdee 100644 --- a/render/layout.c +++ b/render/layout.c @@ -1500,12 +1500,16 @@ bool layout_line(struct box *first, int *width, int *y, } for (d = first; d != b; d = d->next) { - if (d->type == BOX_INLINE || d->type == BOX_INLINE_BLOCK || - d->type == BOX_BR || d->type == BOX_TEXT || + if (d->type == BOX_INLINE || d->type == BOX_BR || + d->type == BOX_TEXT || d->type == BOX_INLINE_END) { d->x += x0; d->y = *y - d->padding[TOP]; } + if (d->type == BOX_INLINE_BLOCK) { + d->x += x0; + d->y = *y + d->border[TOP]; + } if (d->type == BOX_INLINE_BLOCK && (d->style->position == CSS_POSITION_ABSOLUTE || d->style->position == CSS_POSITION_FIXED)) |