summaryrefslogtreecommitdiff
path: root/src/select/computed.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/select/computed.c')
-rw-r--r--src/select/computed.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/select/computed.c b/src/select/computed.c
index 2dc9055..9028710 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -314,7 +314,14 @@ css_error css_computed_style_compose(const css_computed_style *parent,
uint8_t css_computed_letter_spacing(const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- return get_letter_spacing(style, length, unit);
+ /* This property is in the uncommon block, so we need to do
+ * absolute value calculation here. */
+ if (get_letter_spacing(style, length, unit) != CSS_LETTER_SPACING_SET) {
+ *length = INTTOFIX(0);
+ *unit = CSS_UNIT_PX;
+ }
+
+ return CSS_LETTER_SPACING_SET;
}
uint8_t css_computed_outline_color(const css_computed_style *style,
@@ -339,7 +346,14 @@ uint8_t css_computed_border_spacing(const css_computed_style *style,
uint8_t css_computed_word_spacing(const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- return get_word_spacing(style, length, unit);
+ /* This property is in the uncommon block, so we need to do
+ * absolute value calculation here. */
+ if (get_word_spacing(style, length, unit) != CSS_WORD_SPACING_SET) {
+ *length = INTTOFIX(0);
+ *unit = CSS_UNIT_PX;
+ }
+
+ return CSS_WORD_SPACING_SET;
}
uint8_t css_computed_writing_mode(const css_computed_style *style)