diff options
Diffstat (limited to 'src/select/properties/empty_cells.c')
-rw-r--r-- | src/select/properties/empty_cells.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/select/properties/empty_cells.c b/src/select/properties/empty_cells.c index cd46b3f..559fbde 100644 --- a/src/select/properties/empty_cells.c +++ b/src/select/properties/empty_cells.c @@ -51,16 +51,25 @@ css_error css__initial_empty_cells(css_select_state *state) return set_empty_cells(state->computed, CSS_EMPTY_CELLS_SHOW); } +css_error css__copy_empty_cells( + const css_computed_style *from, + css_computed_style *to) +{ + if (from == to) { + return CSS_OK; + } + + return set_empty_cells(to, get_empty_cells(from)); +} + css_error css__compose_empty_cells(const css_computed_style *parent, const css_computed_style *child, css_computed_style *result) { uint8_t type = get_empty_cells(child); - if (type == CSS_EMPTY_CELLS_INHERIT) { - type = get_empty_cells(parent); - } - - return set_empty_cells(result, type); + return css__copy_empty_cells( + type == CSS_EMPTY_CELLS_INHERIT ? parent : child, + result); } |