I raised this issue to the www-list here https://lists.w3.org/Archives/Public/www-style/2015Jan/0041.html. Summarizing, the current algorithm does not really enforce the condition of "base size <= growth limit". Not fulfilling it makes the algorithm produce invalid results as explained in the email. Using the example mentioned there: <div style="display: grid; grid-template-columns: minmax(40px, min-content) minmax(50px, max-content);"> <div style="grid-column: 1 / -1;" id="item1"></div> <div style="grid-column: 1;" id="item2"></div> <div style="grid-column: 2;" id="item3"></div> </div> Let's use the following sizes (min-content,max-content) in pixels for the items: - item1: (40, 90) - item2: (10, 10) - item3: (10, 10) The track sizing algorithm will generate the following outcome, for the (min,max) sizes of tracks: (40, 30) (50, 60) which means that with enough space the grid will be 40+60 = 100px wide when it should be enough with 90px.
Created attachment 245135 [details] Patch
Ping reviewers
JFTR this is what the specs now say: "If at this point any track’s growth limit is now less than its base size, increase its growth limit to match its base size."
Comment on attachment 245135 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=245135&action=review > Source/WebCore/rendering/RenderGrid.cpp:47 > - : m_usedBreadth(0) > - , m_maxBreadth(0) > + : m_baseSize(0) > + , m_growthLimit(0) The fashionable approach is to initialize in the header: LayoutUnit m_baseSize { 0 };
Committed r179824: <http://trac.webkit.org/changeset/179824>