aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorOriol Brufau <obrufau@igalia.com>2025-03-07 22:58:38 +0100
committerGitHub <noreply@github.com>2025-03-07 21:58:38 +0000
commit2d28eb8f39c049cdc1603c62e164b58ad02170a1 (patch)
tree11693cacae850ac997faa074e5755aec1b3cf4d0 /components
parentbf5afe166e30bea6348e1bed4a8b28cddf7055ea (diff)
downloadservo-2d28eb8f39c049cdc1603c62e164b58ad02170a1.tar.gz
servo-2d28eb8f39c049cdc1603c62e164b58ad02170a1.zip
layout: Assert that `hypothetical_cross_size` is already correct (#35816)
There doesn't seem to be a need to recompute it. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Diffstat (limited to 'components')
-rw-r--r--components/layout_2020/flexbox/layout.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/components/layout_2020/flexbox/layout.rs b/components/layout_2020/flexbox/layout.rs
index c85318be26d..56a48109494 100644
--- a/components/layout_2020/flexbox/layout.rs
+++ b/components/layout_2020/flexbox/layout.rs
@@ -2000,7 +2000,10 @@ impl FlexItem<'_> {
size,
)
{
- non_stretch_layout_result.hypothetical_cross_size = hypothetical_cross_size;
+ assert_eq!(
+ non_stretch_layout_result.hypothetical_cross_size,
+ hypothetical_cross_size
+ );
return None;
}
}
@@ -2055,10 +2058,12 @@ impl FlexItem<'_> {
if non_stretch_layout_result
.compatible_with_containing_block_size(&item_as_containing_block)
{
- non_stretch_layout_result.hypothetical_cross_size =
+ assert_eq!(
+ non_stretch_layout_result.hypothetical_cross_size,
calculate_hypothetical_cross_size(
non_stretch_layout_result.content_size.inline,
- );
+ )
+ );
return None;
}
}