@@ -1897,7 +1897,7 @@ void GridFormattingContext::run(AvailableSpace const& available_space)
1897
1897
m_state.get_mutable (grid_container ()).set_grid_template_rows (CSS::GridTrackSizeListStyleValue::create (move (grid_track_rows)));
1898
1898
}
1899
1899
1900
- void GridFormattingContext::layout_absolutely_positioned_element (Box const & box, AvailableSpace const & available_space )
1900
+ void GridFormattingContext::layout_absolutely_positioned_element (Box const & box)
1901
1901
{
1902
1902
auto & containing_block_state = m_state.get_mutable (*box.containing_block ());
1903
1903
auto & box_state = m_state.get_mutable (box);
@@ -1913,6 +1913,8 @@ void GridFormattingContext::layout_absolutely_positioned_element(Box const& box,
1913
1913
1914
1914
GridItem item { box, row_start, row_span, column_start, column_span };
1915
1915
1916
+ auto available_space = get_available_space_for_item (item);
1917
+
1916
1918
// The border computed values are not changed by the compute_height & width calculations below.
1917
1919
// The spec only adjusts and computes sizes, insets and margins.
1918
1920
box_state.border_left = box.computed_values ().border_left ().width ;
@@ -2015,12 +2017,9 @@ void GridFormattingContext::parent_context_did_dimension_child_root_box()
2015
2017
return IterationDecision::Continue;
2016
2018
});
2017
2019
2018
- for (auto & child : grid_container ().contained_abspos_children ()) {
2019
- auto & box = verify_cast<Box>(*child);
2020
- auto & cb_state = m_state.get (*box.containing_block ());
2021
- auto available_width = AvailableSize::make_definite (cb_state.content_width () + cb_state.padding_left + cb_state.padding_right );
2022
- auto available_height = AvailableSize::make_definite (cb_state.content_height () + cb_state.padding_top + cb_state.padding_bottom );
2023
- layout_absolutely_positioned_element (box, AvailableSpace (available_width, available_height));
2020
+ for (auto const & child : grid_container ().contained_abspos_children ()) {
2021
+ auto const & box = verify_cast<Box>(*child);
2022
+ layout_absolutely_positioned_element (box);
2024
2023
}
2025
2024
}
2026
2025
0 commit comments