Truly independent web browser
LibWeb: Drop the float avoidance size from block-level run inputs
Aliaksandr Kalenik3d8a3c9ca9f2
diff --git a/Libraries/LibWeb/Rust/src/layout/block_formatting_context.rs b/Libraries/LibWeb/Rust/src/layout/block_formatting_context.rsindex 97425326265..5102d523f23 100644--- a/Libraries/LibWeb/Rust/src/layout/block_formatting_context.rs+++ b/Libraries/LibWeb/Rust/src/layout/block_formatting_context.rs@@ -2034,8 +2034,7 @@ impl<'pass> BlockFormattingContext<'pass> {y: containing_block_rect_in_root.y + content_block_offset,};// Deliberately re-run inline sizing after every band descent,- // without committing: the winning candidate is what the run- // prelude reproduces from the float-avoidance directive.+ // without committing: only the winning candidate is committed.probe.opportunity = self.float_reduced_inline_opportunity(sized_child, available_space, position);probe.content_inline_size = self.resolve_root_inline_metrics_and_content_size(sized_child,@@ -2810,7 +2809,6 @@ impl<'pass> BlockFormattingContext<'pass> {containing_block_rect_in_root_now,&mut probe,);- let float_avoidance_inline_size = probe.opportunity;if !has_independent_formatting_context && let Some(content_inline_size) = probe.content_inline_size {self.cells_laid_out_here(sized_child).set_content_inline_size(content_inline_size);@@ -2961,7 +2959,6 @@ impl<'pass> BlockFormattingContext<'pass> {table_box_content_block_offset_in_wrapper: geometry::PackedOptionalCssPixels::from(is_table_formatting_context.then_some(content_block_offset),),- float_avoidance_inline_size: geometry::PackedOptionalCssPixels::from(float_avoidance_inline_size),outer_float_intrusion_before_list_item_children: inline_space_used_before_children_formatted,..RootSizingDirectives::default()},diff --git a/Libraries/LibWeb/Rust/src/layout/fc_run_cache.rs b/Libraries/LibWeb/Rust/src/layout/fc_run_cache.rsindex 0db1cac7d06..97f975c1b15 100644--- a/Libraries/LibWeb/Rust/src/layout/fc_run_cache.rs+++ b/Libraries/LibWeb/Rust/src/layout/fc_run_cache.rs@@ -274,7 +274,6 @@ fn layout_inputs_match_ignoring_unobserved(sizing,&b.sizing,unobserved.available_block_size_definiteness(),- unobserved.inline_space_around_root,unobserved.content_block_size_adopted_after_run,)}@@ -283,7 +282,6 @@ fn sizing_directives_match_ignoring_unobserved(a: &RootSizingDirectives,b: &RootSizingDirectives,block_size_definiteness_unobserved: bool,- float_avoidance_inline_size_unobserved: bool,content_block_size_adopted_after_run_unobserved: bool,) -> bool {let RootSizingDirectives {@@ -297,7 +295,6 @@ fn sizing_directives_match_ignoring_unobserved(finds_automatic_line_clamp_lines,content_block_size_after_inside_layout,flex_self_block_size_resolution_space,- float_avoidance_inline_size,outer_float_intrusion_before_list_item_children,treat_block_axis_percentage_insets_as_auto_beyond_root,math_stretch_size_constraint,@@ -315,7 +312,6 @@ fn sizing_directives_match_ignoring_unobserved(&& content_block_size_after_inside_layout == b.content_block_size_after_inside_layout)|| content_block_size_adopted_after_run_unobserved)&& finds_automatic_line_clamp_lines == b.finds_automatic_line_clamp_lines- && (float_avoidance_inline_size == b.float_avoidance_inline_size || float_avoidance_inline_size_unobserved)&& outer_float_intrusion_before_list_item_children == b.outer_float_intrusion_before_list_item_children&& treat_block_axis_percentage_insets_as_auto_beyond_root== b.treat_block_axis_percentage_insets_as_auto_beyond_rootdiff --git a/Libraries/LibWeb/Rust/src/layout/geometry.rs b/Libraries/LibWeb/Rust/src/layout/geometry.rsindex d6f02ddf81b..e60cc99623d 100644--- a/Libraries/LibWeb/Rust/src/layout/geometry.rs+++ b/Libraries/LibWeb/Rust/src/layout/geometry.rs@@ -373,7 +373,6 @@ pub(crate) struct RootSizingDirectives {// takes this block size, which the automatic minimum size grew to fit the content.pub(crate) content_block_size_after_inside_layout: PackedOptionalCssPixels,pub(crate) flex_self_block_size_resolution_space: Option<AvailableSpace>,- pub(crate) float_avoidance_inline_size: PackedOptionalCssPixels,pub(crate) outer_float_intrusion_before_list_item_children: inline_formatting_context::SpaceUsedByFloats,pub(crate) treat_block_axis_percentage_insets_as_auto_beyond_root: bool,pub(crate) maximum_inline_size_resolved_by_caller: PackedOptionalCssPixels,