diff options
Diffstat (limited to 'source/html/html-layout.c')
-rw-r--r-- | source/html/html-layout.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/html/html-layout.c b/source/html/html-layout.c index 0f304616..5a1a3157 100644 --- a/source/html/html-layout.c +++ b/source/html/html-layout.c @@ -39,7 +39,7 @@ static int iswhite(int c) return c == ' ' || c == '\t' || c == '\r' || c == '\n'; } -static void fz_free_html_flow(fz_context *ctx, fz_html_flow *flow) +static void fz_drop_html_flow(fz_context *ctx, fz_html_flow *flow) { while (flow) { @@ -163,13 +163,13 @@ static void init_box(fz_context *ctx, fz_html *box) fz_default_css_style(ctx, &box->style); } -void fz_free_html(fz_context *ctx, fz_html *box) +void fz_drop_html(fz_context *ctx, fz_html *box) { while (box) { fz_html *next = box->next; - fz_free_html_flow(ctx, box->flow_head); - fz_free_html(ctx, box->down); + fz_drop_html_flow(ctx, box->flow_head); + fz_drop_html(ctx, box->down); fz_free(ctx, box); box = next; } @@ -704,16 +704,16 @@ static void draw_flow_box(fz_context *ctx, fz_html *box, float page_top, float p color[1] = node->style->color.g / 255.0f; color[2] = node->style->color.b / 255.0f; - fz_fill_text(dev, text, ctm, fz_device_rgb(ctx), color, 1); + fz_fill_text(ctx, dev, text, ctm, fz_device_rgb(ctx), color, 1); - fz_free_text(ctx, text); + fz_drop_text(ctx, text); } else if (node->type == FLOW_IMAGE) { fz_matrix local_ctm = *ctm; fz_pre_translate(&local_ctm, node->x, node->y); fz_pre_scale(&local_ctm, node->w, node->h); - fz_fill_image(dev, node->image, &local_ctm, 1); + fz_fill_image(ctx, dev, node->image, &local_ctm, 1); } } } @@ -728,9 +728,9 @@ static void draw_rect(fz_context *ctx, fz_device *dev, const fz_matrix *ctm, flo fz_lineto(ctx, path, x0, y1); fz_closepath(ctx, path); - fz_fill_path(dev, path, 0, ctm, fz_device_rgb(ctx), rgba, rgba[3]); + fz_fill_path(ctx, dev, path, 0, ctm, fz_device_rgb(ctx), rgba, rgba[3]); - fz_free_path(ctx, path); + fz_drop_path(ctx, path); } static void draw_block_box(fz_context *ctx, fz_html *box, float page_top, float page_bot, fz_device *dev, const fz_matrix *ctm) @@ -902,8 +902,8 @@ fz_parse_html(fz_context *ctx, fz_html_font_set *set, fz_archive *zip, const cha generate_boxes(ctx, set, zip, base_uri, xml, box, css, &match); - fz_free_css(ctx, css); - fz_free_xml(ctx, xml); + fz_drop_css(ctx, css); + fz_drop_xml(ctx, xml); return box; } |