From db3a3e164a45fe59d7df3c36495d97f4105b665d Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 29 Dec 2014 17:55:22 +0000 Subject: Fix broken absolute valuification of letter and word spacing properties. --- src/select/computed.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/select/computed.c b/src/select/computed.c index 23701d7..ddaad6e 100644 --- a/src/select/computed.c +++ b/src/select/computed.c @@ -1667,16 +1667,18 @@ css_error compute_absolute_length_normal(css_computed_style *style, uint8_t type; type = get(style, &length, &unit); - if (type != CSS_LETTER_SPACING_NORMAL) { + if (type == CSS_LETTER_SPACING_SET) { if (unit == CSS_UNIT_EX) { length = FMUL(length, ex_size->value); unit = ex_size->unit; } - - return set(style, CSS_LETTER_SPACING_SET, length, unit); + } else { + /* NORMAL or INHERIT */ + length = INTTOFIX(0); + unit = CSS_UNIT_PX; } - return set(style, CSS_LETTER_SPACING_NORMAL, 0, CSS_UNIT_PX); + return set(style, CSS_LETTER_SPACING_SET, length, unit); } /** -- cgit v1.2.3