<!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>[209721] trunk/LayoutTests</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/209721">209721</a></dd>
<dt>Author</dt> <dd>rego@igalia.com</dd>
<dt>Date</dt> <dd>2016-12-12 12:49:11 -0800 (Mon, 12 Dec 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[css-grid] Add some test cases that were removed in <a href="http://trac.webkit.org/projects/webkit/changeset/209562">r209562</a>
https://bugs.webkit.org/show_bug.cgi?id=165750

Reviewed by Sergio Villar Senin.

Some valid test cases were removed in <a href="http://trac.webkit.org/projects/webkit/changeset/209562">r209562</a>, this patch adds them back.

* fast/css-grid-layout/grid-template-shorthand-get-set.html: The specified style is now preserved,
so we've to use a different value for it (as it doesn't merge the line names).
* fast/css-grid-layout/resources/grid-columns-rows-get-set.js: Flexible sizes must be non-negative,
but 0fr should be accepted (this is new as it was not working like that with the old parser).
A space between the dimension and the unit is wrong for flexible sizes.
* fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js: Ditto.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridcolumnsrowsgetsetexpectedtxt">trunk/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridtemplateshorthandgetsetexpectedtxt">trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridtemplateshorthandgetsethtml">trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set.html</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutnongridcolumnsrowsgetsetexpectedtxt">trunk/LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutresourcesgridcolumnsrowsgetsetjs">trunk/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutresourcesnongridcolumnsrowsgetsetjs">trunk/LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (209720 => 209721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-12-12 20:35:12 UTC (rev 209720)
+++ trunk/LayoutTests/ChangeLog        2016-12-12 20:49:11 UTC (rev 209721)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-12-12  Manuel Rego Casasnovas  &lt;rego@igalia.com&gt;
+
+        [css-grid] Add some test cases that were removed in r209562
+        https://bugs.webkit.org/show_bug.cgi?id=165750
+
+        Reviewed by Sergio Villar Senin.
+
+        Some valid test cases were removed in r209562, this patch adds them back.
+
+        * fast/css-grid-layout/grid-template-shorthand-get-set.html: The specified style is now preserved,
+        so we've to use a different value for it (as it doesn't merge the line names).
+        * fast/css-grid-layout/resources/grid-columns-rows-get-set.js: Flexible sizes must be non-negative,
+        but 0fr should be accepted (this is new as it was not working like that with the old parser).
+        A space between the dimension and the unit is wrong for flexible sizes.
+        * fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js: Ditto.
+
</ins><span class="cx"> 2016-12-12  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         The CSS 'columns' property when set on the &lt;body&gt; element makes short columns
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridcolumnsrowsgetsetexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt (209720 => 209721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt        2016-12-12 20:35:12 UTC (rev 209720)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt        2016-12-12 20:49:11 UTC (rev 209721)
</span><span class="lines">@@ -124,6 +124,10 @@
</span><span class="cx"> PASS element.style.gridTemplateColumns is &quot;3fr&quot;
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;600px&quot;
</span><span class="cx"> PASS element.style.gridTemplateRows is &quot;4fr&quot;
</span><ins>+PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;0px&quot;
+PASS element.style.gridTemplateColumns is &quot;0fr&quot;
+PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;0px&quot;
+PASS element.style.gridTemplateRows is &quot;0fr&quot;
</ins><span class="cx"> 
</span><span class="cx"> Test getting and setting grid-template-columns and grid-template-rows to calc() values through JS
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;150px&quot;
</span><span class="lines">@@ -184,6 +188,8 @@
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;none&quot;
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;none&quot;
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;none&quot;
</span><ins>+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;none&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;none&quot;
</ins><span class="cx"> 
</span><span class="cx"> Test setting grid-template-columns and grid-template-rows back to 'none' through JS
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;18px&quot;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridtemplateshorthandgetsetexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt (209720 => 209721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt        2016-12-12 20:35:12 UTC (rev 209720)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt        2016-12-12 20:49:11 UTC (rev 209721)
</span><span class="lines">@@ -174,6 +174,12 @@
</span><span class="cx"> PASS element.style.gridTemplateRows is &quot;[head] 15px [tail]&quot;
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is &quot;\&quot;a\&quot;&quot;
</span><span class="cx"> PASS element.style.gridTemplateAreas is &quot;\&quot;a\&quot;&quot;
</span><ins>+PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;100px&quot;
+PASS element.style.gridTemplateColumns is &quot;100px&quot;
+PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;[foo1 bar1] 50px [foo2 bar2 foo3 bar3] 50px [foo4 bar4]&quot;
+PASS element.style.gridTemplateRows is &quot;[foo1 bar1] 50px [foo2 bar2] [foo3 bar3] 50px [foo4 bar4]&quot;
+PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is &quot;\&quot;a\&quot; \&quot;b\&quot;&quot;
+PASS element.style.gridTemplateAreas is &quot;\&quot;a\&quot; \&quot;b\&quot;&quot;
</ins><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;0px&quot;
</span><span class="cx"> PASS element.style.gridTemplateColumns is &quot;none&quot;
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;0px&quot;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridtemplateshorthandgetsethtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set.html (209720 => 209721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set.html        2016-12-12 20:35:12 UTC (rev 209720)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set.html        2016-12-12 20:49:11 UTC (rev 209721)
</span><span class="lines">@@ -267,6 +267,7 @@
</span><span class="cx">     debug(&quot;Test getting and setting grid-template shorthand through JS&quot;);
</span><span class="cx">     testGridDefinitionsSetJSValues(&quot;66px / 18px&quot;, &quot;18px&quot;, &quot;66px&quot;, &quot;none&quot;);
</span><span class="cx">     testGridDefinitionsSetJSValues(&quot;[head] 'a' 15px [tail] / 10px&quot;, &quot;10px&quot;, &quot;[head] 15px [tail]&quot;, &quot;\&quot;a\&quot;&quot;);
</span><ins>+    testGridDefinitionsSetJSValues(&quot;[foo1 bar1] 'a' 50px [foo2 bar2] [foo3 bar3] 'b' 50px [foo4 bar4] / 100px&quot;, &quot;100px&quot;, &quot;[foo1 bar1] 50px [foo2 bar2 foo3 bar3] 50px [foo4 bar4]&quot;, &quot;\&quot;a\&quot; \&quot;b\&quot;&quot;, &quot;100px&quot;, &quot;[foo1 bar1] 50px [foo2 bar2] [foo3 bar3] 50px [foo4 bar4]&quot;);
</ins><span class="cx">     testGridDefinitionsSetJSValues(&quot;'a'&quot;, &quot;0px&quot;, &quot;0px&quot;, &quot;\&quot;a\&quot;&quot;, &quot;none&quot;, &quot;auto&quot;);
</span><span class="cx"> 
</span><span class="cx">     debug(&quot;&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutnongridcolumnsrowsgetsetexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt (209720 => 209721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt        2016-12-12 20:35:12 UTC (rev 209720)
+++ trunk/LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt        2016-12-12 20:49:11 UTC (rev 209721)
</span><span class="lines">@@ -110,6 +110,10 @@
</span><span class="cx"> PASS element.style.gridTemplateColumns is &quot;minmax(auto, 8vh)&quot;
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;minmax(80px, auto)&quot;
</span><span class="cx"> PASS element.style.gridTemplateRows is &quot;minmax(10vw, auto)&quot;
</span><ins>+PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;0px&quot;
+PASS element.style.gridTemplateColumns is &quot;0fr&quot;
+PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;0px&quot;
+PASS element.style.gridTemplateRows is &quot;0fr&quot;
</ins><span class="cx"> 
</span><span class="cx"> Test setting grid-template-columns and grid-template-rows to bad values through JS
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;none&quot;
</span><span class="lines">@@ -132,6 +136,8 @@
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;none&quot;
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;none&quot;
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;none&quot;
</span><ins>+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;none&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;none&quot;
</ins><span class="cx"> 
</span><span class="cx"> Test setting grid-template-columns and grid-template-rows back to 'none' through JS
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;18px&quot;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutresourcesgridcolumnsrowsgetsetjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js (209720 => 209721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js        2016-12-12 20:35:12 UTC (rev 209720)
+++ trunk/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js        2016-12-12 20:49:11 UTC (rev 209721)
</span><span class="lines">@@ -64,6 +64,9 @@
</span><span class="cx"> // A leading '+' is allowed.
</span><span class="cx"> testGridTemplatesSetJSValues(&quot;+3fr&quot;, &quot;+4fr&quot;, &quot;800px&quot;, &quot;600px&quot;, &quot;3fr&quot;, &quot;4fr&quot;);
</span><span class="cx"> 
</span><ins>+// 0fr is allowed.
+testGridTemplatesSetJSValues(&quot;.0000fr&quot;, &quot;0fr&quot;, &quot;0px&quot;, &quot;0px&quot;, &quot;0fr&quot;, &quot;0fr&quot;);
+
</ins><span class="cx"> debug(&quot;&quot;);
</span><span class="cx"> debug(&quot;Test getting and setting grid-template-columns and grid-template-rows to calc() values through JS&quot;);
</span><span class="cx"> testGridTemplatesSetJSValues(&quot;calc(150px)&quot;, &quot;calc(75px)&quot;, &quot;150px&quot;, &quot;75px&quot;);
</span><span class="lines">@@ -93,6 +96,8 @@
</span><span class="cx"> 
</span><span class="cx"> testGridTemplatesSetBadJSValues(&quot;-2fr&quot;, &quot;3ffr&quot;);
</span><span class="cx"> testGridTemplatesSetBadJSValues(&quot;-2.05fr&quot;, &quot;+-3fr&quot;);
</span><ins>+// A dimension doesn't allow spaces between the number and the unit.
+testGridTemplatesSetBadJSValues(&quot;1r&quot;, &quot;13 fr&quot;);
</ins><span class="cx"> 
</span><span class="cx"> testGridTemplatesSetBadJSValues(&quot;7.-fr&quot;, &quot;-8,0fr&quot;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutresourcesnongridcolumnsrowsgetsetjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js (209720 => 209721)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js        2016-12-12 20:35:12 UTC (rev 209720)
+++ trunk/LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js        2016-12-12 20:49:11 UTC (rev 209721)
</span><span class="lines">@@ -56,6 +56,8 @@
</span><span class="cx"> // A leading '+' is allowed.
</span><span class="cx"> testNonGridTemplatesSetJSValues(&quot;+3fr&quot;, &quot;+4fr&quot;, &quot;3fr&quot;, &quot;4fr&quot;, &quot;3fr&quot;, &quot;4fr&quot;);
</span><span class="cx"> testNonGridTemplatesSetJSValues(&quot;minmax(auto, 8vh)&quot;, &quot;minmax(10vw, auto)&quot;, &quot;minmax(auto, 48px)&quot;, &quot;minmax(80px, auto)&quot;);
</span><ins>+// 0fr is allowed.
+testGridTemplatesSetJSValues(&quot;.0000fr&quot;, &quot;0fr&quot;, &quot;0px&quot;, &quot;0px&quot;, &quot;0fr&quot;, &quot;0fr&quot;);
</ins><span class="cx"> 
</span><span class="cx"> debug(&quot;&quot;);
</span><span class="cx"> debug(&quot;Test setting grid-template-columns and grid-template-rows to bad values through JS&quot;);
</span><span class="lines">@@ -72,6 +74,8 @@
</span><span class="cx"> testGridTemplatesSetBadJSValues(&quot;-2fr&quot;, &quot;3ffr&quot;);
</span><span class="cx"> testGridTemplatesSetBadJSValues(&quot;-2.05fr&quot;, &quot;+-3fr&quot;);
</span><span class="cx"> testGridTemplatesSetBadJSValues(&quot;7.-fr&quot;, &quot;-8,0fr&quot;);
</span><ins>+// A dimension doesn't allow spaces between the number and the unit.
+testGridTemplatesSetBadJSValues(&quot;1r&quot;, &quot;13 fr&quot;);
</ins><span class="cx"> // Negative values are not allowed.
</span><span class="cx"> testGridTemplatesSetBadJSValues(&quot;-1px&quot;, &quot;-6em&quot;);
</span><span class="cx"> testGridTemplatesSetBadJSValues(&quot;minmax(-1%, 32%)&quot;, &quot;minmax(2vw, -6em)&quot;);
</span></span></pre>
</div>
</div>

</body>
</html>