From b68a138c2c807559ae584bdb0bb5d392fb1f0870 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 3 Oct 2012 16:40:09 +0100 Subject: More white-space:nowrap. --- render/layout.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'render') diff --git a/render/layout.c b/render/layout.c index 1b2e43b6e..ead01acf0 100644 --- a/render/layout.c +++ b/render/layout.c @@ -2699,6 +2699,8 @@ bool layout_line(struct box *first, int *width, int *y, unsigned int i; size_t space = 0; int w; + bool no_wrap = css_computed_white_space( + split_box->style) == CSS_WHITE_SPACE_NOWRAP; x = x_previous; @@ -2723,7 +2725,7 @@ bool layout_line(struct box *first, int *width, int *y, /* space != 0 implies split_box->text != 0 */ - if (space == 0) + if (space == 0 || no_wrap) w = split_box->width; else { font_plot_style_from_css(split_box->style, &fstyle); @@ -2744,9 +2746,7 @@ bool layout_line(struct box *first, int *width, int *y, !left && !right && inline_count == 1) { /* first word of box doesn't fit, but no floats and * first box on line so force in */ - if (space == 0 || css_computed_white_space( - split_box->style) == - CSS_WHITE_SPACE_NOWRAP) { + if (space == 0 || no_wrap) { /* only one word in this box, or not text * or white-space:nowrap */ b = split_box->next; -- cgit v1.2.3