In RenderGrid::minContentForChild / maxContentForChild, we only set the containing block's override logical width: if (child->needsLayout()) { size_t columnTrack = resolveGridPosition(ForColumns, child); child->setOverrideContainingBlockContentLogicalWidth(columnTracks[columnTrack].m_usedBreadth); child->layout(); } This means that we can be reading a previous layout's containing block's override logical height! I would expect other part of the code to be wrong in the same way as we don't have any coverage of dynamic updates but this bug should solve that.
Created attachment 186706 [details] Proposed fix: Add the missing clear logical height override.
Comment on attachment 186706 [details] Proposed fix: Add the missing clear logical height override. Seems fine to me. This is similar to what we do in flexbox. You need to clear override sizes right before you layout.
Comment on attachment 186706 [details] Proposed fix: Add the missing clear logical height override. Clearing flags on attachment: 186706 Committed r141963: <http://trac.webkit.org/changeset/141963>
All reviewed patches have been landed. Closing bug.