aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/taffy
diff options
context:
space:
mode:
authorOriol Brufau <obrufau@igalia.com>2024-12-12 02:37:05 +0100
committerGitHub <noreply@github.com>2024-12-12 01:37:05 +0000
commit41e3c321e51840a5ce65fede125ed3d951c51069 (patch)
tree16d69664834b0f60afe47976fc644e8d5b2afb8e /components/layout_2020/taffy
parent7b160700d0b76d54723a0f93c697225804a808bb (diff)
downloadservo-41e3c321e51840a5ce65fede125ed3d951c51069.tar.gz
servo-41e3c321e51840a5ce65fede125ed3d951c51069.zip
Make sure to cache `inline_content_sizes()` (#34586)
The refactoring in 264c0f972fd1a732ee1d1490d78a1d26a65c6f5f 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>
Diffstat (limited to 'components/layout_2020/taffy')
-rw-r--r--components/layout_2020/taffy/layout.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/layout_2020/taffy/layout.rs b/components/layout_2020/taffy/layout.rs
index 2c6d4d084e8..d0e178e342b 100644
--- a/components/layout_2020/taffy/layout.rs
+++ b/components/layout_2020/taffy/layout.rs
@@ -232,7 +232,7 @@ impl taffy::LayoutPartialTree for TaffyContainerContext<'_> {
preferred_aspect_ratio: non_replaced.preferred_aspect_ratio(),
};
- let result = non_replaced
+ let result = independent_context
.inline_content_sizes(self.layout_context, &constraint_space);
let adjusted_available_space = inputs
.available_space