gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 501HTML 254C 19JavaScript 81412 Definitions

Pass through run mode rather when performing final layout on block children (#972)

Signed-off-by: Nico Burns <nico@nicoburns.com>

96169be1c1eb3352910b1ae87a2184e23bec5fa1 · by Nico Burns · (3 months ago) · parent 75456ae18 · browse the tree at this commit

Semantic delta · 2

src/compute/block.rs

1 files · +3 −1

diff --git a/src/compute/block.rs b/src/compute/block.rs
index d8ae653df..17fee8dd2 100644
--- a/src/compute/block.rs
+++ b/src/compute/block.rs
@@ -470,6 +470,7 @@ fn compute_inner(
     let (mut inflow_content_size, mut intrinsic_outer_height, first_child_top_margin_set, last_child_bottom_margin_set) =
         perform_final_layout_on_in_flow_children(
             tree,
+            run_mode,
             &mut items,
             container_outer_width,
             container_percentage_resolution_height,
@@ -742,6 +743,7 @@ fn determine_content_based_container_width(
 #[allow(clippy::too_many_arguments)]
 fn perform_final_layout_on_in_flow_children(
     tree: &mut impl LayoutBlockContainer,
+    run_mode: RunMode,
     items: &mut [BlockItem],
     container_outer_width: f32,
     container_percentage_resolution_height: Option<f32>,
@@ -928,7 +930,7 @@ fn perform_final_layout_on_in_flow_children(
             //
 
             let inputs = LayoutInput {
-                run_mode: RunMode::PerformLayout,
+                run_mode,
                 sizing_mode: SizingMode::InherentSize,
                 axis: RequestedAxis::Both,
                 known_dimensions,