From c91acb44612634241eaa399611ebb30e096dee47 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 27 May 2024 09:04:30 +0100 Subject: [PATCH] computed: Remove assertion from static width accessor For now if a width is calc, we return type AUTO. --- src/select/computed.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/select/computed.c b/src/select/computed.c index 14e108d..7f513d2 100644 --- a/src/select/computed.c +++ b/src/select/computed.c @@ -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;