<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[199728] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/199728">199728</a></dd>
<dt>Author</dt> <dd>svillar@igalia.com</dd>
<dt>Date</dt> <dd>2016-04-19 08:48:00 -0700 (Tue, 19 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[css-grid] Use the margin box for non-auto minimum sizes
https://bugs.webkit.org/show_bug.cgi?id=156711

Reviewed by Darin Adler.

Source/WebCore:

When computing the min-size of items with non-auto minimum height/width we are incorrectly
returning the size of the border box, and thus incorrectly ignoring the margins of the item.

This is a follow up patch of <a href="http://trac.webkit.org/projects/webkit/changeset/199153">r199153</a> were we added the missing border and paddings for
heights. Contrary to that, we were not including margins for both axis.

This CL requires 3 different interrelated changes:
- Add the margins to the min-size returned by minSizeForChild (might require a layout).
- Refactor and extract width computations from logicalHeightForChild(); not totally
mandatory but pretty logical and helpful.
- Use a new update function to isolate the computation of the override width.

Test: fast/css-grid-layout/min-width-margin-box.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeInlineDirectionMargins): Added const to a parameter.
* rendering/RenderBox.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeTrackSizesForDirection): Initialize the sizingOperation.
(WebCore::RenderGrid::computeIntrinsicLogicalWidths): Ditto.
(WebCore::RenderGrid::computeIntrinsicLogicalHeight): Ditto.
(WebCore::RenderGrid::logicalHeightForChild): Renamed from logicalContentHeightForChild as
it no longer returns the content size but the outer size.
(WebCore::RenderGrid::minSizeForChild):
(WebCore::RenderGrid::updateOverrideContainingBlockContentLogicalWidthForChild): Extracted
from logicalHeightForChild().
(WebCore::RenderGrid::minContentForChild): Update override width if needed.
(WebCore::RenderGrid::maxContentForChild): Ditto.
(WebCore::RenderGrid::computeMarginLogicalSizeForChild): Generalized from
computeMarginLogicalHeightForChild(), it can now compute also margins for the inline
direction.
(WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching):
(WebCore::RenderGrid::logicalContentHeightForChild): Deleted.
(WebCore::RenderGrid::computeMarginLogicalHeightForChild): Deleted.
* rendering/RenderGrid.h:

LayoutTests:

