diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2009-07-13 15:37:54 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2009-07-13 15:37:54 +0000 |
commit | ed2206316ceb8fe422085a4a50c028aa7718d644 (patch) | |
tree | 536fc44b3c7f01ab8a1a1e9fbc69b6c1635a522d | |
parent | af4f3d2be7a15bfad2f0f8268d9acd2ca1d67d04 (diff) | |
download | netsurf-ed2206316ceb8fe422085a4a50c028aa7718d644.tar.gz netsurf-ed2206316ceb8fe422085a4a50c028aa7718d644.tar.bz2 |
Positioned elements are taken out of normal flow, so don't let them affect min/max width calculations.
svn path=/trunk/netsurf/; revision=8502
-rw-r--r-- | render/layout.c | 11 |
1 files changed, 11 insertions, 0 deletions
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) |