summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2015-01-10 22:21:51 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2015-01-10 22:21:51 +0000
commit096871aabc3b2be309566d444bed2f48f18c3e41 (patch)
tree4163ed295e0089a3bff12ba8cf7f6b0c02135548 /src
parent25c4362841e0f3f8eb654c8568ebbaab7696a4ce (diff)
downloadlibcss-096871aabc3b2be309566d444bed2f48f18c3e41.tar.gz
libcss-096871aabc3b2be309566d444bed2f48f18c3e41.tar.bz2
Implement absolutification for column-rule-width.
Diffstat (limited to 'src')
-rw-r--r--src/select/computed.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/select/computed.c b/src/select/computed.c
index d78f3b0..7508db6 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -840,7 +840,15 @@ uint8_t css_computed_column_rule_style(const css_computed_style *style)
uint8_t css_computed_column_rule_width(const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- return get_column_rule_width(style, length, unit);
+ /* This property is in the uncommon block, so we need to handle
+ * absolute value calculation for initial value (medium) here. */
+ if (get_column_rule_width(style, length, unit) ==
+ CSS_BORDER_WIDTH_MEDIUM) {
+ *length = INTTOFIX(2);
+ *unit = CSS_UNIT_PX;
+ }
+
+ return CSS_BORDER_WIDTH_WIDTH;
}
uint8_t css_computed_column_span(const css_computed_style *style)
@@ -1187,13 +1195,21 @@ css_error css__compute_absolute_values(const css_computed_style *parent,
if (error != CSS_OK)
return error;
- /* Fix up word spacing */
+ /* Fix up word-spacing */
error = compute_absolute_length(style,
&ex_size.data.length,
get_word_spacing,
set_word_spacing);
if (error != CSS_OK)
return error;
+
+ /* Fix up column-rule-width */
+ error = compute_absolute_border_side_width(style,
+ &ex_size.data.length,
+ get_column_rule_width,
+ set_column_rule_width);
+ if (error != CSS_OK)
+ return error;
}
return CSS_OK;