* fast/css-grid-layout/min-height-border-box.html:
* fast/css-grid-layout/min-width-margin-box-expected.txt: Added.
* fast/css-grid-layout/min-width-margin-box.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutminheightborderboxhtml">trunk/LayoutTests/fast/css-grid-layout/min-height-border-box.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxh">trunk/Source/WebCore/rendering/RenderBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderGridcpp">trunk/Source/WebCore/rendering/RenderGrid.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderGridh">trunk/Source/WebCore/rendering/RenderGrid.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcssgridlayoutminwidthmarginboxexpectedtxt">trunk/LayoutTests/fast/css-grid-layout/min-width-margin-box-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutminwidthmarginboxhtml">trunk/LayoutTests/fast/css-grid-layout/min-width-margin-box.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (199727 => 199728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-04-19 15:10:36 UTC (rev 199727)
+++ trunk/LayoutTests/ChangeLog        2016-04-19 15:48:00 UTC (rev 199728)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-04-19  Sergio Villar Senin  &lt;svillar@igalia.com&gt;
+
+        [css-grid] Use the margin box for non-auto minimum sizes
+        https://bugs.webkit.org/show_bug.cgi?id=156711
+
+        Reviewed by Darin Adler.
+
+        * fast/css-grid-layout/min-height-border-box.html:
+        * fast/css-grid-layout/min-width-margin-box-expected.txt: Added.
+        * fast/css-grid-layout/min-width-margin-box.html: Added.
+
</ins><span class="cx"> 2016-04-19  Michael Saboff  &lt;msaboff@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         iTunes crashing JavaScriptCore.dll
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutminheightborderboxhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/min-height-border-box.html (199727 => 199728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/min-height-border-box.html        2016-04-19 15:10:36 UTC (rev 199727)
+++ trunk/LayoutTests/fast/css-grid-layout/min-height-border-box.html        2016-04-19 15:48:00 UTC (rev 199728)
</span><span class="lines">@@ -13,11 +13,12 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .container { width: 150px; }
</span><del>-.borderPadding {
</del><ins>+.borderPaddingMargin {
</ins><span class="cx">     border-width: 2px 3px 5px 9px;
</span><span class="cx">     border-color: blue;
</span><span class="cx">     border-style: solid;
</span><span class="cx">     padding: 4px 9px 12px 20px;
</span><ins>+    margin: 7px 10px 12px 14px;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> &lt;/style&gt;
</span><span class="lines">@@ -34,8 +35,8 @@
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;div class=&quot;container&quot;&gt;
</span><del>-    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;58&quot;&gt;
-        &lt;div class=&quot;item borderPadding&quot; data-expected-width=&quot;140&quot; data-expected-height=&quot;48&quot;&gt;XXX&lt;/div&gt;
</del><ins>+    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;77&quot;&gt;
+        &lt;div class=&quot;item borderPaddingMargin&quot; data-expected-width=&quot;116&quot; data-expected-height=&quot;48&quot;&gt;XXX&lt;/div&gt;
</ins><span class="cx">     &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -47,8 +48,8 @@
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;div class=&quot;container&quot;&gt;
</span><del>-    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;33&quot;&gt;
-        &lt;div class=&quot;item borderPadding&quot; style=&quot;min-height: 0px;&quot; data-expected-width=&quot;140&quot; data-expected-height=&quot;23&quot;&gt;XXX&lt;/div&gt;
</del><ins>+    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;52&quot;&gt;
+        &lt;div class=&quot;item borderPaddingMargin&quot; style=&quot;min-height: 0px;&quot; data-expected-width=&quot;116&quot; data-expected-height=&quot;23&quot;&gt;XXX&lt;/div&gt;
</ins><span class="cx">     &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -60,8 +61,8 @@
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;div class=&quot;container&quot;&gt;
</span><del>-    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;33&quot;&gt;
-        &lt;div class=&quot;item alignSelfStart borderPadding&quot; style=&quot;min-height: 0px;&quot; data-expected-width=&quot;140&quot; data-expected-height=&quot;48&quot;&gt;XXX&lt;/div&gt;
</del><ins>+    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;52&quot;&gt;
+        &lt;div class=&quot;item alignSelfStart borderPaddingMargin&quot; style=&quot;min-height: 0px;&quot; data-expected-width=&quot;116&quot; data-expected-height=&quot;48&quot;&gt;XXX&lt;/div&gt;
</ins><span class="cx">     &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -74,7 +75,7 @@
</span><span class="cx"> 
</span><span class="cx"> &lt;div class=&quot;container&quot;&gt;
</span><span class="cx">     &lt;div class=&quot;grid&quot; style=&quot;height: 15px;&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;25&quot;&gt;
</span><del>-        &lt;div class=&quot;item borderPadding&quot; style=&quot;min-height: 0px;&quot; data-expected-width=&quot;140&quot; data-expected-height=&quot;23&quot;&gt;XXX&lt;/div&gt;
</del><ins>+        &lt;div class=&quot;item borderPaddingMargin&quot; style=&quot;min-height: 0px;&quot; data-expected-width=&quot;116&quot; data-expected-height=&quot;23&quot;&gt;XXX&lt;/div&gt;
</ins><span class="cx">     &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -87,7 +88,7 @@
</span><span class="cx"> 
</span><span class="cx"> &lt;div class=&quot;container&quot;&gt;
</span><span class="cx">     &lt;div class=&quot;grid&quot; style=&quot;height: 15px;&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;25&quot;&gt;
</span><del>-        &lt;div class=&quot;item alignSelfStart borderPadding&quot; style=&quot;min-height: 0px;&quot; data-expected-width=&quot;140&quot; data-expected-height=&quot;48&quot;&gt;XXX&lt;/div&gt;
</del><ins>+        &lt;div class=&quot;item alignSelfStart borderPaddingMargin&quot; style=&quot;min-height: 0px;&quot; data-expected-width=&quot;116&quot; data-expected-height=&quot;48&quot;&gt;XXX&lt;/div&gt;
</ins><span class="cx">     &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -99,8 +100,8 @@
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;div class=&quot;container&quot;&gt;
</span><del>-    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;63&quot;&gt;
-        &lt;div class=&quot;item borderPadding&quot; style=&quot;min-height: 30px;&quot; data-expected-width=&quot;140&quot; data-expected-height=&quot;53&quot;&gt;XXX&lt;/div&gt;
</del><ins>+    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;82&quot;&gt;
+        &lt;div class=&quot;item borderPaddingMargin&quot; style=&quot;min-height: 30px;&quot; data-expected-width=&quot;116&quot; data-expected-height=&quot;53&quot;&gt;XXX&lt;/div&gt;
</ins><span class="cx">     &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -112,8 +113,8 @@
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;div class=&quot;container&quot;&gt;
</span><del>-    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;63&quot;&gt;
-        &lt;div class=&quot;item alignSelfStart borderPadding&quot; style=&quot;min-height: 30px;&quot; data-expected-width=&quot;140&quot; data-expected-height=&quot;53&quot;&gt;XXX&lt;/div&gt;
</del><ins>+    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;82&quot;&gt;
+        &lt;div class=&quot;item alignSelfStart borderPaddingMargin&quot; style=&quot;min-height: 30px;&quot; data-expected-width=&quot;116&quot; data-expected-height=&quot;53&quot;&gt;XXX&lt;/div&gt;
</ins><span class="cx">     &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutminwidthmarginboxexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-grid-layout/min-width-margin-box-expected.txt (0 => 199728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/min-width-margin-box-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/css-grid-layout/min-width-margin-box-expected.txt        2016-04-19 15:48:00 UTC (rev 199728)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+grid width: auto
+
+XXXX
+PASS
+XXXX
+PASS
+min-width: 0px. grid height: auto
+
+XXXX
+PASS
+XXXX
+PASS
+min-width: 0px. grid height: 15px
+
+XXXX
+PASS
+XXXX
+PASS
+min-width: 125px. grid height: auto
+
+XXXX
+PASS
+XXXX
+PASS
+min-width: 50%. grid height: auto
+
+XXX XX
+PASS
+XXX XX
+PASS
+min-width: min-content. grid height: auto
+
+XXX XX
+PASS
+XXX XX
+PASS
+min-width: max-content. grid height: auto
+
+XXX XX
+PASS
+XXX XX
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutminwidthmarginboxhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-grid-layout/min-width-margin-box.html (0 => 199728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/min-width-margin-box.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-grid-layout/min-width-margin-box.html        2016-04-19 15:48:00 UTC (rev 199728)
</span><span class="lines">@@ -0,0 +1,144 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;link href=&quot;resources/grid.css&quot; rel=&quot;stylesheet&quot;&gt;
+&lt;link href=&quot;resources/grid-alignment.css&quot; rel=&quot;stylesheet&quot;&gt;
+&lt;link href=&quot;../css-intrinsic-dimensions/resources/width-keyword-classes.css&quot; rel=&quot;stylesheet&quot;&gt;
+&lt;style&gt;
+.grid {
+    border: 5px solid magenta;
+    margin-bottom: 60px;
+    -webkit-grid-template-columns: minmax(auto, 0px);
+}
+
+.item {
+    font: 25px/1 Ahem;
+}
+
+.stretchedItem {
+    background-color: green;
+    -webkit-grid-row: 2;
+    height: 15px;
+}
+
+.container { width: 150px; }
+
+.borderPaddingMargin {
+    margin: 7px 10px 12px 14px;
+    border-width: 2px 3px 5px 9px;
+    border-style: solid;
+    border-color: blue;
+    padding: 4px 9px 12px 20px;
+}
+
+&lt;/style&gt;
+
+&lt;script src=&quot;../../resources/check-layout.js&quot;&gt;&lt;/script&gt;
+
+&lt;body onload=&quot;checkLayout('.grid')&quot;&gt;
+
+&lt;h3&gt;grid width: auto&lt;/h3&gt;
+&lt;div class=&quot;container&quot;&gt;
+    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;50&quot;&gt;
+        &lt;div class=&quot;item&quot; data-expected-width=&quot;100&quot; data-expected-height=&quot;25&quot;&gt;XXXX&lt;/div&gt;
+        &lt;div class=&quot;stretchedItem&quot; data-expected-width=&quot;100&quot; data-expected-height=&quot;15&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;92&quot;&gt;
+        &lt;div class=&quot;item borderPaddingMargin&quot; data-expected-width=&quot;141&quot; data-expected-height=&quot;48&quot;&gt;XXXX&lt;/div&gt;
+        &lt;div class=&quot;stretchedItem&quot; data-expected-width=&quot;165&quot; data-expected-height=&quot;15&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;h3&gt;min-width: 0px. grid height: auto&lt;/h3&gt;
+&lt;div class=&quot;container&quot;&gt;
+    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;50&quot;&gt;
+        &lt;div class=&quot;item&quot; style=&quot;min-width: 0px;&quot; data-expected-width=&quot;0&quot; data-expected-height=&quot;25&quot;&gt;XXXX&lt;/div&gt;
+        &lt;div class=&quot;stretchedItem&quot; data-expected-width=&quot;0&quot; data-expected-height=&quot;15&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;92&quot;&gt;
+        &lt;div class=&quot;item borderPaddingMargin&quot; style=&quot;min-width: 0px;&quot; data-expected-width=&quot;41&quot; data-expected-height=&quot;48&quot;&gt;XXXX&lt;/div&gt;
+        &lt;div class=&quot;stretchedItem&quot; data-expected-width=&quot;65&quot; data-expected-height=&quot;15&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;h3&gt;min-width: 0px. grid height: 15px&lt;/h3&gt;
+&lt;div class=&quot;container&quot;&gt;
+    &lt;div class=&quot;grid&quot; style=&quot;height: 15px;&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;25&quot;&gt;
+        &lt;div class=&quot;item&quot; style=&quot;min-width: 0px;&quot; data-expected-width=&quot;0&quot; data-expected-height=&quot;25&quot;&gt;XXXX&lt;/div&gt;
+        &lt;div class=&quot;stretchedItem&quot; data-expected-width=&quot;0&quot; data-expected-height=&quot;15&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+    &lt;div class=&quot;grid&quot; style=&quot;height: 15px;&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;25&quot;&gt;
+        &lt;div class=&quot;item border borderPaddingMargin&quot; style=&quot;min-width: 0px;&quot; data-expected-width=&quot;41&quot; data-expected-height=&quot;48&quot;&gt;XXXX&lt;/div&gt;
+        &lt;div class=&quot;stretchedItem&quot; data-expected-width=&quot;65&quot; data-expected-height=&quot;15&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;h3&gt;min-width: 125px. grid height: auto&lt;/h3&gt;
+&lt;div class=&quot;container&quot;&gt;
+    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;50&quot;&gt;
+        &lt;div class=&quot;item&quot; style=&quot;min-width: 125px;&quot; data-expected-width=&quot;125&quot; data-expected-height=&quot;25&quot;&gt;XXXX&lt;/div&gt;
+        &lt;div class=&quot;stretchedItem&quot; data-expected-width=&quot;125&quot; data-expected-height=&quot;15&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;92&quot;&gt;
+        &lt;div class=&quot;item borderPaddingMargin&quot; style=&quot;min-width: 125px;&quot; data-expected-width=&quot;166&quot; data-expected-height=&quot;48&quot;&gt;XXXX&lt;/div&gt;
+        &lt;div class=&quot;stretchedItem&quot; data-expected-width=&quot;190&quot; data-expected-height=&quot;15&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;h3&gt;min-width: 50%. grid height: auto&lt;/h3&gt;
+&lt;div class=&quot;container&quot;&gt;
+    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;75&quot;&gt;
+        &lt;div class=&quot;item&quot; style=&quot;min-width: 50%;&quot; data-expected-width=&quot;0&quot; data-expected-height=&quot;50&quot;&gt;XXX XX&lt;/div&gt;
+        &lt;div class=&quot;stretchedItem&quot; data-expected-width=&quot;0&quot; data-expected-height=&quot;15&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;117&quot;&gt;
+        &lt;div class=&quot;item borderPaddingMargin&quot; style=&quot;min-width: 50%;&quot; data-expected-width=&quot;74&quot; data-expected-height=&quot;73&quot;&gt;XXX XX&lt;/div&gt;
+        &lt;div class=&quot;stretchedItem&quot; data-expected-width=&quot;65&quot; data-expected-height=&quot;15&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+
+&lt;h3&gt;min-width: min-content. grid height: auto&lt;/h3&gt;
+&lt;div class=&quot;container&quot;&gt;
+    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;75&quot;&gt;
+        &lt;div class=&quot;item min-width-min-content&quot; data-expected-width=&quot;75&quot; data-expected-height=&quot;50&quot;&gt;XXX XX&lt;/div&gt;
+        &lt;div class=&quot;stretchedItem&quot; data-expected-width=&quot;75&quot; data-expected-height=&quot;15&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;117&quot;&gt;
+        &lt;div class=&quot;item borderPaddingMargin min-width-min-content&quot; data-expected-width=&quot;116&quot; data-expected-height=&quot;73&quot;&gt;XXX XX&lt;/div&gt;
+        &lt;div class=&quot;stretchedItem&quot; data-expected-width=&quot;140&quot; data-expected-height=&quot;15&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;h3&gt;min-width: max-content. grid height: auto&lt;/h3&gt;
+&lt;div class=&quot;container&quot;&gt;
+    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;50&quot;&gt;
+        &lt;div class=&quot;item alignSelfStart min-width-max-content&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;25&quot;&gt;XXX XX&lt;/div&gt;
+        &lt;div class=&quot;stretchedItem&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;15&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+    &lt;div class=&quot;grid&quot; data-expected-width=&quot;150&quot; data-expected-height=&quot;92&quot;&gt;
+        &lt;div class=&quot;item alignSelfStart borderPaddingMargin min-width-max-content&quot; data-expected-width=&quot;191&quot; data-expected-height=&quot;48&quot;&gt;XXX XX&lt;/div&gt;
+        &lt;div class=&quot;stretchedItem&quot; data-expected-width=&quot;215&quot; data-expected-height=&quot;15&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;/body&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (199727 => 199728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-19 15:10:36 UTC (rev 199727)
+++ trunk/Source/WebCore/ChangeLog        2016-04-19 15:48:00 UTC (rev 199728)
</span><span class="lines">@@ -1,3 +1,46 @@
</span><ins>+2016-04-19  Sergio Villar Senin  &lt;svillar@igalia.com&gt;
+
+        [css-grid] Use the margin box for non-auto minimum sizes
+        https://bugs.webkit.org/show_bug.cgi?id=156711
+
+        Reviewed by Darin Adler.
+
+        When computing the min-size of items with non-auto minimum height/width we are incorrectly
+        returning the size of the border box, and thus incorrectly ignoring the margins of the item.
+
+        This is a follow up patch of r199153 were we added the missing border and paddings for
+        heights. Contrary to that, we were not including margins for both axis.
+
+        This CL requires 3 different interrelated changes:
+        - Add the margins to the min-size returned by minSizeForChild (might require a layout).
+        - Refactor and extract width computations from logicalHeightForChild(); not totally
+        mandatory but pretty logical and helpful.
+        - Use a new update function to isolate the computation of the override width.
+
+        Test: fast/css-grid-layout/min-width-margin-box.html
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::computeInlineDirectionMargins): Added const to a parameter.
+        * rendering/RenderBox.h:
+        * rendering/RenderGrid.cpp:
+        (WebCore::RenderGrid::computeTrackSizesForDirection): Initialize the sizingOperation.
+        (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Ditto.
+        (WebCore::RenderGrid::computeIntrinsicLogicalHeight): Ditto.
+        (WebCore::RenderGrid::logicalHeightForChild): Renamed from logicalContentHeightForChild as
+        it no longer returns the content size but the outer size.
+        (WebCore::RenderGrid::minSizeForChild):
+        (WebCore::RenderGrid::updateOverrideContainingBlockContentLogicalWidthForChild): Extracted
+        from logicalHeightForChild().
+        (WebCore::RenderGrid::minContentForChild): Update override width if needed.
+        (WebCore::RenderGrid::maxContentForChild): Ditto.
+        (WebCore::RenderGrid::computeMarginLogicalSizeForChild): Generalized from
+        computeMarginLogicalHeightForChild(), it can now compute also margins for the inline
+        direction.
+        (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching):
+        (WebCore::RenderGrid::logicalContentHeightForChild): Deleted.
+        (WebCore::RenderGrid::computeMarginLogicalHeightForChild): Deleted.
+        * rendering/RenderGrid.h:
+
</ins><span class="cx"> 2016-04-19  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Cairo] GraphicsContext::drawFocusRing methods are not consistent to each other
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (199727 => 199728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2016-04-19 15:10:36 UTC (rev 199727)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2016-04-19 15:48:00 UTC (rev 199728)
</span><span class="lines">@@ -2614,7 +2614,7 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderBox::computeInlineDirectionMargins(RenderBlock&amp; containingBlock, LayoutUnit containerWidth, LayoutUnit childWidth, LayoutUnit&amp; marginStart, LayoutUnit&amp; marginEnd) const
</del><ins>+void RenderBox::computeInlineDirectionMargins(const RenderBlock&amp; containingBlock, LayoutUnit containerWidth, LayoutUnit childWidth, LayoutUnit&amp; marginStart, LayoutUnit&amp; marginEnd) const
</ins><span class="cx"> {
</span><span class="cx">     const RenderStyle&amp; containingBlockStyle = containingBlock.style();
</span><span class="cx">     Length marginStartLength = style().marginStartUsing(&amp;containingBlockStyle);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.h (199727 => 199728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.h        2016-04-19 15:10:36 UTC (rev 199727)
+++ trunk/Source/WebCore/rendering/RenderBox.h        2016-04-19 15:48:00 UTC (rev 199728)
</span><span class="lines">@@ -366,7 +366,7 @@
</span><span class="cx">     };
</span><span class="cx">     // Resolve auto margins in the inline direction of the containing block so that objects can be pushed to the start, middle or end
</span><span class="cx">     // of the containing block.
</span><del>-    void computeInlineDirectionMargins(RenderBlock&amp; containingBlock, LayoutUnit containerWidth, LayoutUnit childWidth, LayoutUnit&amp; marginStart, LayoutUnit&amp; marginEnd) const;
</del><ins>+    void computeInlineDirectionMargins(const RenderBlock&amp; containingBlock, LayoutUnit containerWidth, LayoutUnit childWidth, LayoutUnit&amp; marginStart, LayoutUnit&amp; marginEnd) const;
</ins><span class="cx"> 
</span><span class="cx">     // Used to resolve margins in the containing block's block-flow direction.
</span><span class="cx">     void computeBlockDirectionMargins(const RenderBlock&amp; containingBlock, LayoutUnit&amp; marginBefore, LayoutUnit&amp; marginAfter) const;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderGridcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderGrid.cpp (199727 => 199728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderGrid.cpp        2016-04-19 15:10:36 UTC (rev 199727)
+++ trunk/Source/WebCore/rendering/RenderGrid.cpp        2016-04-19 15:48:00 UTC (rev 199728)
</span><span class="lines">@@ -229,6 +229,9 @@
</span><span class="cx">     Optional&lt;LayoutUnit&gt; freeSpaceForDirection(GridTrackSizingDirection direction) { return direction == ForColumns ? freeSpaceForColumns : freeSpaceForRows; }
</span><span class="cx">     void setFreeSpaceForDirection(GridTrackSizingDirection, Optional&lt;LayoutUnit&gt; freeSpace);
</span><span class="cx"> 
</span><ins>+    enum SizingOperation { TrackSizing, IntrinsicSizeComputation };
+    SizingOperation sizingOperation { TrackSizing };
+
</ins><span class="cx"> private:
</span><span class="cx">     Optional&lt;LayoutUnit&gt; freeSpaceForColumns;
</span><span class="cx">     Optional&lt;LayoutUnit&gt; freeSpaceForRows;
</span><span class="lines">@@ -331,6 +334,7 @@
</span><span class="cx"> {
</span><span class="cx">     LayoutUnit totalGuttersSize = guttersSize(direction, direction == ForRows ? gridRowCount() : gridColumnCount());
</span><span class="cx">     sizingData.setFreeSpaceForDirection(direction, freeSpace - totalGuttersSize);
</span><ins>+    sizingData.sizingOperation = GridSizingData::TrackSizing;
</ins><span class="cx"> 
</span><span class="cx">     LayoutUnit baseSizes, growthLimits;
</span><span class="cx">     computeUsedBreadthOfGridTracks(direction, sizingData, baseSizes, growthLimits);
</span><span class="lines">@@ -432,6 +436,7 @@
</span><span class="cx"> 
</span><span class="cx">     GridSizingData sizingData(gridColumnCount(), gridRowCount());
</span><span class="cx">     sizingData.setFreeSpaceForDirection(ForColumns, Nullopt);
</span><ins>+    sizingData.sizingOperation = GridSizingData::IntrinsicSizeComputation;
</ins><span class="cx">     const_cast&lt;RenderGrid*&gt;(this)-&gt;computeUsedBreadthOfGridTracks(ForColumns, sizingData, minLogicalWidth, maxLogicalWidth);
</span><span class="cx"> 
</span><span class="cx">     LayoutUnit totalGuttersSize = guttersSize(ForColumns, sizingData.columnTracks.size());
</span><span class="lines">@@ -450,6 +455,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(tracksAreWiderThanMinTrackBreadth(ForColumns, sizingData));
</span><span class="cx">     sizingData.setFreeSpaceForDirection(ForRows, Nullopt);
</span><ins>+    sizingData.sizingOperation = GridSizingData::IntrinsicSizeComputation;
</ins><span class="cx">     LayoutUnit minHeight, maxHeight;
</span><span class="cx">     computeUsedBreadthOfGridTracks(ForRows, sizingData, minHeight, maxHeight);
</span><span class="cx"> 
</span><span class="lines">@@ -713,7 +719,7 @@
</span><span class="cx">     return GridTrackSize(minTrackBreadth, maxTrackBreadth);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutUnit RenderGrid::logicalContentHeightForChild(RenderBox&amp; child, GridSizingData&amp; sizingData)
</del><ins>+LayoutUnit RenderGrid::logicalHeightForChild(RenderBox&amp; child, GridSizingData&amp; sizingData)
</ins><span class="cx"> {
</span><span class="cx">     Optional&lt;LayoutUnit&gt; oldOverrideContainingBlockContentLogicalWidth = child.hasOverrideContainingBlockLogicalWidth() ? child.overrideContainingBlockContentLogicalWidth() : LayoutUnit();
</span><span class="cx">     LayoutUnit overrideContainingBlockContentLogicalWidth = gridAreaBreadthForChild(child, ForColumns, sizingData.columnTracks);
</span><span class="lines">@@ -724,7 +730,6 @@
</span><span class="cx">     if (child.needsLayout())
</span><span class="cx">         child.clearOverrideLogicalContentHeight();
</span><span class="cx"> 
</span><del>-    child.setOverrideContainingBlockContentLogicalWidth(overrideContainingBlockContentLogicalWidth);
</del><span class="cx">     // If |child| has a relative logical height, we shouldn't let it override its intrinsic height, which is
</span><span class="cx">     // what we are interested in here. Thus we need to set the override logical height to Nullopt (no possible resolution).
</span><span class="cx">     if (child.hasRelativeLogicalHeight())
</span><span class="lines">@@ -747,12 +752,28 @@
</span><span class="cx">     if (!childSize.isAuto() || childMinSize.isAuto())
</span><span class="cx">         return minContentForChild(child, direction, sizingData);
</span><span class="cx"> 
</span><del>-    if (isRowAxis)
-        return child.computeLogicalWidthInRegionUsing(MinSize, childMinSize, contentLogicalWidth(), *this, nullptr);
</del><ins>+    bool overrideLogicalWidthHasChanged = updateOverrideContainingBlockContentLogicalWidthForChild(child, sizingData);
+    if (isRowAxis) {
+        LayoutUnit marginLogicalWidth = sizingData.sizingOperation == GridSizingData::TrackSizing ? computeMarginLogicalSizeForChild(ForColumns, child) : marginIntrinsicLogicalWidthForChild(child);
+        return child.computeLogicalWidthInRegionUsing(MinSize, childMinSize, child.overrideContainingBlockContentLogicalWidth().valueOr(0), *this, nullptr) + marginLogicalWidth;
+    }
</ins><span class="cx"> 
</span><del>-    return child.computeLogicalHeightUsing(MinSize, childMinSize, Nullopt).valueOr(0);
</del><ins>+    if (overrideLogicalWidthHasChanged)
+        child.setNeedsLayout(MarkOnlyThis);
+    child.layoutIfNeeded();
+    return child.computeLogicalHeightUsing(MinSize, childMinSize, Nullopt).valueOr(0) + child.marginLogicalHeight() + child.scrollbarLogicalHeight();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool RenderGrid::updateOverrideContainingBlockContentLogicalWidthForChild(RenderBox&amp; child, GridSizingData&amp; sizingData)
+{
+    LayoutUnit overrideWidth = gridAreaBreadthForChild(child, ForColumns, sizingData.columnTracks);
+    if (child.hasOverrideContainingBlockLogicalWidth() &amp;&amp; child.overrideContainingBlockContentLogicalWidth() == overrideWidth)
+        return false;
+
+    child.setOverrideContainingBlockContentLogicalWidth(overrideWidth);
+    return true;
+}
+
</ins><span class="cx"> LayoutUnit RenderGrid::minContentForChild(RenderBox&amp; child, GridTrackSizingDirection direction, GridSizingData&amp; sizingData)
</span><span class="cx"> {
</span><span class="cx">     bool hasOrthogonalWritingMode = child.isHorizontalWritingMode() != isHorizontalWritingMode();
</span><span class="lines">@@ -771,7 +792,9 @@
</span><span class="cx">         return child.minPreferredLogicalWidth() + marginIntrinsicLogicalWidthForChild(child);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return logicalContentHeightForChild(child, sizingData);
</del><ins>+    if (updateOverrideContainingBlockContentLogicalWidthForChild(child, sizingData))
+        child.setNeedsLayout(MarkOnlyThis);
+    return logicalHeightForChild(child, sizingData);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> LayoutUnit RenderGrid::maxContentForChild(RenderBox&amp; child, GridTrackSizingDirection direction, GridSizingData&amp; sizingData)
</span><span class="lines">@@ -792,7 +815,9 @@
</span><span class="cx">         return child.maxPreferredLogicalWidth() + marginIntrinsicLogicalWidthForChild(child);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return logicalContentHeightForChild(child, sizingData);
</del><ins>+    if (updateOverrideContainingBlockContentLogicalWidthForChild(child, sizingData))
+        child.setNeedsLayout(MarkOnlyThis);
+    return logicalHeightForChild(child, sizingData);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> class GridItemWithSpan {
</span><span class="lines">@@ -1689,16 +1714,19 @@
</span><span class="cx">     return isHorizontalWritingMode() ? child.verticalMarginExtent() : child.horizontalMarginExtent();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutUnit RenderGrid::computeMarginLogicalHeightForChild(const RenderBox&amp; child) const
</del><ins>+LayoutUnit RenderGrid::computeMarginLogicalSizeForChild(GridTrackSizingDirection direction, const RenderBox&amp; child) const
</ins><span class="cx"> {
</span><span class="cx">     if (!child.style().hasMargin())
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><del>-    LayoutUnit marginBefore;
-    LayoutUnit marginAfter;
-    child.computeBlockDirectionMargins(*this, marginBefore, marginAfter);
</del><ins>+    LayoutUnit marginStart;
+    LayoutUnit marginEnd;
+    if (direction == ForColumns)
+        child.computeInlineDirectionMargins(*this, child.containingBlockLogicalWidthForContentInRegion(nullptr), child.logicalWidth(), marginStart, marginEnd);
+    else
+        child.computeBlockDirectionMargins(*this, marginStart, marginEnd);
</ins><span class="cx"> 
</span><del>-    return marginBefore + marginAfter;
</del><ins>+    return marginStart + marginEnd;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> LayoutUnit RenderGrid::availableAlignmentSpaceForChildBeforeStretching(LayoutUnit gridAreaBreadthForChild, const RenderBox&amp; child) const
</span><span class="lines">@@ -1706,7 +1734,7 @@
</span><span class="cx">     // Because we want to avoid multiple layouts, stretching logic might be performed before
</span><span class="cx">     // children are laid out, so we can't use the child cached values. Hence, we need to
</span><span class="cx">     // compute margins in order to determine the available height before stretching.
</span><del>-    return gridAreaBreadthForChild - (child.needsLayout() ? computeMarginLogicalHeightForChild(child) : marginLogicalHeightForChild(child));
</del><ins>+    return gridAreaBreadthForChild - (child.needsLayout() ? computeMarginLogicalSizeForChild(ForRows, child) : marginLogicalHeightForChild(child));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // FIXME: This logic is shared by RenderFlexibleBox, so it should be moved to RenderBox.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderGridh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderGrid.h (199727 => 199728)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderGrid.h        2016-04-19 15:10:36 UTC (rev 199727)
+++ trunk/Source/WebCore/rendering/RenderGrid.h        2016-04-19 15:48:00 UTC (rev 199728)
</span><span class="lines">@@ -130,7 +130,8 @@
</span><span class="cx"> 
</span><span class="cx">     GridTrackSize gridTrackSize(GridTrackSizingDirection, unsigned) const;
</span><span class="cx"> 
</span><del>-    LayoutUnit logicalContentHeightForChild(RenderBox&amp;, GridSizingData&amp;);
</del><ins>+    bool updateOverrideContainingBlockContentLogicalWidthForChild(RenderBox&amp;, GridSizingData&amp;);
+    LayoutUnit logicalHeightForChild(RenderBox&amp;, GridSizingData&amp;);
</ins><span class="cx">     LayoutUnit minSizeForChild(RenderBox&amp;, GridTrackSizingDirection, GridSizingData&amp;);
</span><span class="cx">     LayoutUnit minContentForChild(RenderBox&amp;, GridTrackSizingDirection, GridSizingData&amp;);
</span><span class="cx">     LayoutUnit maxContentForChild(RenderBox&amp;, GridTrackSizingDirection, GridSizingData&amp;);
</span><span class="lines">@@ -152,7 +153,7 @@
</span><span class="cx">     void paintChildren(PaintInfo&amp; forSelf, const LayoutPoint&amp; paintOffset, PaintInfo&amp; forChild, bool usePrintRect) override;
</span><span class="cx">     bool needToStretchChildLogicalHeight(const RenderBox&amp;) const;
</span><span class="cx">     LayoutUnit marginLogicalHeightForChild(const RenderBox&amp;) const;
</span><del>-    LayoutUnit computeMarginLogicalHeightForChild(const RenderBox&amp;) const;
</del><ins>+    LayoutUnit computeMarginLogicalSizeForChild(GridTrackSizingDirection, const RenderBox&amp;) const;
</ins><span class="cx">     LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit gridAreaBreadthForChild, const RenderBox&amp;) const;
</span><span class="cx">     void applyStretchAlignmentToChildIfNeeded(RenderBox&amp;);
</span><span class="cx">     bool hasAutoMarginsInColumnAxis(const RenderBox&amp;) const;
</span></span></pre>
</div>
</div>

</body>
</html>