summaryrefslogtreecommitdiff
path: root/source/fitz/context.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-11-21 14:26:41 +0100
committerTor Andersson <tor.andersson@artifex.com>2016-11-23 11:17:35 +0100
commitdd15bf347ca04cb79d1e009a7afb0f4c082820ca (patch)
tree31ef65777859b2ebebda014cb9e3ebc41c7280e0 /source/fitz/context.c
parentab62bee35b271f4bf7c73a2cdb7539c20e68b70b (diff)
downloadmupdf-dd15bf347ca04cb79d1e009a7afb0f4c082820ca.tar.xz
Add toggle to enable/disable document styles.
Diffstat (limited to 'source/fitz/context.c')
-rw-r--r--source/fitz/context.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/fitz/context.c b/source/fitz/context.c
index 3e79bbea..f62cd9d7 100644
--- a/source/fitz/context.c
+++ b/source/fitz/context.c
@@ -35,6 +35,7 @@ struct fz_style_context_s
{
int refs;
char *user_css;
+ int use_document_css;
};
static void fz_new_style_context(fz_context *ctx)
@@ -44,6 +45,7 @@ static void fz_new_style_context(fz_context *ctx)
ctx->style = fz_malloc_struct(ctx, fz_style_context);
ctx->style->refs = 1;
ctx->style->user_css = NULL;
+ ctx->style->use_document_css = 1;
}
}
@@ -65,6 +67,16 @@ static void fz_drop_style_context(fz_context *ctx)
}
}
+void fz_set_use_document_css(fz_context *ctx, int use)
+{
+ ctx->style->use_document_css = use;
+}
+
+int fz_use_document_css(fz_context *ctx)
+{
+ return ctx->style->use_document_css;
+}
+
void fz_set_user_css(fz_context *ctx, const char *user_css)
{
fz_free(ctx, ctx->style->user_css);