Skip to content

Commit

Permalink
Issue #2688 - Don't apply auto min-sizing when flex max-sizing.
Browse files Browse the repository at this point in the history
A grid item spanning multiple grid rows/columns which include a flexible
track should not participate in the auto min-sizing calculation.

Resolves #2688
  • Loading branch information
wolfbeast committed Jan 27, 2025
1 parent da971a8 commit 25ad3a9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions layout/generic/nsGridContainerFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4519,6 +4519,7 @@ nsGridContainerFrame::Tracks::ResolveIntrinsicSize(

// Check if we need to apply "Automatic Minimum Size" and cache it.
if ((state & TrackSize::eAutoMinSizing) &&
!(state & TrackSize::eFlexMaxSizing) &&
gridItem.ShouldApplyAutoMinSize(wm, mAxis, aPercentageBasis)) {
gridItem.mState[mAxis] |= ItemState::eApplyAutoMinSize;
}
Expand Down

0 comments on commit 25ad3a9

Please sign in to comment.