From 28dc80a3a558b7ee49b40211eb8adbc7853212a6 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 5 Mar 2011 23:03:44 +0000 Subject: Esimated width is fine for last box. svn path=/trunk/netsurf/; revision=11922 --- render/layout.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'render') diff --git a/render/layout.c b/render/layout.c index d6e47257b..ca22ca36f 100644 --- a/render/layout.c +++ b/render/layout.c @@ -2182,9 +2182,11 @@ bool layout_line(struct box *first, int *width, int *y, /* If the current text has not been measured (i.e. its * width was estimated after splitting), and it fits on - * the line, measure it properly. */ + * the line, measure it properly, so next box is placed + * correctly. */ if (b->text && (x + b->width < x1 - x0) && - !(b->flags & MEASURED)) { + !(b->flags & MEASURED) && + b->next) { font_func->font_width(&fstyle, b->text, b->length, &b->width); b->flags |= MEASURED; -- cgit v1.2.3