calc(): layout: minmax block: Use new css width getter API

This commit is contained in:
Michael Drake 2024-05-26 11:44:04 +01:00
parent 09b076c141
commit 052550c667

View File

@ -1036,11 +1036,11 @@ static void layout_minmax_block(
enum css_min_width_e min_type; enum css_min_width_e min_type;
css_unit unit = CSS_UNIT_PX; css_unit unit = CSS_UNIT_PX;
css_fixed value = 0; css_fixed value = 0;
int width;
if (wtype == CSS_WIDTH_SET && wunit != CSS_UNIT_PCT) { if (css_computed_width(block->style, &content->unit_len_ctx,
min = max = FIXTOINT( -1, &width) == CSS_WIDTH_SET) {
css_unit_len2device_px(block->style, min = max = width;
&content->unit_len_ctx, width, wunit));
using_max_border_box = border_box; using_max_border_box = border_box;
using_min_border_box = border_box; using_min_border_box = border_box;
} }