summaryrefslogtreecommitdiff
path: root/render/layout.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2003-10-07 21:34:39 +0000
committerJames Bursa <james@netsurf-browser.org>2003-10-07 21:34:39 +0000
commitbbcdf13fe04bc56a3671db581df40307e65b81da (patch)
tree075633c4419aace71bb76295f303f9eefffe874a /render/layout.c
parent4ccdd4c7d275b3734ea11adec95a0d28d3ddfda6 (diff)
downloadnetsurf-bbcdf13fe04bc56a3671db581df40307e65b81da.tar.gz
netsurf-bbcdf13fe04bc56a3671db581df40307e65b81da.tar.bz2
[project @ 2003-10-07 21:34:39 by bursa]
Implement white-space property. svn path=/import/netsurf/; revision=348
Diffstat (limited to 'render/layout.c')
-rw-r--r--render/layout.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/render/layout.c b/render/layout.c
index 2c3d04e05..7474f2755 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -838,7 +838,6 @@ void calculate_inline_container_widths(struct box *box)
{
struct box *child;
unsigned long min = 0, max = 0, width;
- char *word, *space;
int i, j;
for (child = box->children; child != 0; child = child->next) {
@@ -907,6 +906,11 @@ void calculate_inline_container_widths(struct box *box)
}
}
+ if (box->parent && box->parent->style &&
+ (box->parent->style->white_space == CSS_WHITE_SPACE_PRE ||
+ box->parent->style->white_space == CSS_WHITE_SPACE_NOWRAP))
+ min = max;
+
assert(min <= max);
box->min_width = min;
box->max_width = max;