diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-12-14 15:30:13 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-12-16 02:16:58 +0100 |
commit | cb96a2d638b2b227b54c3b963b30ec26f2265ab5 (patch) | |
tree | 255dc17de0cf068bdc15008f35f9eaf5fee2d3a4 /source | |
parent | 845875985942c1df3db94e7b73fccdc413c25a63 (diff) | |
download | mupdf-cb96a2d638b2b227b54c3b963b30ec26f2265ab5.tar.xz |
Fix 697355: Use @page background color.
Diffstat (limited to 'source')
-rw-r--r-- | source/html/html-layout.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/html/html-layout.c b/source/html/html-layout.c index 547ecf96..379cd3e8 100644 --- a/source/html/html-layout.c +++ b/source/html/html-layout.c @@ -1869,6 +1869,7 @@ fz_draw_html(fz_context *ctx, fz_device *dev, const fz_matrix *ctm, fz_html *htm { fz_matrix local_ctm = *ctm; hb_buffer_t *hb_buf = NULL; + fz_html_box *box; int unlocked = 0; float page_top = page * html->page_h; float page_bot = (page + 1) * html->page_h; @@ -1876,6 +1877,11 @@ fz_draw_html(fz_context *ctx, fz_device *dev, const fz_matrix *ctm, fz_html *htm fz_var(hb_buf); fz_var(unlocked); + draw_rect(ctx, dev, ctm, html->root->style.background_color, + 0, 0, + html->page_w + html->page_margin[L] + html->page_margin[R], + html->page_h + html->page_margin[T] + html->page_margin[B]); + fz_pre_translate(&local_ctm, html->page_margin[L], html->page_margin[T] - page_top); hb_lock(ctx); @@ -1884,7 +1890,9 @@ fz_draw_html(fz_context *ctx, fz_device *dev, const fz_matrix *ctm, fz_html *htm hb_buf = hb_buffer_create(); hb_unlock(ctx); unlocked = 1; - draw_block_box(ctx, html->root, page_top, page_bot, dev, &local_ctm, hb_buf); + + for (box = html->root->down; box; box = box->next) + draw_block_box(ctx, box, page_top, page_bot, dev, &local_ctm, hb_buf); } fz_always(ctx) { |