<!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 <rego@igalia.com>
+
+ [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 <zalan@apple.com>
</span><span class="cx">
</span><span class="cx"> The CSS 'columns' property when set on the <body> 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 "3fr"
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "600px"
</span><span class="cx"> PASS element.style.gridTemplateRows is "4fr"
</span><ins>+PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "0px"
+PASS element.style.gridTemplateColumns is "0fr"
+PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "0px"
+PASS element.style.gridTemplateRows is "0fr"
</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 "150px"
</span><span class="lines">@@ -184,6 +188,8 @@
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
</span><ins>+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
</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 "18px"
</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 "[head] 15px [tail]"
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "\"a\""
</span><span class="cx"> PASS element.style.gridTemplateAreas is "\"a\""
</span><ins>+PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "100px"
+PASS element.style.gridTemplateColumns is "100px"
+PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "[foo1 bar1] 50px [foo2 bar2 foo3 bar3] 50px [foo4 bar4]"
+PASS element.style.gridTemplateRows is "[foo1 bar1] 50px [foo2 bar2] [foo3 bar3] 50px [foo4 bar4]"
+PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "\"a\" \"b\""
+PASS element.style.gridTemplateAreas is "\"a\" \"b\""
</ins><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "0px"
</span><span class="cx"> PASS element.style.gridTemplateColumns is "none"
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "0px"
</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("Test getting and setting grid-template shorthand through JS");
</span><span class="cx"> testGridDefinitionsSetJSValues("66px / 18px", "18px", "66px", "none");
</span><span class="cx"> testGridDefinitionsSetJSValues("[head] 'a' 15px [tail] / 10px", "10px", "[head] 15px [tail]", "\"a\"");
</span><ins>+ testGridDefinitionsSetJSValues("[foo1 bar1] 'a' 50px [foo2 bar2] [foo3 bar3] 'b' 50px [foo4 bar4] / 100px", "100px", "[foo1 bar1] 50px [foo2 bar2 foo3 bar3] 50px [foo4 bar4]", "\"a\" \"b\"", "100px", "[foo1 bar1] 50px [foo2 bar2] [foo3 bar3] 50px [foo4 bar4]");
</ins><span class="cx"> testGridDefinitionsSetJSValues("'a'", "0px", "0px", "\"a\"", "none", "auto");
</span><span class="cx">
</span><span class="cx"> debug("");
</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 "minmax(auto, 8vh)"
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "minmax(80px, auto)"
</span><span class="cx"> PASS element.style.gridTemplateRows is "minmax(10vw, auto)"
</span><ins>+PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "0px"
+PASS element.style.gridTemplateColumns is "0fr"
+PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "0px"
+PASS element.style.gridTemplateRows is "0fr"
</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 "none"
</span><span class="lines">@@ -132,6 +136,8 @@
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
</span><ins>+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
</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 "18px"
</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("+3fr", "+4fr", "800px", "600px", "3fr", "4fr");
</span><span class="cx">
</span><ins>+// 0fr is allowed.
+testGridTemplatesSetJSValues(".0000fr", "0fr", "0px", "0px", "0fr", "0fr");
+
</ins><span class="cx"> debug("");
</span><span class="cx"> debug("Test getting and setting grid-template-columns and grid-template-rows to calc() values through JS");
</span><span class="cx"> testGridTemplatesSetJSValues("calc(150px)", "calc(75px)", "150px", "75px");
</span><span class="lines">@@ -93,6 +96,8 @@
</span><span class="cx">
</span><span class="cx"> testGridTemplatesSetBadJSValues("-2fr", "3ffr");
</span><span class="cx"> testGridTemplatesSetBadJSValues("-2.05fr", "+-3fr");
</span><ins>+// A dimension doesn't allow spaces between the number and the unit.
+testGridTemplatesSetBadJSValues("1r", "13 fr");
</ins><span class="cx">
</span><span class="cx"> testGridTemplatesSetBadJSValues("7.-fr", "-8,0fr");
</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("+3fr", "+4fr", "3fr", "4fr", "3fr", "4fr");
</span><span class="cx"> testNonGridTemplatesSetJSValues("minmax(auto, 8vh)", "minmax(10vw, auto)", "minmax(auto, 48px)", "minmax(80px, auto)");
</span><ins>+// 0fr is allowed.
+testGridTemplatesSetJSValues(".0000fr", "0fr", "0px", "0px", "0fr", "0fr");
</ins><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test setting grid-template-columns and grid-template-rows to bad values through JS");
</span><span class="lines">@@ -72,6 +74,8 @@
</span><span class="cx"> testGridTemplatesSetBadJSValues("-2fr", "3ffr");
</span><span class="cx"> testGridTemplatesSetBadJSValues("-2.05fr", "+-3fr");
</span><span class="cx"> testGridTemplatesSetBadJSValues("7.-fr", "-8,0fr");
</span><ins>+// A dimension doesn't allow spaces between the number and the unit.
+testGridTemplatesSetBadJSValues("1r", "13 fr");
</ins><span class="cx"> // Negative values are not allowed.
</span><span class="cx"> testGridTemplatesSetBadJSValues("-1px", "-6em");
</span><span class="cx"> testGridTemplatesSetBadJSValues("minmax(-1%, 32%)", "minmax(2vw, -6em)");
</span></span></pre>
</div>
</div>
</body>
</html>