diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2011-03-01 20:00:41 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2011-03-01 20:00:41 +0000 |
commit | e3f00b8546f666498633747b8df314c242ef79bc (patch) | |
tree | 0d6833c1ccee7dcddb94349737f913f27e58cd5c /render/box_construct.c | |
parent | 443d02b943841f6506828034731e70c71dabdaa1 (diff) | |
download | netsurf-e3f00b8546f666498633747b8df314c242ef79bc.tar.gz netsurf-e3f00b8546f666498633747b8df314c242ef79bc.tar.bz2 |
Cache space widths.
svn path=/trunk/netsurf/; revision=11877
Diffstat (limited to 'render/box_construct.c')
-rw-r--r-- | render/box_construct.c | 7 |
1 files changed, 4 insertions, 3 deletions
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 { |