summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-01-02 12:46:17 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2013-01-02 12:46:17 +0000
commit8bf3346ce24cdc889b7b52858ee2724229cb6a7d (patch)
tree43bb455f099a374244a65a952cb18b8f542a4f69 /render
parent33934e12713f2ba8f5369a27f6abf725862f1a18 (diff)
downloadnetsurf-8bf3346ce24cdc889b7b52858ee2724229cb6a7d.tar.gz
netsurf-8bf3346ce24cdc889b7b52858ee2724229cb6a7d.tar.bz2
Fix min_max line width calc to include box spaces.
Diffstat (limited to 'render')
-rw-r--r--render/layout.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/render/layout.c b/render/layout.c
index 702cc03c6..331e1efdb 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -3045,11 +3045,15 @@ struct box *layout_minmax_line(struct box *first,
&fixed, &frac);
if (0 < fixed)
max += fixed;
- if (b->next && b->space == UNKNOWN_WIDTH) {
- font_func->font_width(&fstyle, " ", 1,
- &b->space);
+
+ if (b->next) {
+ if (b->space == UNKNOWN_WIDTH) {
+ font_func->font_width(&fstyle, " ", 1,
+ &b->space);
+ }
max += b->space;
}
+
*line_has_height = true;
continue;
}
@@ -3095,9 +3099,11 @@ struct box *layout_minmax_line(struct box *first,
}
}
max += b->width;
- if (b->next && b->space == UNKNOWN_WIDTH) {
- font_func->font_width(&fstyle, " ", 1,
- &b->space);
+ if (b->next) {
+ if (b->space == UNKNOWN_WIDTH) {
+ font_func->font_width(&fstyle, " ", 1,
+ &b->space);
+ }
max += b->space;
}