mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
LibWeb: Remove usage of containing_block to get available height in GFC
There is no need to do containing block lookup when this value is provided in argument of ::run()
This commit is contained in:
parent
a073e35562
commit
7efc89e92b
Notes:
github-actions[bot]
2024-11-11 19:21:30 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/7efc89e92bc Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2285
1 changed files with 1 additions and 4 deletions
|
@ -2029,12 +2029,9 @@ void GridFormattingContext::run(AvailableSpace const& available_space)
|
|||
|
||||
resolve_track_spacing(GridDimension::Row);
|
||||
|
||||
auto const& containing_block_state = m_state.get(*grid_container().containing_block());
|
||||
auto height_of_containing_block = containing_block_state.content_height();
|
||||
auto height_of_container_block_as_available_size = AvailableSize::make_definite(height_of_containing_block);
|
||||
CSSPixels min_height = 0;
|
||||
if (!grid_computed_values.min_height().is_auto())
|
||||
min_height = calculate_inner_height(grid_container(), height_of_container_block_as_available_size, grid_computed_values.min_height());
|
||||
min_height = calculate_inner_height(grid_container(), available_space.height, grid_computed_values.min_height());
|
||||
|
||||
// If automatic grid container height is less than min-height, we need to re-run the track sizing algorithm
|
||||
if (m_automatic_content_height < min_height) {
|
||||
|
|
Loading…
Reference in a new issue