<!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>[245798] 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/245798">245798</a></dd>
<dt>Author</dt> <dd>obrufau@igalia.com</dd>
<dt>Date</dt> <dd>2019-05-27 14:27:15 -0700 (Mon, 27 May 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>[css-grid] Preserve repeat() notation when serializing declared values
https://bugs.webkit.org/show_bug.cgi?id=197840

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Import WPT test.

* web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002-expected.txt: Added.
* web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002.html: Added.
* web-platform-tests/css/css-grid/grid-definition/w3c-import.log:

Source/WebCore:

Tests: fast/css-grid-layout/grid-element-auto-repeat-get-set.html
       fast/css-grid-layout/grid-repeat-calc.html
       fast/css-grid-layout/named-grid-line-get-set.html
       imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002.html

Before this change, a repeat() notation with an integral number of
repetitions was expanded at parse time. This was observable when reading
declared values using JS APIs.

This patch makes the parser preserve that notation, like it was already
happening when the number of repetitions was automatic and not integral.

The resolved value in getComputedStyle() will still be expanded, though,
as required by the spec.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSGridIntegerRepeatValue.cpp: Added.
(WebCore::CSSGridIntegerRepeatValue::customCSSText const):
(WebCore::CSSGridIntegerRepeatValue::equals const):
* css/CSSGridIntegerRepeatValue.h: Added.
* css/CSSValue.cpp:
(WebCore::CSSValue::equals const):
(WebCore::CSSValue::cssText const):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isGridIntegerRepeatValue const):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::createGridTrackList):
(WebCore::StyleBuilderConverter::convertGridTrackSizeList):
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeGridTrackRepeatFunction):

Tools:

Adapt CSSPropertyParserTest to CSSGridIntegerRepeatValue.

* TestWebKitAPI/Tests/WebCore/CSSParser.cpp:
(TestWebKitAPI::computeNumberOfTracks):

LayoutTests:

Update test expectations.

* fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt:
* fast/css-grid-layout/grid-element-auto-repeat-get-set.html:
* fast/css-grid-layout/grid-repeat-calc-expected.txt:
* fast/css-grid-layout/grid-repeat-calc.html:
* 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="#trunkLayoutTestsfastcssgridlayoutgridelementautorepeatgetsetexpectedtxt">trunk/LayoutTests/fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridelementautorepeatgetsethtml">trunk/LayoutTests/fast/css-grid-layout/grid-element-auto-repeat-get-set.html</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridrepeatcalcexpectedtxt">trunk/LayoutTests/fast/css-grid-layout/grid-repeat-calc-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridrepeatcalchtml">trunk/LayoutTests/fast/css-grid-layout/grid-repeat-calc.html</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>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscsscssgridgriddefinitionw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/w3c-import.log</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreHeaderscmake">trunk/Source/WebCore/Headers.cmake</a></li>
<li><a href="#trunkSourceWebCoreSourcestxt">trunk/Source/WebCore/Sources.txt</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorecssCSSValuecpp">trunk/Source/WebCore/css/CSSValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueh">trunk/Source/WebCore/css/CSSValue.h</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderConverterh">trunk/Source/WebCore/css/StyleBuilderConverter.h</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSPropertyParsercpp">trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebCoreCSSParsercpp">trunk/Tools/TestWebKitAPI/Tests/WebCore/CSSParser.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscsscssgridgriddefinitiongridsupportrepeat002expectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscsscssgridgriddefinitiongridsupportrepeat002html">trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002.html</a></li>
<li><a href="#trunkSourceWebCorecssCSSGridIntegerRepeatValuecpp">trunk/Source/WebCore/css/CSSGridIntegerRepeatValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSGridIntegerRepeatValueh">trunk/Source/WebCore/css/CSSGridIntegerRepeatValue.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (245797 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/LayoutTests/ChangeLog 2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2019-05-27  Oriol Brufau  <obrufau@igalia.com>
+
+        [css-grid] Preserve repeat() notation when serializing declared values
+        https://bugs.webkit.org/show_bug.cgi?id=197840
+
+        Reviewed by Manuel Rego Casasnovas.
+
+        Update test expectations.
+
+        * fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt:
+        * fast/css-grid-layout/grid-element-auto-repeat-get-set.html:
+        * fast/css-grid-layout/grid-repeat-calc-expected.txt:
+        * fast/css-grid-layout/grid-repeat-calc.html:
+        * 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"> 2019-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         Touch support is reported even when the device doesn't have a touch screen
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridelementautorepeatgetsetexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt (245797 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt     2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt        2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -13,9 +13,9 @@
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "[foo] 175px [bar foo] 175px [bar foo] 175px [bar]"
</span><span class="cx"> PASS element.style.gridTemplateRows is "repeat(auto-fill, [foo] minmax(175px, max-content) [bar])"
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "100px 100px 100px 250px 250px"
</span><del>-PASS element.style.gridTemplateColumns is "repeat(auto-fill, minmax(50px, 100px)) 250px 250px"
</del><ins>+PASS element.style.gridTemplateColumns is "repeat(auto-fill, minmax(50px, 100px)) repeat(2, 250px)"
</ins><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "450px 50px [bar] 50px [bar foo] 10px [foo] 10px"
</span><del>-PASS element.style.gridTemplateRows is "450px repeat(auto-fill, minmax(max-content, 5em) [bar]) [foo] 1em [foo] 1em"
</del><ins>+PASS element.style.gridTemplateRows is "repeat(1, 450px) repeat(auto-fill, minmax(max-content, 5em) [bar]) repeat(2, [foo] 1em)"
</ins><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[start] 80px [foo bar] 200px [foo bar] 200px [foo bar] 200px [end]"
</span><span class="cx"> PASS element.style.gridTemplateColumns is "[start] 10% repeat(auto-fill, [foo bar] 200px) [end]"
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "75px [prev] 200px [foo bar next] 150px [last end]"
</span><span class="lines">@@ -33,15 +33,15 @@
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "[foo] 0px [bar foo] 0px [bar foo] 0px [bar]"
</span><span class="cx"> PASS element.style.gridTemplateRows is "repeat(auto-fit, [foo] minmax(20em, max-content) [bar])"
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "0px 0px 20px 20px"
</span><del>-PASS element.style.gridTemplateColumns is "repeat(auto-fit, minmax(300px, min-content)) 20px 20px"
</del><ins>+PASS element.style.gridTemplateColumns is "repeat(auto-fit, minmax(300px, min-content)) repeat(2, 20px)"
</ins><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "60px 0px [bar foo] 10px [foo] 10px"
</span><del>-PASS element.style.gridTemplateRows is "10% repeat(auto-fit, minmax(30em, max-content) [bar]) [foo] 1em [foo] 1em"
</del><ins>+PASS element.style.gridTemplateRows is "repeat(1, 10%) repeat(auto-fit, minmax(30em, max-content) [bar]) repeat(2, [foo] 1em)"
</ins><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[a z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y b] 30px [c d] 20px [e]"
</span><span class="cx"> PASS element.style.gridTemplateColumns is "[a] repeat(auto-fit, [z] 100px [y]) [b] 30px [c d] 20px [e]"
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "[z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y a b] 30px [c d] 20px [e]"
</span><span class="cx"> PASS element.style.gridTemplateRows is "repeat(auto-fit, [z] 100px [y]) [a b] 30px [c d] 20px [e]"
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[a z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y b] 30px [c] 20px [e]"
</span><del>-PASS element.style.gridTemplateColumns is "[a] repeat(auto-fit, [z] 100px [y]) [b] 30px [c] 20px [e]"
</del><ins>+PASS element.style.gridTemplateColumns is "[a] repeat(auto-fit, [z] 100px [y]) repeat(1, [b] 30px [c]) 20px [e]"
</ins><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "[a b] 30px [c d] 20px [e z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y]"
</span><span class="cx"> PASS element.style.gridTemplateRows is "[a b] 30px [c d] 20px [e] repeat(auto-fit, [z] 100px [y])"
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[start] 0px 0px [end start] 0px 0px [end]"
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridelementautorepeatgetsethtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-element-auto-repeat-get-set.html (245797 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-element-auto-repeat-get-set.html     2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-element-auto-repeat-get-set.html        2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -13,14 +13,14 @@
</span><span class="cx">     debug("Test auto-repeat syntax.");
</span><span class="cx">     testGridTemplatesSetJSValues("repeat(auto-fill, [foo bar] 200px)", "repeat(auto-fill, 20em [foo bar])", "[foo bar] 200px [foo bar] 200px [foo bar] 200px [foo bar] 200px", "200px [foo bar] 200px [foo bar] 200px [foo bar]");
</span><span class="cx">     testGridTemplatesSetJSValues("repeat(auto-fill, [foo bar] minmax(300px, 1fr))", "repeat(auto-fill, [foo] minmax(175px, max-content) [bar])", "[foo bar] 400px [foo bar] 400px", "[foo] 175px [bar foo] 175px [bar foo] 175px [bar]");
</span><del>-    testGridTemplatesSetJSValues("repeat(auto-fill, minmax(50px, 100px)) repeat(2, 250px)", "repeat(1, 450px) repeat(auto-fill, minmax(max-content, 5em) [bar]) repeat(2, [foo] 1em)", "100px 100px 100px 250px 250px", "450px 50px [bar] 50px [bar foo] 10px [foo] 10px", "repeat(auto-fill, minmax(50px, 100px)) 250px 250px", "450px repeat(auto-fill, minmax(max-content, 5em) [bar]) [foo] 1em [foo] 1em");
</del><ins>+    testGridTemplatesSetJSValues("repeat(auto-fill, minmax(50px, 100px)) repeat(2, 250px)", "repeat(1, 450px) repeat(auto-fill, minmax(max-content, 5em) [bar]) repeat(2, [foo] 1em)", "100px 100px 100px 250px 250px", "450px 50px [bar] 50px [bar foo] 10px [foo] 10px", "repeat(auto-fill, minmax(50px, 100px)) repeat(2, 250px)", "repeat(1, 450px) repeat(auto-fill, minmax(max-content, 5em) [bar]) repeat(2, [foo] 1em)");
</ins><span class="cx">     testGridTemplatesSetJSValues("[start] 10% repeat(auto-fill, [foo bar] 200px) [end]", "75px [prev] repeat(auto-fill, 20em [foo bar]) [next] 15em [last end]", "[start] 80px [foo bar] 200px [foo bar] 200px [foo bar] 200px [end]", "75px [prev] 200px [foo bar next] 150px [last end]");
</span><span class="cx">     testGridTemplatesSetJSValues("repeat(auto-fit, [foo bar] 150px)", "repeat(auto-fit, 24em [foo bar])", "[foo bar] 0px [foo bar] 0px [foo bar] 0px [foo bar] 0px [foo bar] 0px", "0px [foo bar] 0px [foo bar]");
</span><span class="cx">     testGridTemplatesSetJSValues("repeat(auto-fill, [start] 200px 100px [end])", "100px [foo] repeat(auto-fill, [a] 2em [b] 10% [c]) [bar] 3em", "[start] 200px 100px [end start] 200px 100px [end]", "100px [foo a] 20px [b] 60px [c a] 20px [b] 60px [c a] 20px [b] 60px [c a] 20px [b] 60px [c a] 20px [b] 60px [c bar] 30px");
</span><span class="cx">     testGridTemplatesSetJSValues("repeat(auto-fit, [foo bar] minmax(270px, 1fr))", "repeat(auto-fit, [foo] minmax(20em, max-content) [bar])", "[foo bar] 0px [foo bar] 0px", "[foo] 0px [bar foo] 0px [bar foo] 0px [bar]");
</span><del>-    testGridTemplatesSetJSValues("repeat(auto-fit, minmax(300px, min-content)) repeat(2, 20px)", "repeat(1, 10%) repeat(auto-fit, minmax(30em, max-content) [bar]) repeat(2, [foo] 1em)", "0px 0px 20px 20px", "60px 0px [bar foo] 10px [foo] 10px", "repeat(auto-fit, minmax(300px, min-content)) 20px 20px", "10% repeat(auto-fit, minmax(30em, max-content) [bar]) [foo] 1em [foo] 1em");
</del><ins>+    testGridTemplatesSetJSValues("repeat(auto-fit, minmax(300px, min-content)) repeat(2, 20px)", "repeat(1, 10%) repeat(auto-fit, minmax(30em, max-content) [bar]) repeat(2, [foo] 1em)", "0px 0px 20px 20px", "60px 0px [bar foo] 10px [foo] 10px", "repeat(auto-fit, minmax(300px, min-content)) repeat(2, 20px)", "repeat(1, 10%) repeat(auto-fit, minmax(30em, max-content) [bar]) repeat(2, [foo] 1em)");
</ins><span class="cx">     testGridTemplatesSetJSValues("[a] repeat(auto-fit, [z] 100px [y]) [b] 30px [c d] 20px [e]", "repeat(auto-fit, [z] 100px [y]) [a b] 30px [c d] 20px [e]", "[a z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y b] 30px [c d] 20px [e]", "[z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y a b] 30px [c d] 20px [e]");
</span><del>-    testGridTemplatesSetJSValues("[a] repeat(auto-fit, [z] 100px [y]) repeat(1, [b] 30px [c]) 20px [e]", "[a b] 30px [c d] 20px [e] repeat(auto-fit, [z] 100px [y])", "[a z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y b] 30px [c] 20px [e]", "[a b] 30px [c d] 20px [e z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y]", "[a] repeat(auto-fit, [z] 100px [y]) [b] 30px [c] 20px [e]");
</del><ins>+    testGridTemplatesSetJSValues("[a] repeat(auto-fit, [z] 100px [y]) repeat(1, [b] 30px [c]) 20px [e]", "[a b] 30px [c d] 20px [e] repeat(auto-fit, [z] 100px [y])", "[a z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y b] 30px [c] 20px [e]", "[a b] 30px [c d] 20px [e z] 0px [y z] 0px [y z] 0px [y z] 0px [y z] 0px [y]", "[a] repeat(auto-fit, [z] 100px [y]) repeat(1, [b] 30px [c]) 20px [e]");
</ins><span class="cx">     testGridTemplatesSetJSValues("repeat(auto-fit, [start] 200px 100px [end])", "100px [foo] repeat(auto-fit, [a] 2em [b] 10% [c]) [bar] 3em", "[start] 0px 0px [end start] 0px 0px [end]", "100px [foo a] 0px [b] 0px [c a] 0px [b] 0px [c a] 0px [b] 0px [c a] 0px [b] 0px [c a] 0px [b] 0px [c bar] 30px");
</span><span class="cx"> 
</span><span class="cx">     debug("");
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridrepeatcalcexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-repeat-calc-expected.txt (245797 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-repeat-calc-expected.txt     2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-repeat-calc-expected.txt        2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> 
</span><span class="cx"> PASS testDiv.style['grid-template-rows'] is ""
</span><span class="cx"> testDiv.style['grid-template-rows'] = 'repeat(calc(1 + 1), 18px)'
</span><del>-PASS testDiv.style['grid-template-rows'] is "18px 18px"
</del><ins>+PASS testDiv.style['grid-template-rows'] is "repeat(2, 18px)"
</ins><span class="cx"> PASS window.getComputedStyle(testDiv).getPropertyValue('grid-template-rows') is "18px 18px"
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridrepeatcalchtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-repeat-calc.html (245797 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-repeat-calc.html     2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-repeat-calc.html        2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -10,7 +10,7 @@
</span><span class="cx"> // grid-template-columns: repeat(1, 15%);
</span><span class="cx"> shouldBeEmptyString("testDiv.style['grid-template-rows']");
</span><span class="cx"> evalAndLog("testDiv.style['grid-template-rows'] = 'repeat(calc(1 + 1), 18px)'");
</span><del>-shouldBeEqualToString("testDiv.style['grid-template-rows']", "18px 18px");
</del><ins>+shouldBeEqualToString("testDiv.style['grid-template-rows']", "repeat(2, 18px)");
</ins><span class="cx"> shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('grid-template-rows')", "18px 18px");
</span><span class="cx"> 
</span><span class="cx"> </script>
</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 (245797 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/named-grid-line-get-set-expected.txt      2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/LayoutTests/fast/css-grid-layout/named-grid-line-get-set-expected.txt 2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -77,9 +77,9 @@
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "[foo bar] 0px [foo] 0px [bar]"
</span><span class="cx"> PASS element.style.gridTemplateRows is "[foo bar] auto [foo] auto [bar]"
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "[first] 0px [foo bar] 20px [foo bar] 20px"
</span><del>-PASS element.style.gridTemplateColumns is "[first] auto [foo bar] 20px [foo bar] 20px"
</del><ins>+PASS element.style.gridTemplateColumns is "[first] auto repeat(2, [foo bar] 20px)"
</ins><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "220px [foo] 300px [baz]"
</span><del>-PASS element.style.gridTemplateRows is "220px [foo] 50% [baz]"
</del><ins>+PASS element.style.gridTemplateRows is "220px [foo] repeat(1, 50% [baz])"
</ins><span class="cx"> 
</span><span class="cx"> Test getting invalid grid-template-columns and grid-template-rows set through CSS
</span><span class="cx"> PASS window.getComputedStyle(gridWithoutBrackets, '').getPropertyValue('grid-template-columns') is "none"
</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 (245797 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/named-grid-line-get-set.html      2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/LayoutTests/fast/css-grid-layout/named-grid-line-get-set.html 2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -124,7 +124,7 @@
</span><span class="cx">     testGridTemplatesSetJSValues("[first nav] minmax(min-content, max-content) [last]", "[first nav] minmax(max-content, min-content) [last]", "[first nav] 0px [last]", "[first nav] 0px [last]", "[first nav] minmax(min-content, max-content) [last]", "[first nav] minmax(max-content, min-content) [last]");
</span><span class="cx">     testGridTemplatesSetJSValues("[first nav] minmax(min-content, max-content) [nav] auto [last]", "[first nav2] minmax(max-content, min-content) [nav2] minmax(10px, 15px) [last]", "[first nav] 0px [nav] 0px [last]", "[first nav2] 0px [nav2] 15px [last]", "[first nav] minmax(min-content, max-content) [nav] auto [last]", "[first nav2] minmax(max-content, 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><del>-    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]");
</del><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 repeat(2, [foo bar] 20px)", "220px [foo] repeat(1, 50% [baz])");
</ins><span class="cx"> 
</span><span class="cx">     debug("");
</span><span class="cx">     debug("Test getting invalid grid-template-columns and grid-template-rows set through CSS");
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (245797 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog 2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/LayoutTests/imported/w3c/ChangeLog    2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2019-05-27  Oriol Brufau  <obrufau@igalia.com>
+
+        [css-grid] Preserve repeat() notation when serializing declared values
+        https://bugs.webkit.org/show_bug.cgi?id=197840
+
+        Reviewed by Manuel Rego Casasnovas.
+
+        Import WPT test.
+
+        * web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002-expected.txt: Added.
+        * web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002.html: Added.
+        * web-platform-tests/css/css-grid/grid-definition/w3c-import.log:
+
</ins><span class="cx"> 2019-05-24  Joonghun Park  <jh718.park@samsung.com>
</span><span class="cx"> 
</span><span class="cx">         Make computed width of non-replaced inline return computed style.
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscsscssgridgriddefinitiongridsupportrepeat002expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002-expected.txt (0 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002-expected.txt                              (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002-expected.txt 2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+
+PASS grid-template-columns: repeat(1, auto); and grid-template-rows: repeat(1, auto); 
+PASS grid-template-columns: repeat(2, auto); and grid-template-rows: repeat(2, auto); 
+PASS grid-template-columns: repeat(2, minmax(50px, calc(50% + 50px))); and grid-template-rows: repeat(2, minmax(50px, calc(50% + 50px))); 
+PASS grid-template-columns: repeat(5, 10%); and grid-template-rows: repeat(5, 10%); 
+PASS grid-template-columns: max-content repeat(2, 25%) 1fr; and grid-template-rows: max-content repeat(2, 25%) 1fr; 
+PASS grid-template-columns: repeat(2, min-content 50px); and grid-template-rows: repeat(2, min-content 50px); 
+PASS grid-template-columns: repeat(2, [a] minmax(50px, 100px) [b] 25em [c]); and grid-template-rows: repeat(2, [a] minmax(50px, 100px) [b] 25em [c]); 
+PASS grid-template-columns: [a] repeat(2, auto [b] 100px) [c]; and grid-template-rows: [a] repeat(2, auto [b] 100px) [c]; 
+PASS grid-template-columns: [a] auto repeat(2, [b] 100px) [c]; and grid-template-rows: [a] auto repeat(2, [b] 100px) [c]; 
+PASS grid-template-columns: [a] repeat(2, auto [b]) 100px [c]; and grid-template-rows: [a] repeat(2, auto [b]) 100px [c]; 
+PASS grid-template-columns: [a] repeat(2, [b] 100px); and grid-template-rows: [a] repeat(2, [b] 100px); 
+PASS grid-template-columns: [a] repeat(2, [b] auto [c]) [d]; and grid-template-rows: [a] repeat(2, [b] auto [c]) [d]; 
+PASS grid-template-columns: [a] min-content repeat(2, [b] 1fr [c] calc(10% + 20px)) [d] minmax(30em, 50em) [e]; and grid-template-rows: [a] min-content repeat(2, [b] 1fr [c] calc(10% + 20px)) [d] minmax(30em, 50em) [e]; 
+PASS grid-template-columns: repeat(-1, auto); and grid-template-rows: repeat(-1, auto); 
+PASS grid-template-columns: repeat(auto, 2); and grid-template-rows: repeat(auto, 2); 
+PASS grid-template-columns: repeat 2, auto; and grid-template-rows: repeat 2, auto; 
+PASS grid-template-columns: repeat(2 auto); and grid-template-rows: repeat(2 auto); 
+PASS grid-template-columns: 100px (repeat 2, auto); and grid-template-rows: 100px (repeat 2, auto); 
+PASS grid-template-columns: repeat(2, 50px repeat(2, 100px)); and grid-template-rows: repeat(2, 50px repeat(2, 100px)); 
+PASS grid-template-columns: 100px repeat(2, [a]); and grid-template-rows: 100px repeat(2, [a]); 
+GRID ITEM
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscsscssgridgriddefinitiongridsupportrepeat002html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002.html (0 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002.html                              (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002.html 2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -0,0 +1,65 @@
</span><ins>+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: Support 'repeat()' notation for 'grid-template-columns' and 'grid-template-rows' properties</title>
+<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
+<link rel="help" href="http://www.w3.org/TR/css-grid-1/#repeat-notation" title="5.1.2 Repeating Rows and Columns: the 'repeat()' notation">
+<meta name="assert" content="This test checks that 'grid-template-columns' and 'grid-template-rows' properties support 'repeat()' notation, and that their declared value serializes correctly.">
+<style>
+#grid {
+  display: grid;
+  width: 800px;
+  height: 600px;
+  font: 10px/1 Ahem;
+  justify-content: start;
+  align-content: start;
+}
+</style>
+
+<div id="log"></div>
+
+<div id="grid">
+  <div>GRID ITEM</div>
+</div>
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+var {style} = document.getElementById("grid");
+
+function testGridTemplateColumnsRows(assignedValue, expectedValue = assignedValue) {
+  test(function() {
+      style.gridTemplateColumns = assignedValue;
+      style.gridTemplateRows = assignedValue;
+      assert_equals(style.gridTemplateColumns, expectedValue, "gridTemplateColumns");
+      assert_equals(style.gridTemplateRows, expectedValue, "gridTemplateRows");
+  }, `grid-template-columns: ${assignedValue}; and grid-template-rows: ${assignedValue};`);
+}
+
+// Valid values.
+testGridTemplateColumnsRows("repeat(1, auto)");
+testGridTemplateColumnsRows("repeat(2, auto)");
+testGridTemplateColumnsRows("repeat(2, minmax(50px, calc(50% + 50px)))");
+testGridTemplateColumnsRows("repeat(5, 10%)");
+testGridTemplateColumnsRows("max-content repeat(2, 25%) 1fr");
+testGridTemplateColumnsRows("repeat(2, min-content 50px)");
+testGridTemplateColumnsRows("repeat(2, [a] minmax(50px, 100px) [b] 25em [c])");
+testGridTemplateColumnsRows("[a] repeat(2, auto [b] 100px) [c]");
+testGridTemplateColumnsRows("[a] auto repeat(2, [b] 100px) [c]");
+testGridTemplateColumnsRows("[a] repeat(2, auto [b]) 100px [c]");
+testGridTemplateColumnsRows("[a] repeat(2, [b] 100px)");
+testGridTemplateColumnsRows("[a] repeat(2, [b] auto [c]) [d]");
+testGridTemplateColumnsRows("[a] min-content repeat(2, [b] 1fr [c] calc(10% + 20px)) [d] minmax(30em, 50em) [e]");
+
+// Reset values.
+style.gridTemplateColumns = "";
+style.gridTemplateRows = "";
+
+// Wrong values.
+testGridTemplateColumnsRows("repeat(-1, auto)", "");
+testGridTemplateColumnsRows("repeat(auto, 2)", "");
+testGridTemplateColumnsRows("repeat 2, auto", "");
+testGridTemplateColumnsRows("repeat(2 auto)", "");
+testGridTemplateColumnsRows("100px (repeat 2, auto)", "");
+testGridTemplateColumnsRows("repeat(2, 50px repeat(2, 100px))", "");
+testGridTemplateColumnsRows("100px repeat(2, [a])", "");
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscsscssgridgriddefinitionw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/w3c-import.log (245797 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/w3c-import.log    2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/w3c-import.log       2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-grid-template-columns-rows-001.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-named-grid-lines-001.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-001.html
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002.html
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-template-columns-fit-content-001-expected.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-template-columns-fit-content-001.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-template-columns-rows-resolved-values-001.html
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (245797 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/Source/WebCore/ChangeLog      2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2019-05-27  Oriol Brufau  <obrufau@igalia.com>
+
+        [css-grid] Preserve repeat() notation when serializing declared values
+        https://bugs.webkit.org/show_bug.cgi?id=197840
+
+        Reviewed by Manuel Rego Casasnovas.
+
+        Tests: fast/css-grid-layout/grid-element-auto-repeat-get-set.html
+               fast/css-grid-layout/grid-repeat-calc.html
+               fast/css-grid-layout/named-grid-line-get-set.html
+               imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-002.html
+
+        Before this change, a repeat() notation with an integral number of
+        repetitions was expanded at parse time. This was observable when reading
+        declared values using JS APIs.
+
+        This patch makes the parser preserve that notation, like it was already
+        happening when the number of repetitions was automatic and not integral.
+
+        The resolved value in getComputedStyle() will still be expanded, though,
+        as required by the spec.
+
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSGridIntegerRepeatValue.cpp: Added.
+        (WebCore::CSSGridIntegerRepeatValue::customCSSText const):
+        (WebCore::CSSGridIntegerRepeatValue::equals const):
+        * css/CSSGridIntegerRepeatValue.h: Added.
+        * css/CSSValue.cpp:
+        (WebCore::CSSValue::equals const):
+        (WebCore::CSSValue::cssText const):
+        (WebCore::CSSValue::destroy):
+        * css/CSSValue.h:
+        (WebCore::CSSValue::isGridIntegerRepeatValue const):
+        * css/StyleBuilderConverter.h:
+        (WebCore::StyleBuilderConverter::createGridTrackList):
+        (WebCore::StyleBuilderConverter::convertGridTrackSizeList):
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::consumeGridTrackRepeatFunction):
+
</ins><span class="cx"> 2019-05-27  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Use a strongly-typed identifier for pages
</span></span></pre></div>
<a id="trunkSourceWebCoreHeaderscmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Headers.cmake (245797 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Headers.cmake       2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/Source/WebCore/Headers.cmake  2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -288,6 +288,7 @@
</span><span class="cx">     css/CSSCustomPropertyValue.h
</span><span class="cx">     css/CSSFontFaceRule.h
</span><span class="cx">     css/CSSFontFamily.h
</span><ins>+    css/CSSGridIntegerRepeatValue.h
</ins><span class="cx">     css/CSSGroupingRule.h
</span><span class="cx">     css/CSSImportRule.h
</span><span class="cx">     css/CSSLineBoxContainValue.h
</span></span></pre></div>
<a id="trunkSourceWebCoreSourcestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Sources.txt (245797 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Sources.txt 2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/Source/WebCore/Sources.txt    2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -672,6 +672,7 @@
</span><span class="cx"> css/CSSFunctionValue.cpp
</span><span class="cx"> css/CSSGradientValue.cpp
</span><span class="cx"> css/CSSGridAutoRepeatValue.cpp
</span><ins>+css/CSSGridIntegerRepeatValue.cpp
</ins><span class="cx"> css/CSSGridLineNamesValue.cpp
</span><span class="cx"> css/CSSGridTemplateAreasValue.cpp
</span><span class="cx"> css/CSSGroupingRule.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (245797 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj   2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -983,6 +983,7 @@
</span><span class="cx">          33503C9A10179A74003B47E1 /* NotificationClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 33503C9910179A74003B47E1 /* NotificationClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          33503CA410179AD7003B47E1 /* JSNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 33503CA010179AD7003B47E1 /* JSNotification.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          33D0212D131DB37B004091A8 /* CookieStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = E13F01EA1270E10D00DFBA71 /* CookieStorage.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+               35C74FDB228A1EF6000C21A0 /* CSSGridIntegerRepeatValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 35C74FD7228A19A6000C21A0 /* CSSGridIntegerRepeatValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">           3717D7E817ECC591003C276D /* extract-localizable-strings.pl in Copy Scripts */ = {isa = PBXBuildFile; fileRef = 3717D7E517ECC3A6003C276D /* extract-localizable-strings.pl */; };
</span><span class="cx">          371E65CC13661EDC00BEEDB0 /* PageSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 371E65CB13661EDC00BEEDB0 /* PageSerializer.h */; };
</span><span class="cx">          371F4FFC0D25E7F300ECE0D5 /* FontRanges.h in Headers */ = {isa = PBXBuildFile; fileRef = 371F4FFA0D25E7F300ECE0D5 /* FontRanges.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -7100,6 +7101,8 @@
</span><span class="cx">          33503C9F10179AD7003B47E1 /* JSNotification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNotification.cpp; sourceTree = "<group>"; };
</span><span class="cx">          33503CA010179AD7003B47E1 /* JSNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSNotification.h; sourceTree = "<group>"; };
</span><span class="cx">          33503CC61017A1B1003B47E1 /* Notification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Notification.cpp; sourceTree = "<group>"; };
</span><ins>+               35C74FD3228A1912000C21A0 /* CSSGridIntegerRepeatValue.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CSSGridIntegerRepeatValue.cpp; sourceTree = "<group>"; };
+               35C74FD7228A19A6000C21A0 /* CSSGridIntegerRepeatValue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CSSGridIntegerRepeatValue.h; sourceTree = "<group>"; };
</ins><span class="cx">           3662F984047CEDBE5DDDAFAA /* RenderMathMLMenclose.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMathMLMenclose.cpp; sourceTree = "<group>"; };
</span><span class="cx">          37119A7920CCB610002C6DC9 /* WebKitTargetConditionals.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = WebKitTargetConditionals.xcconfig; sourceTree = "<group>"; };
</span><span class="cx">          3717D7E517ECC3A6003C276D /* extract-localizable-strings.pl */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; name = "extract-localizable-strings.pl"; path = "Scripts/extract-localizable-strings.pl"; sourceTree = "<group>"; };
</span><span class="lines">@@ -26591,6 +26594,8 @@
</span><span class="cx">                          BC53C6910DA591140021EB5D /* CSSGradientValue.h */,
</span><span class="cx">                          E110032E1C9AC3DE00412DD0 /* CSSGridAutoRepeatValue.cpp */,
</span><span class="cx">                          E110032F1C9AC3DE00412DD0 /* CSSGridAutoRepeatValue.h */,
</span><ins>+                               35C74FD3228A1912000C21A0 /* CSSGridIntegerRepeatValue.cpp */,
+                               35C74FD7228A19A6000C21A0 /* CSSGridIntegerRepeatValue.h */,
</ins><span class="cx">                           CD7DBB2618CA11FF00C11066 /* CSSGridLineNamesValue.cpp */,
</span><span class="cx">                          CD7DBB2718CA11FF00C11066 /* CSSGridLineNamesValue.h */,
</span><span class="cx">                          CD3E252118046BCD00E27F56 /* CSSGridTemplateAreasValue.cpp */,
</span><span class="lines">@@ -28656,6 +28661,7 @@
</span><span class="cx">                          BC02A63C0E09A9CF004B6D2B /* CSSFunctionValue.h in Headers */,
</span><span class="cx">                          BC53C6920DA591140021EB5D /* CSSGradientValue.h in Headers */,
</span><span class="cx">                          E11003311C9AC3DE00412DD0 /* CSSGridAutoRepeatValue.h in Headers */,
</span><ins>+                               35C74FDB228A1EF6000C21A0 /* CSSGridIntegerRepeatValue.h in Headers */,
</ins><span class="cx">                           CD7DBB2918CA19C600C11066 /* CSSGridLineNamesValue.h in Headers */,
</span><span class="cx">                          CD3E252418046BCD00E27F56 /* CSSGridTemplateAreasValue.h in Headers */,
</span><span class="cx">                          FB3056C2169E5DAC0096A232 /* CSSGroupingRule.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGridIntegerRepeatValuecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/CSSGridIntegerRepeatValue.cpp (0 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGridIntegerRepeatValue.cpp                           (rev 0)
+++ trunk/Source/WebCore/css/CSSGridIntegerRepeatValue.cpp      2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+/*
+ * Copyright (C) 2019 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "CSSGridIntegerRepeatValue.h"
+
+#include <wtf/text/StringBuilder.h>
+
+namespace WebCore {
+
+String CSSGridIntegerRepeatValue::customCSSText() const
+{
+    StringBuilder result;
+    result.append("repeat(");
+    result.append(String::number(repetitions()));
+    result.append(", ");
+    result.append(CSSValueList::customCSSText());
+    result.append(')');
+    return result.toString();
+}
+
+bool CSSGridIntegerRepeatValue::equals(const CSSGridIntegerRepeatValue& other) const
+{
+    return m_repetitions == other.m_repetitions && CSSValueList::equals(other);
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorecssCSSGridIntegerRepeatValueh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/CSSGridIntegerRepeatValue.h (0 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGridIntegerRepeatValue.h                             (rev 0)
+++ trunk/Source/WebCore/css/CSSGridIntegerRepeatValue.h        2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -0,0 +1,71 @@
</span><ins>+/*
+ * Copyright (C) 2019 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "CSSValueKeywords.h"
+#include "CSSValueList.h"
+
+namespace WebCore {
+
+// CSSGridIntegerRepeatValue stores the track sizes and line numbers when the
+// integer-repeat syntax is used.
+//
+// Right now the integer-repeat syntax is as follows:
+// <track-repeat> = repeat( [ <positive-integer> ],
+//                          [ <line-names>? <track-size> ]+ <line-names>? )
+// <fixed-repeat> = repeat( [ <positive-integer> ],
+//                          [ <line-names>? <fixed-size> ]+ <line-names>? )
+class CSSGridIntegerRepeatValue final : public CSSValueList {
+public:
+    static Ref<CSSGridIntegerRepeatValue> create(size_t repetitions)
+    {
+        return adoptRef(*new CSSGridIntegerRepeatValue(repetitions));
+    }
+
+    String customCSSText() const;
+    bool equals(const CSSGridIntegerRepeatValue&) const;
+
+    size_t repetitions() const { return m_repetitions; }
+
+private:
+    CSSGridIntegerRepeatValue(size_t repetitions)
+        : CSSValueList(GridIntegerRepeatClass, SpaceSeparator)
+        , m_repetitions(repetitions)
+    {
+        ASSERT(repetitions > 0);
+    }
+
+    const size_t m_repetitions;
+};
+
+} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSGridIntegerRepeatValue, isGridIntegerRepeatValue());
</ins></span></pre></div>
<a id="trunkSourceWebCorecssCSSValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValue.cpp (245797 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValue.cpp    2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/Source/WebCore/css/CSSValue.cpp       2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -65,6 +65,7 @@
</span><span class="cx"> #include "CSSVariableReferenceValue.h"
</span><span class="cx"> 
</span><span class="cx"> #include "CSSGridAutoRepeatValue.h"
</span><ins>+#include "CSSGridIntegerRepeatValue.h"
</ins><span class="cx"> #include "CSSGridLineNamesValue.h"
</span><span class="cx"> #include "CSSGridTemplateAreasValue.h"
</span><span class="cx"> 
</span><span class="lines">@@ -188,6 +189,8 @@
</span><span class="cx">             return compareCSSValues<CSSRevertValue>(*this, other);
</span><span class="cx">         case GridAutoRepeatClass:
</span><span class="cx">             return compareCSSValues<CSSGridAutoRepeatValue>(*this, other);
</span><ins>+        case GridIntegerRepeatClass:
+            return compareCSSValues<CSSGridIntegerRepeatValue>(*this, other);
</ins><span class="cx">         case GridLineNamesClass:
</span><span class="cx">             return compareCSSValues<CSSGridLineNamesValue>(*this, other);
</span><span class="cx">         case GridTemplateAreasClass:
</span><span class="lines">@@ -288,6 +291,8 @@
</span><span class="cx">         return downcast<CSSRevertValue>(*this).customCSSText();
</span><span class="cx">     case GridAutoRepeatClass:
</span><span class="cx">         return downcast<CSSGridAutoRepeatValue>(*this).customCSSText();
</span><ins>+    case GridIntegerRepeatClass:
+        return downcast<CSSGridIntegerRepeatValue>(*this).customCSSText();
</ins><span class="cx">     case GridLineNamesClass:
</span><span class="cx">         return downcast<CSSGridLineNamesValue>(*this).customCSSText();
</span><span class="cx">     case GridTemplateAreasClass:
</span><span class="lines">@@ -399,6 +404,9 @@
</span><span class="cx">     case GridAutoRepeatClass:
</span><span class="cx">         delete downcast<CSSGridAutoRepeatValue>(this);
</span><span class="cx">         return;
</span><ins>+    case GridIntegerRepeatClass:
+        delete downcast<CSSGridIntegerRepeatValue>(this);
+        return;
</ins><span class="cx">     case GridLineNamesClass:
</span><span class="cx">         delete downcast<CSSGridLineNamesValue>(this);
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValue.h (245797 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValue.h      2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/Source/WebCore/css/CSSValue.h 2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -111,6 +111,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     bool isContentDistributionValue() const { return m_classType == CSSContentDistributionClass; }
</span><span class="cx">     bool isGridAutoRepeatValue() const { return m_classType == GridAutoRepeatClass; }
</span><ins>+    bool isGridIntegerRepeatValue() const { return m_classType == GridIntegerRepeatClass; }
</ins><span class="cx">     bool isGridTemplateAreasValue() const { return m_classType == GridTemplateAreasClass; }
</span><span class="cx">     bool isGridLineNamesValue() const { return m_classType == GridLineNamesClass; }
</span><span class="cx">     bool isUnicodeRangeValue() const { return m_classType == UnicodeRangeClass; }
</span><span class="lines">@@ -200,6 +201,7 @@
</span><span class="cx">         ImageSetClass,
</span><span class="cx">         GridLineNamesClass,
</span><span class="cx">         GridAutoRepeatClass,
</span><ins>+        GridIntegerRepeatClass,
</ins><span class="cx">         // Do not append non-list class types here.
</span><span class="cx">     };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderConverterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (245797 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderConverter.h 2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h    2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #include "CSSFontVariationValue.h"
</span><span class="cx"> #include "CSSFunctionValue.h"
</span><span class="cx"> #include "CSSGridAutoRepeatValue.h"
</span><ins>+#include "CSSGridIntegerRepeatValue.h"
</ins><span class="cx"> #include "CSSGridLineNamesValue.h"
</span><span class="cx"> #include "CSSImageGeneratorValue.h"
</span><span class="cx"> #include "CSSImageSetValue.h"
</span><span class="lines">@@ -989,12 +990,16 @@
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     unsigned currentNamedGridLine = 0;
</span><del>-    for (auto& currentValue : downcast<CSSValueList>(value)) {
-        if (is<CSSGridLineNamesValue>(currentValue)) {
-            createGridLineNamesList(currentValue.get(), currentNamedGridLine, tracksData.m_namedGridLines, tracksData.m_orderedNamedGridLines);
-            continue;
</del><ins>+    auto handleLineNameOrTrackSize = [&](const CSSValue& currentValue) {
+        if (is<CSSGridLineNamesValue>(currentValue))
+            createGridLineNamesList(currentValue, currentNamedGridLine, tracksData.m_namedGridLines, tracksData.m_orderedNamedGridLines);
+        else {
+            ++currentNamedGridLine;
+            tracksData.m_trackSizes.append(createGridTrackSize(currentValue, styleResolver));
</ins><span class="cx">         }
</span><ins>+    };
</ins><span class="cx"> 
</span><ins>+    for (auto& currentValue : downcast<CSSValueList>(value)) {
</ins><span class="cx">         if (is<CSSGridAutoRepeatValue>(currentValue)) {
</span><span class="cx">             ASSERT(tracksData.m_autoRepeatTrackSizes.isEmpty());
</span><span class="cx">             unsigned autoRepeatIndex = 0;
</span><span class="lines">@@ -1013,8 +1018,16 @@
</span><span class="cx">             continue;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        ++currentNamedGridLine;
-        tracksData.m_trackSizes.append(createGridTrackSize(currentValue, styleResolver));
</del><ins>+        if (is<CSSGridIntegerRepeatValue>(currentValue)) {
+            size_t repetitions = downcast<CSSGridIntegerRepeatValue>(currentValue.get()).repetitions();
+            for (size_t i = 0; i < repetitions; ++i) {
+                for (auto& integerRepeatValue : downcast<CSSValueList>(currentValue.get()))
+                    handleLineNameOrTrackSize(integerRepeatValue);
+            }
+            continue;
+        }
+
+        handleLineNameOrTrackSize(currentValue);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // The parser should have rejected any <track-list> without any <track-size> as
</span><span class="lines">@@ -1099,6 +1112,7 @@
</span><span class="cx">     for (auto& currValue : valueList) {
</span><span class="cx">         ASSERT(!currValue->isGridLineNamesValue());
</span><span class="cx">         ASSERT(!currValue->isGridAutoRepeatValue());
</span><ins>+        ASSERT(!currValue->isGridIntegerRepeatValue());
</ins><span class="cx">         trackSizes.uncheckedAppend(convertGridTrackSize(styleResolver, currValue));
</span><span class="cx">     }
</span><span class="cx">     return trackSizes;
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSPropertyParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (245797 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp    2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp       2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx"> #include "CSSFontStyleValue.h"
</span><span class="cx"> #include "CSSFunctionValue.h"
</span><span class="cx"> #include "CSSGridAutoRepeatValue.h"
</span><ins>+#include "CSSGridIntegerRepeatValue.h"
</ins><span class="cx"> #include "CSSGridLineNamesValue.h"
</span><span class="cx"> #include "CSSGridTemplateAreasValue.h"
</span><span class="cx"> #include "CSSLineBoxContainValue.h"
</span><span class="lines">@@ -3404,10 +3405,10 @@
</span><span class="cx">     else {
</span><span class="cx">         // We clamp the repetitions to a multiple of the repeat() track list's size, while staying below the max grid size.
</span><span class="cx">         repetitions = std::min(repetitions, GridPosition::max() / numberOfTracks);
</span><del>-        for (size_t i = 0; i < repetitions; ++i) {
-            for (size_t j = 0; j < repeatedValues->length(); ++j)
-                list.append(*repeatedValues->itemWithoutBoundsCheck(j));
-        }
</del><ins>+        RefPtr<CSSValueList> integerRepeatedValues = CSSGridIntegerRepeatValue::create(repetitions);
+        for (size_t i = 0; i < repeatedValues->length(); ++i)
+            integerRepeatedValues->append(*repeatedValues->itemWithoutBoundsCheck(i));
+        list.append(integerRepeatedValues.releaseNonNull());
</ins><span class="cx">     }
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (245797 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog    2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/Tools/ChangeLog       2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2019-05-27  Oriol Brufau  <obrufau@igalia.com>
+
+        [css-grid] Preserve repeat() notation when serializing declared values
+        https://bugs.webkit.org/show_bug.cgi?id=197840
+
+        Reviewed by Manuel Rego Casasnovas.
+
+        Adapt CSSPropertyParserTest to CSSGridIntegerRepeatValue.
+
+        * TestWebKitAPI/Tests/WebCore/CSSParser.cpp:
+        (TestWebKitAPI::computeNumberOfTracks):
+
</ins><span class="cx"> 2019-05-26  Wenson Hsieh  <wenson_hsieh@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [iOS] Dropped text, attachments, and images should animate into place
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebCoreCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/CSSParser.cpp (245797 => 245798)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebCore/CSSParser.cpp    2019-05-27 21:21:40 UTC (rev 245797)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/CSSParser.cpp       2019-05-27 21:27:15 UTC (rev 245798)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include "config.h"
</span><span class="cx"> 
</span><ins>+#include <WebCore/CSSGridIntegerRepeatValue.h>
</ins><span class="cx"> #include <WebCore/CSSParser.h>
</span><span class="cx"> #include <WebCore/CSSValueList.h>
</span><span class="cx"> #include <WebCore/StyleProperties.h>
</span><span class="lines">@@ -39,6 +40,11 @@
</span><span class="cx">     for (const auto& value : valueList) {
</span><span class="cx">         if (value->isGridLineNamesValue())
</span><span class="cx">             continue;
</span><ins>+        if (is<CSSGridIntegerRepeatValue>(value)) {
+            auto& repeatValue = downcast<CSSGridIntegerRepeatValue>(value.get());
+            numberOfTracks += repeatValue.repetitions() * computeNumberOfTracks(repeatValue);
+            continue;
+        }
</ins><span class="cx">         ++numberOfTracks;
</span><span class="cx">     }
</span><span class="cx">     return numberOfTracks;
</span></span></pre>
</div>
</div>

</body>
</html>