summaryrefslogtreecommitdiff
path: root/render/layout.c
diff options
context:
space:
mode:
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;