summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2015-05-26 15:58:37 +0200
committerTor Andersson <tor.andersson@artifex.com>2015-05-26 15:58:37 +0200
commit274f92661e7c595185768a5c3cdd7c030bd84bb4 (patch)
tree3103e6d70c919fe14c7aa99ec47ed813964d86ea
parentc125c074703cadfb01d766d9c70c7f616fb0cdff (diff)
downloadmupdf-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.
-rw-r--r--source/html/html-layout.c9
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;