diff options
Diffstat (limited to 'source/html/css-apply.c')
-rw-r--r-- | source/html/css-apply.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/html/css-apply.c b/source/html/css-apply.c index 7f3028a9..550ade85 100644 --- a/source/html/css-apply.c +++ b/source/html/css-apply.c @@ -156,6 +156,8 @@ count_selector_names(struct selector *sel) return n; } +#define INLINE_SPECIFICITY 1000 + int selector_specificity(struct selector *sel) { @@ -595,7 +597,7 @@ add_property(struct style *style, const char *name, struct value *value, int spe } void -apply_styles(struct rule *rule, struct style *style, fz_xml *node) +apply_styles(struct style *style, struct rule *rule, fz_xml *node) { struct selector *sel; struct property *prop; @@ -617,6 +619,16 @@ apply_styles(struct rule *rule, struct style *style, fz_xml *node) } } +void +apply_inline_style(struct style *style, struct property *prop) +{ + while (prop) + { + add_property(style, prop->name, prop->value, INLINE_SPECIFICITY); + prop = prop->next; + } +} + static const char *inherit_list[] = { "color", "direction", "font-family", "font-size", "font-style", "font-variant", "font-weight", |