summaryrefslogtreecommitdiff
path: root/css/ruleset.c
diff options
context:
space:
mode:
Diffstat (limited to 'css/ruleset.c')
-rw-r--r--css/ruleset.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/css/ruleset.c b/css/ruleset.c
index 908b8a2f7..d8eae5ce5 100644
--- a/css/ruleset.c
+++ b/css/ruleset.c
@@ -226,6 +226,8 @@ int compare_selectors(struct node *n0, struct node *n1)
* property parsers
*/
+/* TODO: consider NODE_NUMBER whenever a value may be '0' */
+
int parse_length(struct css_length * const length, const struct node * const v)
{
css_unit u;
@@ -405,6 +407,9 @@ void parse_line_height(struct css_style * const s, const struct node * const v)
} else if (v->type == NODE_DIMENSION &&
parse_length(&s->line_height.value.length, v) == 0) {
s->line_height.size = CSS_LINE_HEIGHT_LENGTH;
+ } else if (v->type == NODE_NUMBER && atof(v->data) == 0.0) {
+ s->line_height.size = CSS_LINE_HEIGHT_ABSOLUTE;
+ s->line_height.value.absolute = 0.0;
}
}