<!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>[202972] 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/202972">202972</a></dd>
<dt>Author</dt> <dd>rego@igalia.com</dd>
<dt>Date</dt> <dd>2016-07-08 01:57:50 -0700 (Fri, 08 Jul 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>[css-grid] Disallow repeat() in grid-template shorthand
https://bugs.webkit.org/show_bug.cgi?id=159200
Reviewed by Sergio Villar Senin.
Source/WebCore:
As discussed on www-style, "repeat()" notation shouldn't be allowed
in the ASCII branch of the grid-template shorthand.
https://lists.w3.org/Archives/Public/www-style/2016May/0193.html
The patch uses an enum to invalidate "repeat()" when parsing
the grid-template shorthand.
Test: fast/css-grid-layout/grid-template-shorthand-get-set.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridTemplateColumns): Add enum.
(WebCore::CSSParser::parseGridTemplateRowsAndAreasAndColumns): Pass "DisallowRepeat"
when calling parseGridTemplateColumns().
(WebCore::CSSParser::parseGridTrackList): Use enum to allow/disallow repeat.
* css/CSSParser.h: Define the new enum and modify method signatures to use it,
setting it to "AllowRepeat" by default.
LayoutTests:
Modified test to follow the new behavior including new cases.
* fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt:
* fast/css-grid-layout/grid-template-shorthand-get-set.html:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</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="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParserh">trunk/Source/WebCore/css/CSSParser.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (202971 => 202972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-07-08 07:17:17 UTC (rev 202971)
+++ trunk/LayoutTests/ChangeLog        2016-07-08 08:57:50 UTC (rev 202972)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-07-08 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [css-grid] Disallow repeat() in grid-template shorthand
+ https://bugs.webkit.org/show_bug.cgi?id=159200
+
+ Reviewed by Sergio Villar Senin.
+
+ Modified test to follow the new behavior including new cases.
+
+ * fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt:
+ * fast/css-grid-layout/grid-template-shorthand-get-set.html:
+
</ins><span class="cx"> 2016-07-08 Frederic Wang <fwang@igalia.com>
</span><span class="cx">
</span><span class="cx"> Add support for movablelimits.
</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 (202971 => 202972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt        2016-07-08 07:17:17 UTC (rev 202971)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt        2016-07-08 08:57:50 UTC (rev 202972)
</span><span class="lines">@@ -40,10 +40,10 @@
</span><span class="cx"> PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleRowsWithoutRowsSizes, '').getPropertyValue('grid-template-columns') is "10px"
</span><span class="cx"> PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleRowsWithoutRowsSizes, '').getPropertyValue('grid-template-rows') is "[head1] 0px [tail1 head2] 0px [tail2]"
</span><span class="cx"> PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleRowsWithoutRowsSizes, '').getPropertyValue('grid-template-areas') is "\"a\" \"b\""
</span><del>-PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleRowsAndColumns, '').getPropertyValue('grid-template-columns') is "[first] 10px [nav nav2] 15px [nav nav2] 15px"
</del><ins>+PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleRowsAndColumns, '').getPropertyValue('grid-template-columns') is "[first] 10px [nav nav2] 15px [nav] 15px [last]"
</ins><span class="cx"> PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleRowsAndColumns, '').getPropertyValue('grid-template-rows') is "100px [nav nav2] 25px [nav nav2] 25px [last]"
</span><span class="cx"> PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleRowsAndColumns, '').getPropertyValue('grid-template-areas') is "\"a b c\" \"d e f\" \"g h i\""
</span><del>-PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleRowsAndColumnsWithoutRowsSizes, '').getPropertyValue('grid-template-columns') is "[first] 10px [nav nav2] 15px [nav nav2] 15px"
</del><ins>+PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleRowsAndColumnsWithoutRowsSizes, '').getPropertyValue('grid-template-columns') is "[first] 10px [nav nav2] 15px [nav] 15px [last]"
</ins><span class="cx"> PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleRowsAndColumnsWithoutRowsSizes, '').getPropertyValue('grid-template-rows') is "0px [nav nav2] 0px [nav nav2] 0px [last]"
</span><span class="cx"> PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleRowsAndColumnsWithoutRowsSizes, '').getPropertyValue('grid-template-areas') is "\"a b c\" \"d e f\" \"g h i\""
</span><span class="cx"> PASS window.getComputedStyle(gridTemplateComplexFormWithAuto, '').getPropertyValue('grid-template-columns') is "10px"
</span><span class="lines">@@ -129,6 +129,15 @@
</span><span class="cx"> PASS window.getComputedStyle(gridTemplateNoColumnsRowWithEmptyTrailingLineNamesAndNonEmptyLeadingLineNames, '').getPropertyValue('grid-template-columns') is "none"
</span><span class="cx"> PASS window.getComputedStyle(gridTemplateNoColumnsRowWithEmptyTrailingLineNamesAndNonEmptyLeadingLineNames, '').getPropertyValue('grid-template-rows') is "none"
</span><span class="cx"> PASS window.getComputedStyle(gridTemplateNoColumnsRowWithEmptyTrailingLineNamesAndNonEmptyLeadingLineNames, '').getPropertyValue('grid-template-areas') is "none"
</span><ins>+PASS window.getComputedStyle(gridTemplateRepeat, '').getPropertyValue('grid-template-columns') is "none"
+PASS window.getComputedStyle(gridTemplateRepeat, '').getPropertyValue('grid-template-rows') is "none"
+PASS window.getComputedStyle(gridTemplateRepeat, '').getPropertyValue('grid-template-areas') is "none"
+PASS window.getComputedStyle(gridTemplateRepeatAutoFill, '').getPropertyValue('grid-template-columns') is "none"
+PASS window.getComputedStyle(gridTemplateRepeatAutoFill, '').getPropertyValue('grid-template-rows') is "none"
+PASS window.getComputedStyle(gridTemplateRepeatAutoFill, '').getPropertyValue('grid-template-areas') is "none"
+PASS window.getComputedStyle(gridTemplateRepeatAutoFit, '').getPropertyValue('grid-template-columns') is "none"
+PASS window.getComputedStyle(gridTemplateRepeatAutoFit, '').getPropertyValue('grid-template-rows') is "none"
+PASS window.getComputedStyle(gridTemplateRepeatAutoFit, '').getPropertyValue('grid-template-areas') is "none"
</ins><span class="cx">
</span><span class="cx"> Test the initial value
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
</span><span class="lines">@@ -197,6 +206,15 @@
</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><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "none"
</span><ins>+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-areas') 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="trunkLayoutTestsfastcssgridlayoutgridtemplateshorthandgetsethtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set.html (202971 => 202972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set.html        2016-07-08 07:17:17 UTC (rev 202971)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set.html        2016-07-08 08:57:50 UTC (rev 202972)
</span><span class="lines">@@ -45,12 +45,12 @@
</span><span class="cx"> #gridTemplateComplexFormWithLineNamesMultipleRowsAndColumns {
</span><span class="cx"> grid-template: "a b c" 100px [nav]
</span><span class="cx"> [nav2] "d e f" 25px [nav]
</span><del>- [nav2] "g h i" 25px [last] / [first] 10px repeat(2, [nav nav2] 15px);
</del><ins>+ [nav2] "g h i" 25px [last] / [first] 10px [nav nav2] 15px [nav] 15px [last];
</ins><span class="cx"> }
</span><span class="cx"> #gridTemplateComplexFormWithLineNamesMultipleRowsAndColumnsWithoutRowsSizes {
</span><span class="cx"> grid-template: "a b c" [nav]
</span><span class="cx"> [nav2] "d e f" [nav]
</span><del>- [nav2] "g h i" [last] / [first] 10px repeat(2, [nav nav2] 15px);
</del><ins>+ [nav2] "g h i" [last] / [first] 10px [nav nav2] 15px [nav] 15px [last];
</ins><span class="cx"> }
</span><span class="cx"> #gridTemplateComplexFormWithAuto {
</span><span class="cx"> grid-template: "a" / 10px;
</span><span class="lines">@@ -137,6 +137,15 @@
</span><span class="cx"> #gridTemplateNoColumnsRowWithEmptyTrailingLineNamesAndNonEmptyLeadingLineNames {
</span><span class="cx"> grid-template: [first] "a" auto [] [tail];
</span><span class="cx"> }
</span><ins>+#gridTemplateRepeat {
+ grid-template: "a" / repeat(1, 100px);
+}
+#gridTemplateRepeatAutoFill {
+ grid-template: "a" / repeat(auto-fill, 100px);
+}
+#gridTemplateRepeatAutoFit {
+ grid-template: "a" / repeat(auto-fit, 100px);
+}
</ins><span class="cx">
</span><span class="cx"> </style>
</span><span class="cx"> <script src="../../resources/js-test.js"></script>
</span><span class="lines">@@ -184,6 +193,9 @@
</span><span class="cx"> <div class="grid" id="gridTemplateComplexFormColumnsNotParsing2"></div>
</span><span class="cx"> <div class="grid" id="gridTemplateComplexFormWithNoneColumns"></div>
</span><span class="cx"> <div class="grid" id="gridTemplateNoColumnsRowWithTwoEmptyTrailingLineNames"></div>
</span><ins>+<div class="grid" id="gridTemplateRepeat"></div>
+<div class="grid" id="gridTemplateRepeatAutoFill"></div>
+<div class="grid" id="gridTemplateRepeatAutoFit"></div>
</ins><span class="cx"> <script src="resources/grid-template-shorthand-parsing-utils.js"></script>
</span><span class="cx"> <script>
</span><span class="cx"> description("This test checks that the 'grid-template' shorthand is properly parsed and the longhand properties correctly assigned.");
</span><span class="lines">@@ -201,8 +213,8 @@
</span><span class="cx"> testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWithLineNamesMultipleColumnsWithoutRowSize"), "10px 20px", "[head] 0px [tail]", '"a b"');
</span><span class="cx"> testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWithLineNamesMultipleRows"), "10px", "[head1] 15px [tail1 head2] 20px [tail2]", '"a" "b"');
</span><span class="cx"> testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWithLineNamesMultipleRowsWithoutRowsSizes"), "10px", "[head1] 0px [tail1 head2] 0px [tail2]", '"a" "b"');
</span><del>- testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWithLineNamesMultipleRowsAndColumns"), "[first] 10px [nav nav2] 15px [nav nav2] 15px", "100px [nav nav2] 25px [nav nav2] 25px [last]", '"a b c" "d e f" "g h i"');
- testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWithLineNamesMultipleRowsAndColumnsWithoutRowsSizes"), "[first] 10px [nav nav2] 15px [nav nav2] 15px", "0px [nav nav2] 0px [nav nav2] 0px [last]", '"a b c" "d e f" "g h i"');
</del><ins>+ testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWithLineNamesMultipleRowsAndColumns"), "[first] 10px [nav nav2] 15px [nav] 15px [last]", "100px [nav nav2] 25px [nav nav2] 25px [last]", '"a b c" "d e f" "g h i"');
+ testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWithLineNamesMultipleRowsAndColumnsWithoutRowsSizes"), "[first] 10px [nav nav2] 15px [nav] 15px [last]", "0px [nav nav2] 0px [nav nav2] 0px [last]", '"a b c" "d e f" "g h i"');
</ins><span class="cx"> testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWithAuto"), "10px", "0px", '"a"');
</span><span class="cx"> testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormOnlyAreas"), "0px", "0px", '"a"');
</span><span class="cx"> testGridDefinitionsValues(document.getElementById("gridTemplateNoColumnsRowWithEmptyTrailingLineNames"), "0px", "[first] 0px", '"a"');
</span><span class="lines">@@ -233,6 +245,9 @@
</span><span class="cx"> testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWithNoneColumns"), "none", "none", "none");
</span><span class="cx"> testGridDefinitionsValues(document.getElementById("gridTemplateNoColumnsRowWithTwoEmptyTrailingLineNames"), "none", "none", "none");
</span><span class="cx"> testGridDefinitionsValues(document.getElementById("gridTemplateNoColumnsRowWithEmptyTrailingLineNamesAndNonEmptyLeadingLineNames"), "none", "none", "none");
</span><ins>+ testGridDefinitionsValues(document.getElementById("gridTemplateRepeat"), "none", "none", "none");
+ testGridDefinitionsValues(document.getElementById("gridTemplateRepeatAutoFill"), "none", "none", "none");
+ testGridDefinitionsValues(document.getElementById("gridTemplateRepeatAutoFit"), "none", "none", "none");
</ins><span class="cx">
</span><span class="cx"> debug("");
</span><span class="cx"> debug("Test the initial value");
</span><span class="lines">@@ -263,6 +278,9 @@
</span><span class="cx"> testGridDefinitionsSetBadJSValues("15px");
</span><span class="cx"> testGridDefinitionsSetBadJSValues("20px none / 15px");
</span><span class="cx"> testGridDefinitionsSetBadJSValues("10px 'a' / 25px");
</span><ins>+ testGridDefinitionsSetBadJSValues("'a b' / 100px repeat(1, 200px)");
+ testGridDefinitionsSetBadJSValues("'a b c' / repeat(2, 200px) 100px");
+ testGridDefinitionsSetBadJSValues("'a b c d' / 100px repeat(auto-fill, 200px) 100px");
</ins><span class="cx">
</span><span class="cx"> </script>
</span><span class="cx"> </body>
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (202971 => 202972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-07-08 07:17:17 UTC (rev 202971)
+++ trunk/Source/WebCore/ChangeLog        2016-07-08 08:57:50 UTC (rev 202972)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2016-07-08 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [css-grid] Disallow repeat() in grid-template shorthand
+ https://bugs.webkit.org/show_bug.cgi?id=159200
+
+ Reviewed by Sergio Villar Senin.
+
+ As discussed on www-style, "repeat()" notation shouldn't be allowed
+ in the ASCII branch of the grid-template shorthand.
+ https://lists.w3.org/Archives/Public/www-style/2016May/0193.html
+
+ The patch uses an enum to invalidate "repeat()" when parsing
+ the grid-template shorthand.
+
+ Test: fast/css-grid-layout/grid-template-shorthand-get-set.html
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseGridTemplateColumns): Add enum.
+ (WebCore::CSSParser::parseGridTemplateRowsAndAreasAndColumns): Pass "DisallowRepeat"
+ when calling parseGridTemplateColumns().
+ (WebCore::CSSParser::parseGridTrackList): Use enum to allow/disallow repeat.
+ * css/CSSParser.h: Define the new enum and modify method signatures to use it,
+ setting it to "AllowRepeat" by default.
+
</ins><span class="cx"> 2016-07-08 Frederic Wang <fwang@igalia.com>
</span><span class="cx">
</span><span class="cx"> Add support for movablelimits.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (202971 => 202972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2016-07-08 07:17:17 UTC (rev 202971)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2016-07-08 08:57:50 UTC (rev 202972)
</span><span class="lines">@@ -5631,13 +5631,13 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseGridTemplateColumns()
</del><ins>+RefPtr<CSSValue> CSSParser::parseGridTemplateColumns(TrackListType trackListType)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(isCSSGridLayoutEnabled());
</span><span class="cx">
</span><span class="cx"> if (!(m_valueList->current() && isForwardSlashOperator(*m_valueList->current()) && m_valueList->next()))
</span><span class="cx"> return nullptr;
</span><del>- if (auto columnsValue = parseGridTrackList()) {
</del><ins>+ if (auto columnsValue = parseGridTrackList(trackListType)) {
</ins><span class="cx"> if (m_valueList->current())
</span><span class="cx"> return nullptr;
</span><span class="cx"> return columnsValue;
</span><span class="lines">@@ -5690,11 +5690,11 @@
</span><span class="cx"> trailingIdentWasAdded = parseGridLineNames(*m_valueList, templateRows);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- // [<track-list> /]?
</del><ins>+ // [/ <explicit-track-list> ]?
</ins><span class="cx"> RefPtr<CSSValue> templateColumns;
</span><span class="cx"> if (m_valueList->current()) {
</span><span class="cx"> ASSERT(isForwardSlashOperator(*m_valueList->current()));
</span><del>- templateColumns = parseGridTemplateColumns();
</del><ins>+ templateColumns = parseGridTemplateColumns(DisallowRepeat);
</ins><span class="cx"> if (!templateColumns)
</span><span class="cx"> return false;
</span><span class="cx"> // The template-columns <track-list> can't be 'none'.
</span><span class="lines">@@ -5930,7 +5930,7 @@
</span><span class="cx"> return isGridTrackFixedSized(min) || isGridTrackFixedSized(max);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSValue> CSSParser::parseGridTrackList()
</del><ins>+RefPtr<CSSValue> CSSParser::parseGridTrackList(TrackListType trackListType)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(isCSSGridLayoutEnabled());
</span><span class="cx">
</span><span class="lines">@@ -5953,6 +5953,8 @@
</span><span class="cx"> if (isForwardSlashOperator(*currentValue))
</span><span class="cx"> break;
</span><span class="cx"> if (currentValue->unit == CSSParserValue::Function && equalLettersIgnoringASCIICase(currentValue->function->name, "repeat(")) {
</span><ins>+ if (trackListType == DisallowRepeat)
+ return nullptr;
</ins><span class="cx"> bool isAutoRepeat;
</span><span class="cx"> if (!parseGridTrackRepeatFunction(values, isAutoRepeat, allTracksAreFixedSized))
</span><span class="cx"> return nullptr;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (202971 => 202972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2016-07-08 07:17:17 UTC (rev 202971)
+++ trunk/Source/WebCore/css/CSSParser.h        2016-07-08 08:57:50 UTC (rev 202972)
</span><span class="lines">@@ -235,7 +235,8 @@
</span><span class="cx"> bool isCSSGridLayoutEnabled() const;
</span><span class="cx"> RefPtr<CSSValue> parseGridPosition();
</span><span class="cx"> bool parseGridItemPositionShorthand(CSSPropertyID, bool important);
</span><del>- RefPtr<CSSValue> parseGridTemplateColumns();
</del><ins>+ enum TrackListType { AllowRepeat, DisallowRepeat };
+ RefPtr<CSSValue> parseGridTemplateColumns(TrackListType = AllowRepeat);
</ins><span class="cx"> bool parseGridTemplateRowsAndAreasAndColumns(bool important);
</span><span class="cx"> bool parseGridTemplateShorthand(bool important);
</span><span class="cx"> bool parseGridShorthand(bool important);
</span><span class="lines">@@ -242,7 +243,7 @@
</span><span class="cx"> bool parseGridAreaShorthand(bool important);
</span><span class="cx"> bool parseGridGapShorthand(bool important);
</span><span class="cx"> bool parseSingleGridAreaLonghand(RefPtr<CSSValue>&);
</span><del>- RefPtr<CSSValue> parseGridTrackList();
</del><ins>+ RefPtr<CSSValue> parseGridTrackList(TrackListType = AllowRepeat);
</ins><span class="cx"> bool parseGridTrackRepeatFunction(CSSValueList&, bool& isAutoRepeat, bool& allTracksAreFixedSized);
</span><span class="cx"> RefPtr<CSSValue> parseGridTrackSize(CSSParserValueList& inputList);
</span><span class="cx"> RefPtr<CSSPrimitiveValue> parseGridBreadth(CSSParserValue&);
</span></span></pre>
</div>
</div>
</body>
</html>