diff options
-rw-r--r-- | include/mupdf/html.h | 12 | ||||
-rw-r--r-- | source/html/html-layout.c | 5 |
2 files changed, 10 insertions, 7 deletions
diff --git a/include/mupdf/html.h b/include/mupdf/html.h index 14966c47..830c95f8 100644 --- a/include/mupdf/html.h +++ b/include/mupdf/html.h @@ -182,19 +182,19 @@ struct fz_html_s enum { - FLOW_WORD, - FLOW_GLUE, - FLOW_BREAK, - FLOW_IMAGE, + FLOW_WORD = 0, + FLOW_GLUE = 1, + FLOW_BREAK = 2, + FLOW_IMAGE = 3 }; struct fz_html_flow_s { - int type; + unsigned int type : 2; + unsigned int expand : 1; float x, y, w, h, em; fz_css_style *style; char *text; - int expand; fz_image *image; fz_html_flow *next; }; 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) |