diff --git a/layout/generic/nsGridContainerFrame.cpp b/layout/generic/nsGridContainerFrame.cpp index 1e1afac234..89352321c4 100644 --- a/layout/generic/nsGridContainerFrame.cpp +++ b/layout/generic/nsGridContainerFrame.cpp @@ -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; }