From 4d19457c59fa911743137277d312ac2935293f8b Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 28 Jun 2011 19:42:31 +0000 Subject: Prevent iframes with display:inline and percentage width from getting a width of AUTO during minmax layout phase. svn path=/trunk/netsurf/; revision=12528 --- render/layout.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'render/layout.c') diff --git a/render/layout.c b/render/layout.c index 81a4df802..c676af789 100644 --- a/render/layout.c +++ b/render/layout.c @@ -3192,6 +3192,10 @@ struct box *layout_minmax_line(struct box *first, if (0 < width + fixed) width += fixed; } else if (b->flags & IFRAME) { + /* TODO: handle percentage widths properly */ + if (width == AUTO) + width = 400; + fixed = frac = 0; calculate_mbp_width(b->style, LEFT, true, true, true, &fixed, &frac); @@ -3231,7 +3235,8 @@ struct box *layout_minmax_line(struct box *first, #endif assert(b != first); - assert(0 <= *line_min && *line_min <= *line_max); + assert(0 <= *line_min); + assert(*line_min <= *line_max); return b; } -- cgit v1.2.3