diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2017-12-07 15:15:26 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-12-13 15:01:05 +0100 |
commit | eacd070190d0c7a7fbc905a2a292f38e282b5a82 (patch) | |
tree | 57971ec5acec6b5867cc313c3d2f6f6f619e35fe /source/xps/xps-tile.c | |
parent | fa9cd085533f68367c299e058ab3fbb7ad8a2dc6 (diff) | |
download | mupdf-eacd070190d0c7a7fbc905a2a292f38e282b5a82.tar.xz |
Parse XML using pool allocator.
This needs adding a fz_xml_doc type to hold the pool.
Diffstat (limited to 'source/xps/xps-tile.c')
-rw-r--r-- | source/xps/xps-tile.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/xps/xps-tile.c b/source/xps/xps-tile.c index f0e196a0..3e144123 100644 --- a/source/xps/xps-tile.c +++ b/source/xps/xps-tile.c @@ -331,7 +331,7 @@ xps_parse_canvas(fz_context *ctx, xps_document *doc, const fz_matrix *ctm, const void xps_parse_fixed_page(fz_context *ctx, xps_document *doc, const fz_matrix *ctm, xps_page *page) { - fz_xml *node; + fz_xml *root, *node; xps_resource *dict; char base_uri[1024]; fz_rect area; @@ -348,7 +348,8 @@ xps_parse_fixed_page(fz_context *ctx, xps_document *doc, const fz_matrix *ctm, x doc->opacity_top = 0; doc->opacity[0] = 1; - if (!page->root) + root = fz_xml_root(page->xml); + if (!root) return; area = fz_unit_rect; @@ -356,7 +357,7 @@ xps_parse_fixed_page(fz_context *ctx, xps_document *doc, const fz_matrix *ctm, x fz_try(ctx) { - for (node = fz_xml_down(page->root); node; node = fz_xml_next(node)) + for (node = fz_xml_down(root); node; node = fz_xml_next(node)) { if (fz_xml_is_tag(node, "FixedPage.Resources") && fz_xml_down(node)) { |