Skip to content

Commit

Permalink
computed: Remove assertion from static width accessor
Browse files Browse the repository at this point in the history
For now if a width is calc, we return type AUTO.
  • Loading branch information
tlsa committed May 27, 2024
1 parent ad957e3 commit c91acb4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/select/computed.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,9 @@ uint8_t css_computed_width_static(const css_computed_style *style,
css_fixed_or_calc length_ = {.value = 0};
uint8_t ret = get_width(style, &length_, unit);
if (ret == CSS_WIDTH_SET) {
assert(*unit != CSS_UNIT_CALC);
if (*unit == CSS_UNIT_CALC) {
return CSS_WIDTH_AUTO;
}
*length = length_.value;
}
return ret;
Expand Down

0 comments on commit c91acb4

Please sign in to comment.