diff options
Diffstat (limited to 'src/select/properties/align_content.c')
-rw-r--r-- | src/select/properties/align_content.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/select/properties/align_content.c b/src/select/properties/align_content.c index 7d791b8..d432879 100644 --- a/src/select/properties/align_content.c +++ b/src/select/properties/align_content.c @@ -66,16 +66,25 @@ css_error css__initial_align_content(css_select_state *state) return set_align_content(state->computed, CSS_ALIGN_CONTENT_STRETCH); } +css_error css__copy_align_content( + const css_computed_style *from, + css_computed_style *to) +{ + if (from == to) { + return CSS_OK; + } + + return set_align_content(to, get_align_content(from)); +} + css_error css__compose_align_content(const css_computed_style *parent, const css_computed_style *child, css_computed_style *result) { uint8_t type = get_align_content(child); - if (type == CSS_ALIGN_CONTENT_INHERIT) { - type = get_align_content(parent); - } - - return set_align_content(result, type); + return css__copy_align_content( + type == CSS_ALIGN_CONTENT_INHERIT ? parent : child, + result); } |