summaryrefslogtreecommitdiff
path: root/src/select/properties/column_rule_style.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/select/properties/column_rule_style.c')
-rw-r--r--src/select/properties/column_rule_style.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/select/properties/column_rule_style.c b/src/select/properties/column_rule_style.c
index 1d9a41e..be9579c 100644
--- a/src/select/properties/column_rule_style.c
+++ b/src/select/properties/column_rule_style.c
@@ -33,16 +33,25 @@ css_error css__initial_column_rule_style(css_select_state *state)
CSS_COLUMN_RULE_STYLE_NONE);
}
+css_error css__copy_column_rule_style(
+ const css_computed_style *from,
+ css_computed_style *to)
+{
+ if (from == to) {
+ return CSS_OK;
+ }
+
+ return set_column_rule_style(to, get_column_rule_style(from));
+}
+
css_error css__compose_column_rule_style(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
{
uint8_t type = get_column_rule_style(child);
- if (type == CSS_COLUMN_RULE_STYLE_INHERIT) {
- type = get_column_rule_style(parent);
- }
-
- return set_column_rule_style(result, type);
+ return css__copy_column_rule_style(
+ type == CSS_COLUMN_RULE_STYLE_INHERIT ? parent : child,
+ result);
}