Make sure to cache inline_content_sizes() (#34586)

The refactoring in 264c0f972f stopped
caching the `inline_content_sizes()` calls from:
- `FlexItemBox::layout_for_block_content_size()`
- `IndependentFormattingContext::layout_float_or_atomic_inline()`
- `TaffyContainerContext::compute_child_layout()`

Also, the call from `OutsideMarker::layout()` was never cached.

This patch caches all of them.

It's not clear at all which `inline_content_sizes()` are cached and
which aren't, so I plan to improve the situation in a follow-up.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2024-12-12 02:37:05 +01:00 committed by GitHub
parent 7b160700d0
commit 41e3c321e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 11 deletions

View file

@ -2799,7 +2799,7 @@ impl FlexItemBox {
style.writing_mode,
non_replaced.preferred_aspect_ratio(),
);
non_replaced
self.independent_formatting_context
.inline_content_sizes(
flex_context.layout_context,
&constraint_space,