summaryrefslogtreecommitdiff
path: root/source/html/html-layout.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-10-07 16:48:56 +0100
committerRobin Watts <robin.watts@artifex.com>2016-10-10 15:57:46 +0100
commit8b541992e2722ceeac33e9f122e8326c79454158 (patch)
tree4a7cc38fcc09e2b545dab9e7fced31b19f139a0b /source/html/html-layout.c
parentfa93162983d3dc72800aee3d9f195adef6148d12 (diff)
downloadmupdf-8b541992e2722ceeac33e9f122e8326c79454158.tar.xz
Use more bitfields in HTML.
Saves 12 bytes per fz_html, and we have a lot.
Diffstat (limited to 'source/html/html-layout.c')
-rw-r--r--source/html/html-layout.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/html/html-layout.c b/source/html/html-layout.c
index a7642981..8f257048 100644
--- a/source/html/html-layout.c
+++ b/source/html/html-layout.c
@@ -2182,8 +2182,8 @@ static void fragment_cb(const uint32_t *fragment,
}
}
-static void
-detect_flow_directionality(fz_context *ctx, fz_pool *pool, uni_buf *buffer, fz_bidi_direction *bidi_dir, fz_html_flow *flow)
+static fz_bidi_direction
+detect_flow_directionality(fz_context *ctx, fz_pool *pool, uni_buf *buffer, fz_bidi_direction bidi_dir, fz_html_flow *flow)
{
fz_html_flow *end = flow;
bidi_data data;
@@ -2249,8 +2249,9 @@ detect_flow_directionality(fz_context *ctx, fz_pool *pool, uni_buf *buffer, fz_b
data.pool = pool;
data.flow = flow;
data.buffer = buffer;
- fz_bidi_fragment_text(ctx, buffer->data, buffer->len, bidi_dir, &fragment_cb, &data, 0 /* Flags */);
+ fz_bidi_fragment_text(ctx, buffer->data, buffer->len, &bidi_dir, &fragment_cb, &data, 0 /* Flags */);
}
+ return bidi_dir;
}
static void
@@ -2259,7 +2260,7 @@ detect_box_directionality(fz_context *ctx, fz_pool *pool, uni_buf *buffer, fz_ht
while (box)
{
if (box->flow_head)
- detect_flow_directionality(ctx, pool, buffer, &box->markup_dir, box->flow_head);
+ box->markup_dir = detect_flow_directionality(ctx, pool, buffer, box->markup_dir, box->flow_head);
detect_box_directionality(ctx, pool, buffer, box->down);
box = box->next;
}