diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2011-06-28 19:42:31 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2011-06-28 19:42:31 +0000 |
commit | 4d19457c59fa911743137277d312ac2935293f8b (patch) | |
tree | 0f5711a0e31ff5f8e0349752ebbd7582bf91267f | |
parent | 079c13872139d737f687f7a4ebb2830fa0b17ceb (diff) | |
download | netsurf-4d19457c59fa911743137277d312ac2935293f8b.tar.gz netsurf-4d19457c59fa911743137277d312ac2935293f8b.tar.bz2 |
Prevent iframes with display:inline and percentage width from getting a width of AUTO during minmax layout phase.
svn path=/trunk/netsurf/; revision=12528
-rw-r--r-- | render/layout.c | 7 |
1 files changed, 6 insertions, 1 deletions
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; } |