mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:07:34 +00:00
LibWeb: Reset item_incurred_increase before distributing space in GFC
item_incurred_increase should be reset before every next distirbution because otherwise it will accumulate increases from previous distributions which is not supposed to happen.
This commit is contained in:
parent
55e8ffd122
commit
a613a0973e
3 changed files with 40 additions and 1 deletions
|
@ -870,8 +870,10 @@ void GridFormattingContext::resolve_intrinsic_track_sizes(AvailableSpace const&
|
|||
|
||||
void GridFormattingContext::distribute_extra_space_across_spanned_tracks(CSSPixels item_size_contribution, Vector<TemporaryTrack&>& spanned_tracks)
|
||||
{
|
||||
for (auto& track : spanned_tracks)
|
||||
for (auto& track : spanned_tracks) {
|
||||
track.planned_increase = 0;
|
||||
track.item_incurred_increase = 0;
|
||||
}
|
||||
|
||||
// 1. Find the space to distribute:
|
||||
CSSPixels spanned_tracks_sizes_sum = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue