<!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>[185318] 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/185318">185318</a></dd>
<dt>Author</dt> <dd>svillar@igalia.com</dd>
<dt>Date</dt> <dd>2015-06-08 09:13:42 -0700 (Mon, 08 Jun 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>[CSS Grid Layout] Add some more testing for grid line names
https://bugs.webkit.org/show_bug.cgi?id=145691
Reviewed by Darin Adler.
After moving to the new syntax which uses brackets instead of
parentheses for grid line names lists, it's good to improve a bit
the testing of the feature with some more new test cases.
* fast/css-grid-layout/named-grid-line-get-set-expected.txt:
* fast/css-grid-layout/named-grid-line-get-set.html:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutnamedgridlinegetsetexpectedtxt">trunk/LayoutTests/fast/css-grid-layout/named-grid-line-get-set-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutnamedgridlinegetsethtml">trunk/LayoutTests/fast/css-grid-layout/named-grid-line-get-set.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (185317 => 185318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-06-08 15:59:14 UTC (rev 185317)
+++ trunk/LayoutTests/ChangeLog        2015-06-08 16:13:42 UTC (rev 185318)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2015-06-08 Sergio Villar Senin <svillar@igalia.com>
+
+ [CSS Grid Layout] Add some more testing for grid line names
+ https://bugs.webkit.org/show_bug.cgi?id=145691
+
+ Reviewed by Darin Adler.
+
+ After moving to the new syntax which uses brackets instead of
+ parentheses for grid line names lists, it's good to improve a bit
+ the testing of the feature with some more new test cases.
+
+ * fast/css-grid-layout/named-grid-line-get-set-expected.txt:
+ * fast/css-grid-layout/named-grid-line-get-set.html:
+
</ins><span class="cx"> 2015-06-07 Darin Adler <darin@apple.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION (r181720): Unnecessary layout triggered any time animated GIF advances to a new frame
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutnamedgridlinegetsetexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/named-grid-line-get-set-expected.txt (185317 => 185318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/named-grid-line-get-set-expected.txt        2015-06-08 15:59:14 UTC (rev 185317)
+++ trunk/LayoutTests/fast/css-grid-layout/named-grid-line-get-set-expected.txt        2015-06-08 16:13:42 UTC (rev 185318)
</span><span class="lines">@@ -22,6 +22,10 @@
</span><span class="cx"> PASS window.getComputedStyle(gridWithFixedMultiple, '').getPropertyValue('-webkit-grid-template-rows') is "[first nav] 15px [last]"
</span><span class="cx"> PASS window.getComputedStyle(gridWithPercentageSameStringMultipleTimes, '').getPropertyValue('-webkit-grid-template-columns') is "[first nav] 80px [nav] 120px [last]"
</span><span class="cx"> PASS window.getComputedStyle(gridWithPercentageSameStringMultipleTimes, '').getPropertyValue('-webkit-grid-template-rows') is "[first nav2] 150px [nav2] 450px [last]"
</span><ins>+PASS window.getComputedStyle(gridWithRepeatElement, '').getPropertyValue('-webkit-grid-template-columns') is "[first] 10px [nav nav2] 400px [nav nav2] 400px"
+PASS window.getComputedStyle(gridWithRepeatElement, '').getPropertyValue('-webkit-grid-template-rows') is "100px [nav nav2] 150px [nav nav2] 150px [last]"
+PASS window.getComputedStyle(gridWithEmptyBrackets, '').getPropertyValue('-webkit-grid-template-columns') is "10px"
+PASS window.getComputedStyle(gridWithEmptyBrackets, '').getPropertyValue('-webkit-grid-template-rows') is "20px 50px"
</ins><span class="cx">
</span><span class="cx"> Test getting and setting -webkit-grid-template-columns and -webkit-grid-template-rows through JS
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "[first] 18px"
</span><span class="lines">@@ -72,12 +76,40 @@
</span><span class="cx"> PASS element.style.webkitGridTemplateColumns is "[foo bar] auto [foo] auto [bar]"
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "[foo bar] 0px [foo] 0px [bar]"
</span><span class="cx"> PASS element.style.webkitGridTemplateRows is "[foo bar] auto [foo] auto [bar]"
</span><ins>+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "[first] 0px [foo bar] 20px [foo bar] 20px"
+PASS element.style.webkitGridTemplateColumns is "[first] auto [foo bar] 20px [foo bar] 20px"
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "220px [foo] 300px [baz]"
+PASS element.style.webkitGridTemplateRows is "220px [foo] 50% [baz]"
</ins><span class="cx">
</span><ins>+Test getting invalid grid-template-columns and grid-template-rows set through CSS
+PASS window.getComputedStyle(gridWithoutBrackets, '').getPropertyValue('-webkit-grid-template-columns') is "none"
+PASS window.getComputedStyle(gridWithoutBrackets, '').getPropertyValue('-webkit-grid-template-rows') is "none"
+PASS window.getComputedStyle(gridWithInvalidNestedBrackets, '').getPropertyValue('-webkit-grid-template-columns') is "none"
+PASS window.getComputedStyle(gridWithInvalidNestedBrackets, '').getPropertyValue('-webkit-grid-template-rows') is "none"
+PASS window.getComputedStyle(gridWithUnbalancedBrackets, '').getPropertyValue('-webkit-grid-template-columns') is "none"
+PASS window.getComputedStyle(gridWithUnbalancedBrackets, '').getPropertyValue('-webkit-grid-template-rows') is "none"
+PASS window.getComputedStyle(gridWithMisplacedBrackets, '').getPropertyValue('-webkit-grid-template-columns') is "none"
+PASS window.getComputedStyle(gridWithMisplacedBrackets, '').getPropertyValue('-webkit-grid-template-rows') is "none"
+PASS window.getComputedStyle(gridWithContiguousBrackets, '').getPropertyValue('-webkit-grid-template-columns') is "none"
+PASS window.getComputedStyle(gridWithContiguousBrackets, '').getPropertyValue('-webkit-grid-template-rows') is "none"
+
</ins><span class="cx"> Test getting and setting invalid -webkit-grid-template-columns and -webkit-grid-template-rows through JS
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
</span><ins>+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-columns') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-grid-template-rows') is "none"
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutnamedgridlinegetsethtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/named-grid-line-get-set.html (185317 => 185318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/named-grid-line-get-set.html        2015-06-08 15:59:14 UTC (rev 185317)
+++ trunk/LayoutTests/fast/css-grid-layout/named-grid-line-get-set.html        2015-06-08 16:13:42 UTC (rev 185318)
</span><span class="lines">@@ -38,6 +38,34 @@
</span><span class="cx"> -webkit-grid-template-columns: [first nav] 10% [nav] 15% [last];
</span><span class="cx"> -webkit-grid-template-rows: [first nav2] 25% [nav2] 75% [last];
</span><span class="cx"> }
</span><ins>+.gridWithRepeat {
+ -webkit-grid-template-columns: [first] 10px repeat(2, [nav nav2] 50%);
+ -webkit-grid-template-rows: 100px repeat(2, [nav nav2] 25%) [last];
+}
+.gridWithEmptyBrackets {
+ -webkit-grid-template-columns: [] 10px;
+ -webkit-grid-template-rows: 20px [ ] 50px [];
+}
+.gridWithoutBrackets {
+ -webkit-grid-template-columns: first nav 10px;
+ -webkit-grid-template-rows: first 50% last;
+}
+.gridWithInvalidNestedBrackets {
+ -webkit-grid-template-columns: [first [nav]] 10px [last];
+ -webkit-grid-template-rows: [first] 50% [last [nav] nav2];
+}
+.gridWithUnbalancedBrackets {
+ -webkit-grid-template-columns: [first nav 10px;
+ -webkit-grid-template-rows: [first] 50% last];
+}
+.gridWithMisplacedBrackets {
+ -webkit-grid-template-columns: [first 10px] 50%;
+ -webkit-grid-template-rows: [first] [nav 50%];
+}
+.gridWithContiguousBrackets {
+ -webkit-grid-template-columns: [first] [nav] 10px;
+ -webkit-grid-template-rows: 50px [nav nav2] [middle] 10px;
+}
</ins><span class="cx"> </style>
</span><span class="cx"> <script src="../../resources/js-test-pre.js"></script>
</span><span class="cx"> </head>
</span><span class="lines">@@ -55,6 +83,13 @@
</span><span class="cx"> <div class="grid gridWithMinMax" id="gridWithMinMax"></div>
</span><span class="cx"> <div class="grid gridWithFixedMultiple" id="gridWithFixedMultiple"></div>
</span><span class="cx"> <div class="grid gridWithPercentageSameStringMultipleTimes" id="gridWithPercentageSameStringMultipleTimes"></div>
</span><ins>+<div class="grid gridWithRepeat" id="gridWithRepeatElement"></div>
+<div class="grid gridWithEmptyBrackets" id="gridWithEmptyBrackets"></div>
+<div class="grid gridWithoutBrackets" id="gridWithoutBrackets"></div>
+<div class="grid gridWithInvalidNestedBrackets" id="gridWithInvalidNestedBrackets"></div>
+<div class="grid gridWithUnbalancedBrackets" id="gridWithUnbalancedBrackets"></div>
+<div class="grid gridWithMisplacedBrackets" id="gridWithMisplacedBrackets"></div>
+<div class="grid gridWithContiguousBrackets" id="gridWithContiguousBrackets"></div>
</ins><span class="cx"> <script src="resources/grid-definitions-parsing-utils.js"></script>
</span><span class="cx"> <script>
</span><span class="cx"> description('Test that setting and getting grid-template-columns and grid-template-rows works as expected');
</span><span class="lines">@@ -69,6 +104,8 @@
</span><span class="cx"> testGridTemplatesValues(document.getElementById("gridWithMinMax"), "[first] 80px", "300px [last]");
</span><span class="cx"> testGridTemplatesValues(document.getElementById("gridWithFixedMultiple"), "[first nav] 10px [last]", "[first nav] 15px [last]");
</span><span class="cx"> testGridTemplatesValues(document.getElementById("gridWithPercentageSameStringMultipleTimes"), "[first nav] 80px [nav] 120px [last]", "[first nav2] 150px [nav2] 450px [last]");
</span><ins>+ testGridTemplatesValues(document.getElementById("gridWithRepeatElement"), "[first] 10px [nav nav2] 400px [nav nav2] 400px", "100px [nav nav2] 150px [nav nav2] 150px [last]");
+ testGridTemplatesValues(document.getElementById("gridWithEmptyBrackets"), "10px", "20px 50px");
</ins><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test getting and setting -webkit-grid-template-columns and -webkit-grid-template-rows through JS");
</span><span class="lines">@@ -84,12 +121,28 @@
</span><span class="cx"> testGridTemplatesSetJSValues("[first nav] minmax(-webkit-min-content, -webkit-max-content) [last]", "[first nav] minmax(-webkit-max-content, -webkit-min-content) [last]", "[first nav] 0px [last]", "[first nav] 0px [last]", "[first nav] minmax(-webkit-min-content, -webkit-max-content) [last]", "[first nav] minmax(-webkit-max-content, -webkit-min-content) [last]");
</span><span class="cx"> testGridTemplatesSetJSValues("[first nav] minmax(-webkit-min-content, -webkit-max-content) [nav] auto [last]", "[first nav2] minmax(-webkit-max-content, -webkit-min-content) [nav2] minmax(10px, 15px) [last]", "[first nav] 0px [nav] 0px [last]", "[first nav2] 0px [nav2] 15px [last]", "[first nav] minmax(-webkit-min-content, -webkit-max-content) [nav] auto [last]", "[first nav2] minmax(-webkit-max-content, -webkit-min-content) [nav2] minmax(10px, 15px) [last]");
</span><span class="cx"> testGridTemplatesSetJSValues("[foo bar] auto [foo] auto [bar]", "[foo bar] auto [foo] auto [bar]", "[foo bar] 0px [foo] 0px [bar]", "[foo bar] 0px [foo] 0px [bar]", "[foo bar] auto [foo] auto [bar]", "[foo bar] auto [foo] auto [bar]");
</span><ins>+ testGridTemplatesSetJSValues("[first] auto repeat(2, [foo bar] 20px)", "220px [foo] repeat(1, 50% [baz])", "[first] 0px [foo bar] 20px [foo bar] 20px", "220px [foo] 300px [baz]", "[first] auto [foo bar] 20px [foo bar] 20px", "220px [foo] 50% [baz]");
</ins><span class="cx">
</span><span class="cx"> debug("");
</span><ins>+ debug("Test getting invalid grid-template-columns and grid-template-rows set through CSS");
+ testGridTemplatesValues(document.getElementById("gridWithoutBrackets"), "none", "none");
+ testGridTemplatesValues(document.getElementById("gridWithInvalidNestedBrackets"), "none", "none");
+ testGridTemplatesValues(document.getElementById("gridWithUnbalancedBrackets"), "none", "none");
+ testGridTemplatesValues(document.getElementById("gridWithMisplacedBrackets"), "none", "none");
+ testGridTemplatesValues(document.getElementById("gridWithContiguousBrackets"), "none", "none");
+
+ debug("");
</ins><span class="cx"> debug("Test getting and setting invalid -webkit-grid-template-columns and -webkit-grid-template-rows through JS");
</span><span class="cx"> testGridTemplatesSetBadJSValues("foo", "bar");
</span><span class="cx"> testGridTemplatesSetBadJSValues("foo bar", "bar foo");
</span><ins>+ testGridTemplatesSetBadJSValues("[foo]", "[bar");
+ testGridTemplatesSetBadJSValues("[foo bar]", "[bar foo]");
+ testGridTemplatesSetBadJSValues("foo bar 10px", "50% baz bar foo 2em");
+ testGridTemplatesSetBadJSValues("[foo [bar]] 10px", "50% [[baz bar] foo] 2em");
+ testGridTemplatesSetBadJSValues("[foo bar 10px", "50% [baz bar] foo] 2em");
+ testGridTemplatesSetBadJSValues("[foo 10px] 2em", "[50% bar] [foo]");
</ins><span class="cx"> </script>
</span><span class="cx"> <script src="../../resources/js-test-post.js"></script>
</span><span class="cx"> </body>
</span><span class="cx"> </html>
</span><ins>+
</ins></span></pre>
</div>
</div>
</body>
</html>