summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-02-10 12:19:13 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2013-02-10 12:19:13 +0000
commitf98c0d848cb86aa26087dac6756aceaffb943237 (patch)
tree41fb7be927c802f2fae71bbca76d08580129cfa7
parent2a4b9b2217bd2931b6cd615f7d4727ae24a8c35c (diff)
downloadnetsurf-f98c0d848cb86aa26087dac6756aceaffb943237.tar.gz
netsurf-f98c0d848cb86aa26087dac6756aceaffb943237.tar.bz2
Make nowrap code path a bit plainer.
-rw-r--r--render/layout.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/render/layout.c b/render/layout.c
index 25d6c2448..44f92aeb1 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -2706,7 +2706,7 @@ bool layout_line(struct box *first, int *width, int *y,
x = x_previous;
- if ((split_box->type == BOX_INLINE ||
+ if (!no_wrap && (split_box->type == BOX_INLINE ||
split_box->type == BOX_TEXT) &&
!split_box->object &&
!(split_box->flags & REPLACE_DIM) &&
@@ -2725,10 +2725,10 @@ bool layout_line(struct box *first, int *width, int *y,
space = i;
}
- /* space != 0 implies split_box->text != 0
+ /* space != 0 implies split_box->text != NULL
* and that there is a place we could split the text at */
- if (space == 0 || no_wrap)
+ if (space == 0)
w = split_box->width;
else {
/* find width of the text to where we could split */
@@ -2750,7 +2750,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 || no_wrap) {
+ if (space == 0) {
/* only one word in this box, or not text
* or white-space:nowrap */
b = split_box->next;