Avoid unnecessary recomputation of inline-size being auto (#33548)

This information is already provided by `get_outer_sizes_from_style()`.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2024-09-25 15:11:37 -07:00 committed by GitHub
parent 01ed5064de
commit a97afebdcc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -792,9 +792,8 @@ impl<'a> TableLayout<'a> {
block: padding.block_sum() + border.block_sum() + margin.block_sum(),
};
let (size, min_size, max_size, _) =
let (size, min_size, max_size, size_is_auto) =
get_outer_sizes_from_style(&context.style, writing_mode, &padding_border_sums);
let size_is_auto = context.style.box_size(writing_mode).inline.is_auto();
// If an inline size is defined it should serve as the upper limit and lower limit
// of the caption inline size.