From 188712d14214fdee7ea68eefb5ea8b70f74b7d8a Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 14 Jun 2011 21:09:38 +0000 Subject: Reformat floated iframe browser windows only after the iframe box has been linked into the box tree from the block formatting context block. svn path=/trunk/netsurf/; revision=12476 --- render/layout.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'render') diff --git a/render/layout.c b/render/layout.c index 711eb5c71..f9e1d5b2b 100644 --- a/render/layout.c +++ b/render/layout.c @@ -2497,12 +2497,8 @@ bool layout_line(struct box *first, int *width, int *y, if (b->height == AUTO) b->height = 300; - /* If the iframe's bw is in place, reformat it to the - * new box size */ - if (b->iframe) { - browser_window_reformat(b->iframe, - b->width, b->height); - } + /* We reformat the iframe browser window to new + * dimensions in pass 2 */ } else { /* form control with no object */ if (b->width == AUTO) @@ -2734,6 +2730,14 @@ bool layout_line(struct box *first, int *width, int *y, } b->next_float = cont->float_children; cont->float_children = b; + + /* If the iframe's bw is in place, reformat it to the + * new box size */ + if (b->iframe) { + browser_window_reformat(b->iframe, + b->width, b->height); + } + split_box = 0; } } -- cgit v1.2.3