diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2008-02-03 14:24:46 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2008-02-03 14:24:46 +0000 |
commit | 8491aecb353ea84c411a00baef400b8b09e84f7d (patch) | |
tree | f074b5a21379b81164ad23c59935c7c45c337e96 | |
parent | ad6fcea6b008638ca532436ecf8ba9fe7e41ffdd (diff) | |
download | netsurf-8491aecb353ea84c411a00baef400b8b09e84f7d.tar.gz netsurf-8491aecb353ea84c411a00baef400b8b09e84f7d.tar.bz2 |
Ensure min line length takes into account margins, borders and paddings of objects.
svn path=/trunk/netsurf/; revision=3827
-rw-r--r-- | render/layout.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/render/layout.c b/render/layout.c index a12029a47..ff5412434 100644 --- a/render/layout.c +++ b/render/layout.c @@ -46,8 +46,9 @@ #include "desktop/options.h" #include "render/box.h" #include "render/font.h" +#include "render/form.h" #include "render/layout.h" -#define NDEBUG +//#define NDEBUG #include "utils/log.h" #include "utils/talloc.h" #include "utils/utils.h" @@ -1601,7 +1602,7 @@ struct box *layout_minmax_line(struct box *first, continue; } - if (b->type == BOX_INLINE) { + if (b->type == BOX_INLINE && !b->object) { fixed = frac = 0; calculate_mbp_width(b->style, LEFT, &fixed, &frac); if (!b->inline_end) @@ -1699,6 +1700,10 @@ struct box *layout_minmax_line(struct box *first, else width = b->object->width; } + fixed = frac = 0; + calculate_mbp_width(b->style, LEFT, &fixed, &frac); + calculate_mbp_width(b->style, RIGHT, &fixed, &frac); + width += fixed; } else { /* form control with no object */ if (width == AUTO) |