diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2014-10-21 16:37:29 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2014-12-03 12:25:51 +0100 |
commit | 4ce5833ca8e6e6f0156125a572fbc3b376e41d36 (patch) | |
tree | 60272e5114ee62f11f27cf58be45efeb79d2ea61 /source/html/css-apply.c | |
parent | 1ce69ac127c823463204ad522bb7c71ac7fad27a (diff) | |
download | mupdf-4ce5833ca8e6e6f0156125a572fbc3b376e41d36.tar.xz |
html: Box generation.
Diffstat (limited to 'source/html/css-apply.c')
-rw-r--r-- | source/html/css-apply.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/source/html/css-apply.c b/source/html/css-apply.c index d38d999e..53a46f50 100644 --- a/source/html/css-apply.c +++ b/source/html/css-apply.c @@ -597,10 +597,11 @@ add_property(struct style *style, const char *name, struct value *value, int spe } void -apply_styles(struct style *style, struct rule *rule, fz_xml *node) +apply_styles(fz_context *ctx, struct style *style, struct rule *rule, fz_xml *node) { struct selector *sel; struct property *prop; + const char *s; while (rule) { @@ -617,15 +618,17 @@ apply_styles(struct style *style, struct rule *rule, fz_xml *node) } rule = rule->next; } -} -void -apply_inline_style(struct style *style, struct property *prop) -{ - while (prop) + s = fz_xml_att(node, "style"); + if (s) { - add_property(style, prop->name, prop->value, INLINE_SPECIFICITY); - prop = prop->next; + prop = fz_parse_css_properties(ctx, s); + while (prop) + { + add_property(style, prop->name, prop->value, INLINE_SPECIFICITY); + prop = prop->next; + } + // TODO: free props } } |