summaryrefslogtreecommitdiff
path: root/render/box.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-03-01 20:00:41 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-03-01 20:00:41 +0000
commite3f00b8546f666498633747b8df314c242ef79bc (patch)
tree0d6833c1ccee7dcddb94349737f913f27e58cd5c /render/box.h
parent443d02b943841f6506828034731e70c71dabdaa1 (diff)
downloadnetsurf-e3f00b8546f666498633747b8df314c242ef79bc.tar.gz
netsurf-e3f00b8546f666498633747b8df314c242ef79bc.tar.bz2
Cache space widths.
svn path=/trunk/netsurf/; revision=11877
Diffstat (limited to 'render/box.h')
-rw-r--r--render/box.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/render/box.h b/render/box.h
index b4151ca3b..e49bfddd7 100644
--- a/render/box.h
+++ b/render/box.h
@@ -101,6 +101,10 @@ struct object_params;
struct object_param;
+#define UNKNOWN_WIDTH INT_MAX
+#define UNKNOWN_MAX_WIDTH INT_MAX
+
+
/** Type of a struct box. */
typedef enum {
BOX_BLOCK, BOX_INLINE_CONTAINER, BOX_INLINE,
@@ -187,8 +191,8 @@ struct box {
char *text; /**< Text, or 0 if none. Unterminated. */
size_t length; /**< Length of text. */
- /** Text is followed by a space. */
- unsigned int space : 1;
+ /** Width of space after current text (depends on font and size). */
+ int space;
/** This box is a continuation of the previous box (eg from line
* breaking). */
unsigned int clone : 1;
@@ -293,8 +297,6 @@ extern const char *TARGET_TOP;
extern const char *TARGET_BLANK;
-#define UNKNOWN_WIDTH INT_MAX
-#define UNKNOWN_MAX_WIDTH INT_MAX
void *box_style_alloc(void *ptr, size_t len, void *pw);
struct box * box_create(css_select_results *styles, css_computed_style *style,