diff options
Diffstat (limited to 'src/select/properties/border_right_style.c')
-rw-r--r-- | src/select/properties/border_right_style.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/select/properties/border_right_style.c b/src/select/properties/border_right_style.c index d75a99e..d14fbfb 100644 --- a/src/select/properties/border_right_style.c +++ b/src/select/properties/border_right_style.c @@ -31,16 +31,25 @@ css_error css__initial_border_right_style(css_select_state *state) return set_border_right_style(state->computed, CSS_BORDER_STYLE_NONE); } +css_error css__copy_border_right_style( + const css_computed_style *from, + css_computed_style *to) +{ + if (from == to) { + return CSS_OK; + } + + return set_border_right_style(to, get_border_right_style(from)); +} + css_error css__compose_border_right_style(const css_computed_style *parent, const css_computed_style *child, css_computed_style *result) { uint8_t type = get_border_right_style(child); - if (type == CSS_BORDER_STYLE_INHERIT) { - type = get_border_right_style(parent); - } - - return set_border_right_style(result, type); + return css__copy_border_right_style( + type == CSS_BORDER_STYLE_INHERIT ? parent : child, + result); } |