summaryrefslogtreecommitdiff
path: root/source/html/epub-doc.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-07-20 20:04:17 +0100
committerTor Andersson <tor.andersson@artifex.com>2018-03-22 14:58:01 +0100
commit4987023bc163939687c2ceed2f7b2a2503893fb7 (patch)
tree1561946bccf4fb8b5dd60a7a0fa037884318f1da /source/html/epub-doc.c
parentf11c41bd07e0015cf144f50e3a3ccdbd3844f8a1 (diff)
downloadmupdf-4987023bc163939687c2ceed2f7b2a2503893fb7.tar.xz
html: Keep 'b' instead of 'h' in boxes.
Diffstat (limited to 'source/html/epub-doc.c')
-rw-r--r--source/html/epub-doc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/html/epub-doc.c b/source/html/epub-doc.c
index 91d6e6b5..0729e438 100644
--- a/source/html/epub-doc.c
+++ b/source/html/epub-doc.c
@@ -92,7 +92,7 @@ epub_layout(fz_context *ctx, fz_document *doc_, float w, float h, float em)
{
ch->start = count;
fz_layout_html(ctx, ch->html, w, h, em);
- count += ceilf(ch->html->root->h / ch->html->page_h);
+ count += ceilf(ch->html->root->b / ch->html->page_h);
}
epub_update_outline(ctx, doc_, doc->outline);
@@ -105,7 +105,7 @@ epub_count_pages(fz_context *ctx, fz_document *doc_)
epub_chapter *ch;
int count = 0;
for (ch = doc->spine; ch; ch = ch->next)
- count += ceilf(ch->html->root->h / ch->html->page_h);
+ count += ceilf(ch->html->root->b / ch->html->page_h);
return count;
}
@@ -125,7 +125,7 @@ epub_bound_page(fz_context *ctx, fz_page *page_, fz_rect *bbox)
for (ch = doc->spine; ch; ch = ch->next)
{
- int cn = ceilf(ch->html->root->h / ch->html->page_h);
+ int cn = ceilf(ch->html->root->b / ch->html->page_h);
if (n < count + cn)
{
bbox->x0 = 0;
@@ -152,7 +152,7 @@ epub_run_page(fz_context *ctx, fz_page *page_, fz_device *dev, const fz_matrix *
for (ch = doc->spine; ch; ch = ch->next)
{
- int cn = ceilf(ch->html->root->h / ch->html->page_h);
+ int cn = ceilf(ch->html->root->b / ch->html->page_h);
if (n < count + cn)
{
fz_draw_html(ctx, dev, ctm, ch->html, n-count);
@@ -173,7 +173,7 @@ epub_load_links(fz_context *ctx, fz_page *page_)
for (ch = doc->spine; ch; ch = ch->next)
{
- int cn = ceilf(ch->html->root->h / ch->html->page_h);
+ int cn = ceilf(ch->html->root->b / ch->html->page_h);
if (n < count + cn)
return fz_load_html_links(ctx, ch->html, n - count, ch->path, doc);
count += cn;
@@ -191,7 +191,7 @@ epub_make_bookmark(fz_context *ctx, fz_document *doc_, int n)
for (ch = doc->spine; ch; ch = ch->next)
{
- int cn = ceilf(ch->html->root->h / ch->html->page_h);
+ int cn = ceilf(ch->html->root->b / ch->html->page_h);
if (n < count + cn)
return fz_make_html_bookmark(ctx, ch->html, n - count);
count += cn;