diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2012-10-03 16:40:09 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2012-10-03 16:40:09 +0100 |
commit | b68a138c2c807559ae584bdb0bb5d392fb1f0870 (patch) | |
tree | e0d62ec111455a87db01e7dfba30e61ce0c60d2c | |
parent | ac43c2eaeaf8f30aefd3b6f2415d031d60bc69ce (diff) | |
download | netsurf-b68a138c2c807559ae584bdb0bb5d392fb1f0870.tar.gz netsurf-b68a138c2c807559ae584bdb0bb5d392fb1f0870.tar.bz2 |
More white-space:nowrap.
-rw-r--r-- | render/layout.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; |