Positioned elements are taken out of normal flow, so don't let them affect min/max width calculations.

svn path=/trunk/netsurf/; revision=8502
This commit is contained in:
Michael Drake 2009-07-13 15:37:54 +00:00
parent af4f3d2be7
commit ed2206316c
1 changed files with 11 additions and 0 deletions

View File

@ -684,6 +684,17 @@ void layout_minmax_block(struct box *block,
assert(0);
}
assert(child->max_width != UNKNOWN_MAX_WIDTH);
if (child->style &&
(child->style->position ==
CSS_POSITION_ABSOLUTE ||
child->style->position ==
CSS_POSITION_FIXED)) {
/* This child is positioned out of normal flow,
* so it will have no affect on width */
continue;
}
if (min < child->min_width)
min = child->min_width;
if (max < child->max_width)