Ensure min line length takes into account margins, borders and paddings of objects.

svn path=/trunk/netsurf/; revision=3827
This commit is contained in:
Michael Drake 2008-02-03 14:24:46 +00:00
parent ad6fcea6b0
commit 8491aecb35
1 changed files with 7 additions and 2 deletions

View File

@ -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)