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
This commit is contained in:
Michael Drake 2011-06-14 21:09:38 +00:00
parent 319a90bff7
commit 188712d142
1 changed files with 10 additions and 6 deletions

View File

@ -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;
}
}