diff --git a/render-wasm/src/shapes/modifiers.rs b/render-wasm/src/shapes/modifiers.rs index 02e7911aaa..f8e0c6428a 100644 --- a/render-wasm/src/shapes/modifiers.rs +++ b/render-wasm/src/shapes/modifiers.rs @@ -277,7 +277,6 @@ fn propagate_reflow( }; let shapes = &state.shapes; - let mut reflow_parent = false; if reflown.contains(id) { return; @@ -294,15 +293,10 @@ fn propagate_reflow( // If this is a fill layout but the parent has not been reflown yet // we wait for the next iteration for reflow skip_reflow = true; - reflow_parent = true; } } } - if shape.is_layout_vertical_auto() || shape.is_layout_horizontal_auto() { - reflow_parent = true; - } - if !skip_reflow { layout_reflows.push(*id); } @@ -312,32 +306,26 @@ fn propagate_reflow( if let Some(child) = shapes.get(&children_ids[0]) { let child_bounds = bounds.find(child); bounds.insert(shape.id, child_bounds); - reflow_parent = true; } reflown.insert(*id); } Type::Group(_) => { if let Some(shape_bounds) = calculate_group_bounds(shape, shapes, bounds) { bounds.insert(shape.id, shape_bounds); - reflow_parent = true; } reflown.insert(*id); } Type::Bool(_) => { if let Some(shape_bounds) = calculate_bool_bounds(shape, shapes, bounds, modifiers) { bounds.insert(shape.id, shape_bounds); - reflow_parent = true; } reflown.insert(*id); } - _ => { - // Other shapes don't have to be reflown - reflow_parent = true; - } + _ => {} } if let Some(parent) = shape.parent_id.and_then(|id| shapes.get(&id)) { - if reflow_parent && (parent.has_layout() || parent.is_group_like()) { + if parent.has_layout() || parent.is_group_like() { entries.push_back(Modifier::reflow(parent.id)); } }