From e3f00b8546f666498633747b8df314c242ef79bc Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 1 Mar 2011 20:00:41 +0000 Subject: Cache space widths. svn path=/trunk/netsurf/; revision=11877 --- render/box_construct.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'render/box_construct.c') diff --git a/render/box_construct.c b/render/box_construct.c index 6f91629fd..092edb3ba 100644 --- a/render/box_construct.c +++ b/render/box_construct.c @@ -718,7 +718,8 @@ bool box_construct_text(xmlNode *n, struct content *content, assert((*inline_container)->last != 0); - (*inline_container)->last->space = 1; + (*inline_container)->last->space = + UNKNOWN_WIDTH; } free(text); @@ -759,7 +760,7 @@ bool box_construct_text(xmlNode *n, struct content *content, /* strip ending space char off */ if (box->length > 1 && box->text[box->length - 1] == ' ') { - box->space = 1; + box->space = UNKNOWN_WIDTH; box->length--; } @@ -797,7 +798,7 @@ bool box_construct_text(xmlNode *n, struct content *content, memmove(box->text, &box->text[1], box->length); if (box->prev != NULL) - box->prev->space = 1; + box->prev->space = UNKNOWN_WIDTH; } } else { -- cgit v1.2.3