diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2015-05-26 15:58:37 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2015-05-26 15:58:37 +0200 |
commit | 274f92661e7c595185768a5c3cdd7c030bd84bb4 (patch) | |
tree | 3103e6d70c919fe14c7aa99ec47ed813964d86ea /source/html | |
parent | c125c074703cadfb01d766d9c70c7f616fb0cdff (diff) | |
download | mupdf-274f92661e7c595185768a5c3cdd7c030bd84bb4.tar.xz |
epub: Skip initial whitespace flow nodes when finding list anchors.
They are skipped during layout, so should also be skipped here.
Fixes bug 695943.
Diffstat (limited to 'source/html')
-rw-r--r-- | source/html/html-layout.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/html/html-layout.c b/source/html/html-layout.c index 3bb1789c..3d34be59 100644 --- a/source/html/html-layout.c +++ b/source/html/html-layout.c @@ -920,7 +920,14 @@ static fz_html_flow *find_list_mark_anchor(fz_context *ctx, fz_html *box) while (box) { if (box->type == BOX_FLOW) - return box->flow_head; + { + fz_html_flow *flow = box->flow_head; + if (flow->type == FLOW_BREAK) + flow = flow->next; + while (flow && flow->type == FLOW_GLUE) + flow = flow->next; + return flow; + } box = box->down; } return NULL; |