summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-12-29 17:55:22 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2014-12-29 17:55:22 +0000
commitdb3a3e164a45fe59d7df3c36495d97f4105b665d (patch)
tree51409d89ab437f7e765c058b502faf6d4445c631
parent2fff3afe1a29825213a2eb134065834ae08b1140 (diff)
downloadlibcss-db3a3e164a45fe59d7df3c36495d97f4105b665d.tar.gz
libcss-db3a3e164a45fe59d7df3c36495d97f4105b665d.tar.bz2
Fix broken absolute valuification of letter and word spacing properties.
-rw-r--r--src/select/computed.c10
1 files changed, 6 insertions, 4 deletions
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);
}
/**