summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-01-15 15:37:51 +0000
committerRobin Watts <robin.watts@artifex.com>2016-01-18 19:25:12 +0000
commit45e23e195c7f328121303ebefd3375528eb821bb (patch)
tree166a045e1792ecfe1218a215b5572452b6556201 /source
parentc4fde0dc08514e2a268daf5909e29b65d89bb0d1 (diff)
downloadmupdf-45e23e195c7f328121303ebefd3375528eb821bb.tar.xz
Move fz_html_flow to use a bitfield.
Saves a bit of memory, and prepares for the addition of later fields (such as direction).
Diffstat (limited to 'source')
-rw-r--r--source/html/html-layout.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/html/html-layout.c b/source/html/html-layout.c
index f9c34bc3..ad3dd621 100644
--- a/source/html/html-layout.c
+++ b/source/html/html-layout.c
@@ -77,6 +77,9 @@ static fz_html_flow *add_flow(fz_context *ctx, fz_pool *pool, fz_html *top, fz_c
{
fz_html_flow *flow = fz_pool_alloc(ctx, pool, sizeof *flow);
flow->type = type;
+ flow->expand = 0;
+ flow->char_r2l = 0;
+ flow->block_r2l = 0;
flow->style = style;
*top->flow_tail = flow;
top->flow_tail = &flow->next;
@@ -87,7 +90,7 @@ static void add_flow_glue(fz_context *ctx, fz_pool *pool, fz_html *top, fz_css_s
{
fz_html_flow *flow = add_flow(ctx, pool, top, style, FLOW_GLUE);
flow->text = (char*)text;
- flow->expand = expand;
+ flow->expand = !!expand;
}
static void add_flow_break(fz_context *ctx, fz_pool *pool, fz_html *top, fz_css_style *style)