From ed2206316ceb8fe422085a4a50c028aa7718d644 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 13 Jul 2009 15:37:54 +0000 Subject: Positioned elements are taken out of normal flow, so don't let them affect min/max width calculations. svn path=/trunk/netsurf/; revision=8502 --- render/layout.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/render/layout.c b/render/layout.c index 6c3f0897c..96a9b6168 100644 --- a/render/layout.c +++ b/render/layout.c @@ -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) -- cgit v1.2.3