<!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>[214624] 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/214624">214624</a></dd>
<dt>Author</dt> <dd>jfernandez@igalia.com</dd>
<dt>Date</dt> <dd>2017-03-30 14:27:09 -0700 (Thu, 30 Mar 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>[css-align] Adapt content-alignment properties to the new baseline syntax
https://bugs.webkit.org/show_bug.cgi?id=170262

Reviewed by David Hyatt.

Source/WebCore:

The baseline-position syntax has changed recently, so we need to update
the CSS properties using the old syntax. This patch address only the
content-alignment (align-content and justify-content).

I used this patch to adapt the implementation of the parsing logic for
these properties to the new Blink's CSS Parsing Design.

The new baseline syntax is &quot;[first | last ]? baseline&quot; which implies
modifying the parsing and computed value logic.

There are several layout tests affected by this change, so I'll update
them accordingly.

No new tests, just added/modified some cases to the tests we
already have using the new baseline values.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
* css/CSSContentDistributionValue.cpp:
(WebCore::CSSContentDistributionValue::customCSSText):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator ItemPosition):
(WebCore::CSSPrimitiveValue::operator ContentPosition):
* css/CSSValueKeywords.in:
* css/parser/CSSPropertyParser.cpp:
(WebCore::isBaselineKeyword):
(WebCore::consumeBaselineKeyword):
(WebCore::consumeContentDistributionOverflowPosition):
(WebCore::consumeSelfPositionOverflowPosition):

LayoutTests:

Added new cases to the alignment properties parsing tests so that we can verify the new
baseline-alignment syntax is parsed as expected.
Additionally, I modified the tests so that they use the testharness format.

* css3/parse-align-content-expected.txt:
* css3/parse-align-content.html:
* css3/parse-justify-content-expected.txt:
* css3/parse-justify-content.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscss3parsealigncontentexpectedtxt">trunk/LayoutTests/css3/parse-align-content-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3parsealigncontenthtml">trunk/LayoutTests/css3/parse-align-content.html</a></li>
<li><a href="#trunkLayoutTestscss3parsejustifycontentexpectedtxt">trunk/LayoutTests/css3/parse-justify-content-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3parsejustifycontenthtml">trunk/LayoutTests/css3/parse-justify-content.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSContentDistributionValuecpp">trunk/Source/WebCore/css/CSSContentDistributionValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValueMappingsh">trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueKeywordsin">trunk/Source/WebCore/css/CSSValueKeywords.in</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSPropertyParsercpp">trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (214623 => 214624)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-03-30 21:13:21 UTC (rev 214623)
+++ trunk/LayoutTests/ChangeLog        2017-03-30 21:27:09 UTC (rev 214624)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2017-03-30  Javier Fernandez  &lt;jfernandez@igalia.com&gt;
+
+        [css-align] Adapt content-alignment properties to the new baseline syntax
+        https://bugs.webkit.org/show_bug.cgi?id=170262
+
+        Reviewed by David Hyatt.
+
+        Added new cases to the alignment properties parsing tests so that we can verify the new
+        baseline-alignment syntax is parsed as expected.
+        Additionally, I modified the tests so that they use the testharness format.
+
+        * css3/parse-align-content-expected.txt:
+        * css3/parse-align-content.html:
+        * css3/parse-justify-content-expected.txt:
+        * css3/parse-justify-content.html:
+
</ins><span class="cx"> 2017-03-30  James Craig  &lt;jcraig@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         AX: Expose a new AXSubrole for explicit ARIA &quot;group&quot; role
</span></span></pre></div>
<a id="trunkLayoutTestscss3parsealigncontentexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/parse-align-content-expected.txt (214623 => 214624)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/parse-align-content-expected.txt        2017-03-30 21:13:21 UTC (rev 214623)
+++ trunk/LayoutTests/css3/parse-align-content-expected.txt        2017-03-30 21:27:09 UTC (rev 214624)
</span><span class="lines">@@ -1,144 +1,13 @@
</span><span class="cx"> Test that setting and getting align-content works as expected
</span><span class="cx"> 
</span><del>-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</del><span class="cx"> 
</span><ins>+PASS Test getting align-content values previously set through CSS. 
+PASS Test setting invalid values to align-content through CSS. 
+PASS Test initial value of align-content through JS 
+PASS Test getting and setting align-content through JS 
+PASS Test bad combinations of align-content 
+PASS Test the value 'initial' 
+PASS Test the value 'initial' for grid containers 
+PASS Test the value 'initial' for flex containers 
+PASS Test the value 'inherit' 
</ins><span class="cx"> 
</span><del>-Test getting align-content set through CSS
-PASS getComputedStyle(alignContentAuto, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS getComputedStyle(alignContentBaseline, '').getPropertyValue('align-content') is &quot;baseline&quot;
-PASS getComputedStyle(alignContentLastBaseline, '').getPropertyValue('align-content') is &quot;last-baseline&quot;
-PASS getComputedStyle(alignContentSpaceBetween, '').getPropertyValue('align-content') is &quot;space-between&quot;
-PASS getComputedStyle(alignContentSpaceAround, '').getPropertyValue('align-content') is &quot;space-around&quot;
-PASS getComputedStyle(alignContentSpaceEvenly, '').getPropertyValue('align-content') is &quot;space-evenly&quot;
-PASS getComputedStyle(alignContentStretch, '').getPropertyValue('align-content') is &quot;stretch&quot;
-PASS getComputedStyle(alignContentStart, '').getPropertyValue('align-content') is &quot;start&quot;
-PASS getComputedStyle(alignContentEnd, '').getPropertyValue('align-content') is &quot;end&quot;
-PASS getComputedStyle(alignContentCenter, '').getPropertyValue('align-content') is &quot;center&quot;
-PASS getComputedStyle(alignContentLeft, '').getPropertyValue('align-content') is &quot;left&quot;
-PASS getComputedStyle(alignContentRight, '').getPropertyValue('align-content') is &quot;right&quot;
-PASS getComputedStyle(alignContentFlexStart, '').getPropertyValue('align-content') is &quot;flex-start&quot;
-PASS getComputedStyle(alignContentFlexEnd, '').getPropertyValue('align-content') is &quot;flex-end&quot;
-PASS getComputedStyle(alignContentEndUnsafe, '').getPropertyValue('align-content') is &quot;end unsafe&quot;
-PASS getComputedStyle(alignContentCenterUnsafe, '').getPropertyValue('align-content') is &quot;center unsafe&quot;
-PASS getComputedStyle(alignContentRightSafe, '').getPropertyValue('align-content') is &quot;right safe&quot;
-PASS getComputedStyle(alignContentLeftUnsafe, '').getPropertyValue('align-content') is &quot;left unsafe&quot;
-PASS getComputedStyle(alignContentFlexStartUnsafe, '').getPropertyValue('align-content') is &quot;flex-start unsafe&quot;
-PASS getComputedStyle(alignContentFlexEndSafe, '').getPropertyValue('align-content') is &quot;flex-end safe&quot;
-PASS getComputedStyle(alignContentSpaceBetweenLeft, '').getPropertyValue('align-content') is &quot;space-between left&quot;
-PASS getComputedStyle(alignContentSpaceAroundCenter, '').getPropertyValue('align-content') is &quot;space-around center&quot;
-PASS getComputedStyle(alignContentSpaceEvenlyRight, '').getPropertyValue('align-content') is &quot;space-evenly right&quot;
-PASS getComputedStyle(alignContentStretchStartSafe, '').getPropertyValue('align-content') is &quot;stretch start safe&quot;
-PASS getComputedStyle(alignContentSpaceAroundEndUnsafe, '').getPropertyValue('align-content') is &quot;space-around end unsafe&quot;
-PASS getComputedStyle(alignContentSpaceEvenlyFlexStartSafe, '').getPropertyValue('align-content') is &quot;space-evenly flex-start safe&quot;
-PASS getComputedStyle(alignContentSpaceBetweenSafe, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS getComputedStyle(alignContentSpaceBetweenStretch, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS getComputedStyle(alignContentSafe, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS getComputedStyle(alignContentRightSafeUnsafe, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS getComputedStyle(alignContentCenterLeft, '').getPropertyValue('align-content') is &quot;normal&quot;
-
-Test initial value of align-content through JS
-PASS getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-
-Test getting and setting align-content through JS
-PASS element.style.alignContent is &quot;center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;center&quot;
-PASS element.style.alignContent is &quot;start unsafe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;start unsafe&quot;
-PASS element.style.alignContent is &quot;flex-end safe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;flex-end safe&quot;
-PASS element.style.alignContent is &quot;space-between right safe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;space-between right safe&quot;
-PASS element.style.alignContent is &quot;stretch center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;stretch center&quot;
-PASS element.style.alignContent is &quot;right unsafe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;right unsafe&quot;
-PASS element.style.alignContent is &quot;normal&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;normal&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;normal&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;flex-end&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;flex-end&quot;
-
-Test bad combinations of align-content
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-PASS element.style.alignContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-
-Test the value 'initial'
-PASS element.style.alignContent is &quot;stretch center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;stretch center&quot;
-PASS element.style.alignContent is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-
-Test the value 'initial' for grid containers
-PASS element.style.alignContent is &quot;space-between left&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;space-between left&quot;
-PASS element.style.alignContent is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-
-Test the value 'initial' for flex containers
-PASS element.style.alignContent is &quot;right unsafe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;right unsafe&quot;
-PASS element.style.alignContent is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;normal&quot;
-
-Test the value 'inherit'
-PASS element.style.alignContent is &quot;end&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;end&quot;
-PASS element.style.alignContent is &quot;inherit&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;end&quot;
-PASS element.style.alignContent is &quot;left safe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;left safe&quot;
-PASS element.style.alignContent is &quot;inherit&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;left safe&quot;
-PASS element.style.alignContent is &quot;stretch center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;stretch center&quot;
-PASS element.style.alignContent is &quot;inherit&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('align-content') is &quot;stretch center&quot;
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestscss3parsealigncontenthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/parse-align-content.html (214623 => 214624)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/parse-align-content.html        2017-03-30 21:13:21 UTC (rev 214623)
+++ trunk/LayoutTests/css3/parse-align-content.html        2017-03-30 21:27:09 UTC (rev 214624)
</span><span class="lines">@@ -1,6 +1,4 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><del>-&lt;html&gt;
-&lt;head&gt;
</del><span class="cx"> &lt;style&gt;
</span><span class="cx"> #alignContentAuto {
</span><span class="cx">     align-content: auto;
</span><span class="lines">@@ -10,8 +8,12 @@
</span><span class="cx">     align-content: baseline;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#alignContentFirstBaseline {
+    align-content: first baseline;
+}
+
</ins><span class="cx"> #alignContentLastBaseline {
</span><del>-    align-content: last-baseline;
</del><ins>+    align-content: last baseline;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignContentSpaceBetween {
</span><span class="lines">@@ -127,20 +129,15 @@
</span><span class="cx">     align-content: center left;
</span><span class="cx"> }
</span><span class="cx"> &lt;/style&gt;
</span><del>-&lt;script src=&quot;../resources/js-test.js&quot;&gt;&lt;/script&gt;
-&lt;/head&gt;
-&lt;body&gt;
</del><ins>+&lt;p&gt;Test that setting and getting align-content works as expected&lt;/p&gt;
</ins><span class="cx"> &lt;div id=&quot;alignContentAuto&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;alignContentBaseline&quot;&gt;&lt;/div&gt;
</span><ins>+&lt;div id=&quot;alignContentFirstBaseline&quot;&gt;&lt;/div&gt;
</ins><span class="cx"> &lt;div id=&quot;alignContentLastBaseline&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;alignContentSpaceBetween&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;alignContentSpaceAround&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;alignContentSpaceEvenly&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;alignContentStretch&quot;&gt;&lt;/div&gt;
</span><del>-&lt;div id=&quot;alignContentSpaceBetweenSafe&quot;&gt;&lt;/div&gt;
-&lt;div id=&quot;alignContentSpaceAroundUnsafe&quot;&gt;&lt;/div&gt;
-&lt;div id=&quot;alignContentStretchUnsafe&quot;&gt;&lt;/div&gt;
-&lt;div id=&quot;alignContentStretchrue&quot;&gt;&lt;/div&gt;
</del><span class="cx"> &lt;div id=&quot;alignContentStart&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;alignContentEnd&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;alignContentCenter&quot;&gt;&lt;/div&gt;
</span><span class="lines">@@ -167,195 +164,177 @@
</span><span class="cx"> &lt;div id=&quot;alignContentRightSafeUnsafe&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;alignContentCenterLeft&quot;&gt;&lt;/div&gt;
</span><span class="cx"> 
</span><del>-&lt;script src=&quot;resources/alignment-parsing-utils.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/alignment-parsing-utils-th.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script&gt;
</span><del>-description('Test that setting and getting align-content works as expected');
</del><ins>+test(function() {
+    var alignContentAuto = document.getElementById(&quot;alignContentAuto&quot;);
+    checkValues(alignContentAuto, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;normal&quot;);
+    var alignContentBaseline = document.getElementById(&quot;alignContentBaseline&quot;);
+    checkValues(alignContentBaseline, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;baseline&quot;);
+    var alignContentLastBaseline = document.getElementById(&quot;alignContentFirstBaseline&quot;);
+    checkValues(alignContentLastBaseline, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;baseline&quot;);
+    var alignContentLastBaseline = document.getElementById(&quot;alignContentLastBaseline&quot;);
+    checkValues(alignContentLastBaseline, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;last baseline&quot;);
+    var alignContentSpaceBetween = document.getElementById(&quot;alignContentSpaceBetween&quot;);
+    checkValues(alignContentSpaceBetween, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;space-between&quot;);
+    var alignContentSpaceAround = document.getElementById(&quot;alignContentSpaceAround&quot;);
+    checkValues(alignContentSpaceAround, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;space-around&quot;);
+    var alignContentSpaceEvenly = document.getElementById(&quot;alignContentSpaceEvenly&quot;);
+    checkValues(alignContentSpaceEvenly, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;space-evenly&quot;);
+    var alignContentStretch = document.getElementById(&quot;alignContentStretch&quot;);
+    checkValues(alignContentStretch, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;stretch&quot;);
+    var alignContentStart = document.getElementById(&quot;alignContentStart&quot;);
+    checkValues(alignContentStart, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;start&quot;);
+    var alignContentEnd = document.getElementById(&quot;alignContentEnd&quot;);
+    checkValues(alignContentEnd, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;end&quot;);
+    var alignContentCenter = document.getElementById(&quot;alignContentCenter&quot;);
+    checkValues(alignContentCenter, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;center&quot;);
+    var alignContentLeft = document.getElementById(&quot;alignContentLeft&quot;);
+    checkValues(alignContentLeft, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;left&quot;);
+    var alignContentRight = document.getElementById(&quot;alignContentRight&quot;);
+    checkValues(alignContentRight, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;right&quot;);
+    var alignContentFlexStart = document.getElementById(&quot;alignContentFlexStart&quot;);
+    checkValues(alignContentFlexStart, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;flex-start&quot;);
+    var alignContentFlexEnd = document.getElementById(&quot;alignContentFlexEnd&quot;);
+    checkValues(alignContentFlexEnd, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;flex-end&quot;);
+    var alignContentEndUnsafe = document.getElementById(&quot;alignContentEndUnsafe&quot;);
+    checkValues(alignContentEndUnsafe, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;end unsafe&quot;);
+    var alignContentCenterUnsafe = document.getElementById(&quot;alignContentCenterUnsafe&quot;);
+    checkValues(alignContentCenterUnsafe, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;center unsafe&quot;);
+    var alignContentRightSafe = document.getElementById(&quot;alignContentRightSafe&quot;);
+    checkValues(alignContentRightSafe, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;right safe&quot;);
+    var alignContentLeftUnsafe = document.getElementById(&quot;alignContentLeftUnsafe&quot;);
+    checkValues(alignContentLeftUnsafe, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;left unsafe&quot;);
+    var alignContentFlexStartUnsafe = document.getElementById(&quot;alignContentFlexStartUnsafe&quot;);
+    checkValues(alignContentFlexStartUnsafe, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;flex-start unsafe&quot;);
+    var alignContentFlexEndSafe = document.getElementById(&quot;alignContentFlexEndSafe&quot;);
+    checkValues(alignContentFlexEndSafe, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;flex-end safe&quot;);
+    var alignContentSpaceBetweenLeft = document.getElementById(&quot;alignContentSpaceBetweenLeft&quot;);
+    checkValues(alignContentSpaceBetweenLeft, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;space-between left&quot;);
+    var alignContentSpaceAroundCenter = document.getElementById(&quot;alignContentSpaceAroundCenter&quot;);
+    checkValues(alignContentSpaceAroundCenter, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;space-around center&quot;);
+    var alignContentSpaceEvenlyRight = document.getElementById(&quot;alignContentSpaceEvenlyRight&quot;);
+    checkValues(alignContentSpaceEvenlyRight, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;space-evenly right&quot;);
+    var alignContentStretchStartSafe = document.getElementById(&quot;alignContentStretchStartSafe&quot;);
+    checkValues(alignContentStretchStartSafe, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;stretch start safe&quot;);
+    var alignContentSpaceAroundEndUnsafe = document.getElementById(&quot;alignContentSpaceAroundEndUnsafe&quot;);
+    checkValues(alignContentSpaceAroundEndUnsafe, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;space-around end unsafe&quot;);
+    var alignContentSpaceEvenlyFlexStartSafe = document.getElementById(&quot;alignContentSpaceEvenlyFlexStartSafe&quot;);
+    checkValues(alignContentSpaceEvenlyFlexStartSafe, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;space-evenly flex-start safe&quot;);
+}, &quot;Test getting align-content values previously set through CSS.&quot;);
</ins><span class="cx"> 
</span><del>-debug(&quot;Test getting align-content set through CSS&quot;);
-var alignContentAuto = document.getElementById(&quot;alignContentAuto&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentAuto, '').getPropertyValue('align-content')&quot;, &quot;normal&quot;);
</del><ins>+test(function() {
+    var alignContentSpaceBetweenSafe = document.getElementById(&quot;alignContentSpaceBetweenSafe&quot;);
+    checkValues(alignContentSpaceBetweenSafe, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;normal&quot;);
+    var alignContentSpaceBetweenStretch = document.getElementById(&quot;alignContentSpaceBetweenStretch&quot;);
+    checkValues(alignContentSpaceBetweenStretch, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;normal&quot;);
+    var alignContentSafe = document.getElementById(&quot;alignContentSafe&quot;);
+    checkValues(alignContentSafe, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;normal&quot;);
+    var alignContentRightSafeUnsafe = document.getElementById(&quot;alignContentRightSafeUnsafe&quot;);
+    checkValues(alignContentRightSafeUnsafe, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;normal&quot;);
+    var alignContentCenterLeft = document.getElementById(&quot;alignContentCenterLeft&quot;);
+    checkValues(alignContentCenterLeft, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;normal&quot;);
+}, &quot;Test setting invalid values to align-content through CSS.&quot;);
</ins><span class="cx"> 
</span><del>-var alignContentBaseline = document.getElementById(&quot;alignContentBaseline&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentBaseline, '').getPropertyValue('align-content')&quot;, &quot;baseline&quot;);
</del><ins>+test(function() {
+    element = document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
+    checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;&quot;, &quot;normal&quot;);
+}, &quot;Test initial value of align-content through JS&quot;);
</ins><span class="cx"> 
</span><del>-var alignContentLastBaseline = document.getElementById(&quot;alignContentLastBaseline&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentLastBaseline, '').getPropertyValue('align-content')&quot;, &quot;last-baseline&quot;);
</del><ins>+test(function() {
+    element = document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
+    element.style.alignContent = &quot;center&quot;;
+    checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;center&quot;, &quot;center&quot;);
</ins><span class="cx"> 
</span><del>-var alignContentSpaceBetween = document.getElementById(&quot;alignContentSpaceBetween&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentSpaceBetween, '').getPropertyValue('align-content')&quot;, &quot;space-between&quot;);
</del><ins>+    element.style.alignContent = &quot;unsafe start&quot;;
+    checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;start unsafe&quot;, &quot;start unsafe&quot;);
</ins><span class="cx"> 
</span><del>-var alignContentSpaceAround = document.getElementById(&quot;alignContentSpaceAround&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentSpaceAround, '').getPropertyValue('align-content')&quot;, &quot;space-around&quot;);
</del><ins>+    element.style.alignContent = &quot;flex-end safe&quot;;
+    checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;flex-end safe&quot;, &quot;flex-end safe&quot;);
</ins><span class="cx"> 
</span><del>-var alignContentSpaceEvenly = document.getElementById(&quot;alignContentSpaceEvenly&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentSpaceEvenly, '').getPropertyValue('align-content')&quot;, &quot;space-evenly&quot;);
</del><ins>+    element.style.alignContent = &quot;space-between right safe&quot;;
+    checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;space-between right safe&quot;, &quot;space-between right safe&quot;);
</ins><span class="cx"> 
</span><del>-var alignContentStretch = document.getElementById(&quot;alignContentStretch&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentStretch, '').getPropertyValue('align-content')&quot;, &quot;stretch&quot;);
</del><ins>+    element.style.alignContent = &quot;stretch center&quot;;
+    checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;stretch center&quot;, &quot;stretch center&quot;);
</ins><span class="cx"> 
</span><del>-var alignContentStart = document.getElementById(&quot;alignContentStart&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentStart, '').getPropertyValue('align-content')&quot;, &quot;start&quot;);
</del><ins>+    element.style.alignContent = &quot;right unsafe&quot;;
+    checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;right unsafe&quot;, &quot;right unsafe&quot;);
</ins><span class="cx"> 
</span><del>-var alignContentEnd = document.getElementById(&quot;alignContentEnd&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentEnd, '').getPropertyValue('align-content')&quot;, &quot;end&quot;);
</del><ins>+    element.style.justifyContent = &quot;first baseline&quot;;
+    checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;first baseline&quot;, &quot;baseline&quot;);
</ins><span class="cx"> 
</span><del>-var alignContentCenter = document.getElementById(&quot;alignContentCenter&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentCenter, '').getPropertyValue('align-content')&quot;, &quot;center&quot;);
</del><ins>+    element.style.justifyContent = &quot;last baseline&quot;;
+    checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;last baseline&quot;, &quot;last baseline&quot;);
</ins><span class="cx"> 
</span><del>-var alignContentLeft = document.getElementById(&quot;alignContentLeft&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentLeft, '').getPropertyValue('align-content')&quot;, &quot;left&quot;);
</del><ins>+    element.style.alignContent = &quot;normal&quot;;
+    checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;normal&quot;, &quot;normal&quot;);
</ins><span class="cx"> 
</span><del>-var alignContentRight = document.getElementById(&quot;alignContentRight&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentRight, '').getPropertyValue('align-content')&quot;, &quot;right&quot;);
</del><ins>+    element.style.display = &quot;flex&quot;;
+    element.style.alignContent = &quot;normal&quot;;
+    checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;normal&quot;, &quot;normal&quot;);
</ins><span class="cx"> 
</span><del>-var alignContentFlexStart = document.getElementById(&quot;alignContentFlexStart&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentFlexStart, '').getPropertyValue('align-content')&quot;, &quot;flex-start&quot;);
</del><ins>+    element.style.display = &quot;grid&quot;;
+    element.style.alignContent = &quot;normal&quot;;
+    checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;normal&quot;, &quot;normal&quot;);
</ins><span class="cx"> 
</span><del>-var alignContentFlexEnd = document.getElementById(&quot;alignContentFlexEnd&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentFlexEnd, '').getPropertyValue('align-content')&quot;, &quot;flex-end&quot;);
</del><ins>+    element.style.alignContent = &quot;flex-end&quot;;
+    checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;flex-end&quot;, &quot;flex-end&quot;);
+}, &quot;Test getting and setting align-content through JS&quot;);
</ins><span class="cx"> 
</span><del>-var alignContentEndUnsafe = document.getElementById(&quot;alignContentEndUnsafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentEndUnsafe, '').getPropertyValue('align-content')&quot;, &quot;end unsafe&quot;);
</del><ins>+test(function() {
+    element = document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
</ins><span class="cx"> 
</span><del>-var alignContentCenterUnsafe = document.getElementById(&quot;alignContentCenterUnsafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentCenterUnsafe, '').getPropertyValue('align-content')&quot;, &quot;center unsafe&quot;);
</del><ins>+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;auto&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;unsafe auto&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;auto safe&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;auto left&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;baseline safe&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;last-baseline center&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;unsafe unsafe&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;unsafe safe&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;center start&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;baseline safe&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;unsafe baseline&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;unsafe safe left&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;unsafe left safe&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;left safe unsafe safe&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;start right space-between&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;safe stretch&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;normal space-between&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;stretch normal&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;normal safe&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;space-around stretch&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;end space-between start&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;right safe left&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;unsafe&quot;);
+    checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;safe&quot;);
+}, &quot;Test bad combinations of align-content&quot;);
</ins><span class="cx"> 
</span><del>-var alignContentRightSafe = document.getElementById(&quot;alignContentRightSafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentRightSafe, '').getPropertyValue('align-content')&quot;, &quot;right safe&quot;);
</del><ins>+test(function() {
+    element.style.display = &quot;&quot;;
+    checkInitialValues(element, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;center&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial'&quot;);
</ins><span class="cx"> 
</span><del>-var alignContentLeftUnsafe = document.getElementById(&quot;alignContentLeftUnsafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentLeftUnsafe, '').getPropertyValue('align-content')&quot;, &quot;left unsafe&quot;);
</del><ins>+test(function() {
+    element.style.display = &quot;grid&quot;;
+    checkInitialValues(element, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;left safe&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial' for grid containers&quot;);
</ins><span class="cx"> 
</span><del>-var alignContentFlexStartUnsafe = document.getElementById(&quot;alignContentFlexStartUnsafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentFlexStartUnsafe, '').getPropertyValue('align-content')&quot;, &quot;flex-start unsafe&quot;);
</del><ins>+test(function() {
+    element.style.display = &quot;flex&quot;;
+    checkInitialValues(element, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;right unsafe&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial' for flex containers&quot;);
</ins><span class="cx"> 
</span><del>-var alignContentFlexEndSafe = document.getElementById(&quot;alignContentFlexEndSafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentFlexEndSafe, '').getPropertyValue('align-content')&quot;, &quot;flex-end safe&quot;);
-
-var alignContentSpaceBetweenLeft = document.getElementById(&quot;alignContentSpaceBetweenLeft&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentSpaceBetweenLeft, '').getPropertyValue('align-content')&quot;, &quot;space-between left&quot;);
-
-var alignContentSpaceAroundCenter = document.getElementById(&quot;alignContentSpaceAroundCenter&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentSpaceAroundCenter, '').getPropertyValue('align-content')&quot;, &quot;space-around center&quot;);
-
-var alignContentSpaceEvenlyRight = document.getElementById(&quot;alignContentSpaceEvenlyRight&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentSpaceEvenlyRight, '').getPropertyValue('align-content')&quot;, &quot;space-evenly right&quot;);
-
-var alignContentStretchStartSafe = document.getElementById(&quot;alignContentStretchStartSafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentStretchStartSafe, '').getPropertyValue('align-content')&quot;, &quot;stretch start safe&quot;);
-
-var alignContentSpaceAroundEndUnsafe = document.getElementById(&quot;alignContentSpaceAroundEndUnsafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentSpaceAroundEndUnsafe, '').getPropertyValue('align-content')&quot;, &quot;space-around end unsafe&quot;);
-
-var alignContentSpaceEvenlyFlexStartSafe = document.getElementById(&quot;alignContentSpaceEvenlyFlexStartSafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentSpaceEvenlyFlexStartSafe, '').getPropertyValue('align-content')&quot;, &quot;space-evenly flex-start safe&quot;);
-
-var alignContentSpaceBetweenSafe = document.getElementById(&quot;alignContentSpaceBetweenSafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentSpaceBetweenSafe, '').getPropertyValue('align-content')&quot;, &quot;normal&quot;);
-
-var alignContentSpaceAroundUnsafe = document.getElementById(&quot;alignContentSpaceBetweenStretch&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentSpaceBetweenStretch, '').getPropertyValue('align-content')&quot;, &quot;normal&quot;);
-
-var alignContentSpaceAroundUnsafe = document.getElementById(&quot;alignContentSafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentSafe, '').getPropertyValue('align-content')&quot;, &quot;normal&quot;);
-
-var alignContentSpaceAroundUnsafe = document.getElementById(&quot;alignContentRightSafeUnsafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentRightSafeUnsafe, '').getPropertyValue('align-content')&quot;, &quot;normal&quot;);
-
-var alignContentSpaceAroundUnsafe = document.getElementById(&quot;alignContentCenterLeft&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(alignContentCenterLeft, '').getPropertyValue('align-content')&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test initial value of align-content through JS&quot;);
-element = document.createElement(&quot;div&quot;);
-document.body.appendChild(element);
-shouldBeEqualToString(&quot;getComputedStyle(element, '').getPropertyValue('align-content')&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test getting and setting align-content through JS&quot;);
-element = document.createElement(&quot;div&quot;);
-document.body.appendChild(element);
-element.style.alignContent = &quot;center&quot;;
-checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;center&quot;, &quot;center&quot;);
-
-element.style.alignContent = &quot;unsafe start&quot;;
-checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;start unsafe&quot;, &quot;start unsafe&quot;);
-
-element.style.alignContent = &quot;flex-end safe&quot;;
-checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;flex-end safe&quot;, &quot;flex-end safe&quot;);
-
-element.style.alignContent = &quot;space-between right safe&quot;;
-checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;space-between right safe&quot;, &quot;space-between right safe&quot;);
-
-element.style.alignContent = &quot;stretch center&quot;;
-checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;stretch center&quot;, &quot;stretch center&quot;);
-
-element.style.alignContent = &quot;right unsafe&quot;;
-checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;right unsafe&quot;, &quot;right unsafe&quot;);
-
-element.style.alignContent = &quot;normal&quot;;
-checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;normal&quot;, &quot;normal&quot;);
-
-element.style.display = &quot;-webkit-flex&quot;;
-element.style.alignContent = &quot;normal&quot;;
-checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;normal&quot;, &quot;normal&quot;);
-
-element.style.display = &quot;grid&quot;;
-element.style.alignContent = &quot;normal&quot;;
-checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;normal&quot;, &quot;normal&quot;);
-
-element.style.alignContent = &quot;flex-end&quot;;
-checkValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;flex-end&quot;, &quot;flex-end&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test bad combinations of align-content&quot;);
-element = document.createElement(&quot;div&quot;);
-document.body.appendChild(element);
-
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;auto&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;unsafe auto&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;auto safe&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;auto left&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;baseline safe&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;last baseline center&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;unsafe unsafe&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;unsafe safe&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;center start&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;baseline safe&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;unsafe baseline&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;unsafe safe left&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;unsafe left safe&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;left safe unsafe safe&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;start right space-between&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;safe stretch&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;space-around stretch&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;end space-between start&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;right safe left&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;unsafe&quot;);
-checkBadValues(element, &quot;alignContent&quot;, &quot;align-content&quot;,  &quot;safe&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial'&quot;);
-element.style.display = &quot;&quot;;
-checkInitialValues(element, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;stretch center&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial' for grid containers&quot;);
-element.style.display = &quot;grid&quot;;
-checkInitialValues(element, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;space-between left&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial' for flex containers&quot;);
-element.style.display = &quot;-webkit-flex&quot;;
-checkInitialValues(element, &quot;alignContent&quot;, &quot;align-content&quot;, &quot;right unsafe&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'inherit'&quot;);
-checkInheritValues(&quot;alignContent&quot;, &quot;align-content&quot;, &quot;end&quot;);
-checkInheritValues(&quot;alignContent&quot;, &quot;align-content&quot;, &quot;left safe&quot;);
-checkInheritValues(&quot;alignContent&quot;, &quot;align-content&quot;, &quot;stretch center&quot;);
-
</del><ins>+test(function() {
+    checkInheritValues(&quot;alignContent&quot;, &quot;align-content&quot;, &quot;end&quot;);
+    checkInheritValues(&quot;alignContent&quot;, &quot;align-content&quot;, &quot;left safe&quot;);
+    checkInheritValues(&quot;alignContent&quot;, &quot;align-content&quot;, &quot;center unsafe&quot;);
+}, &quot;Test the value 'inherit'&quot;);
</ins><span class="cx"> &lt;/script&gt;
</span><del>-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestscss3parsejustifycontentexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/parse-justify-content-expected.txt (214623 => 214624)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/parse-justify-content-expected.txt        2017-03-30 21:13:21 UTC (rev 214623)
+++ trunk/LayoutTests/css3/parse-justify-content-expected.txt        2017-03-30 21:27:09 UTC (rev 214624)
</span><span class="lines">@@ -1,144 +1,13 @@
</span><span class="cx"> Test that setting and getting justify-content works as expected
</span><span class="cx"> 
</span><del>-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</del><span class="cx"> 
</span><ins>+PASS Test getting justify-content values previously set through CSS. 
+PASS Test setting invalid values to justify-content through CSS. 
+PASS Test initial value of justify-content through JS 
+PASS Test getting and setting justify-content through JS 
+PASS Test bad combinations of justify-content 
+PASS Test the value 'initial' 
+PASS Test the value 'initial' for grid containers 
+PASS Test the value 'initial' for flex containers 
+PASS Test the value 'inherit' 
</ins><span class="cx"> 
</span><del>-Test getting justify-content set through CSS
-PASS getComputedStyle(justifyContentAuto, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS getComputedStyle(justifyContentBaseline, '').getPropertyValue('justify-content') is &quot;baseline&quot;
-PASS getComputedStyle(justifyContentLastBaseline, '').getPropertyValue('justify-content') is &quot;last-baseline&quot;
-PASS getComputedStyle(justifyContentSpaceBetween, '').getPropertyValue('justify-content') is &quot;space-between&quot;
-PASS getComputedStyle(justifyContentSpaceAround, '').getPropertyValue('justify-content') is &quot;space-around&quot;
-PASS getComputedStyle(justifyContentSpaceEvenly, '').getPropertyValue('justify-content') is &quot;space-evenly&quot;
-PASS getComputedStyle(justifyContentStretch, '').getPropertyValue('justify-content') is &quot;stretch&quot;
-PASS getComputedStyle(justifyContentStart, '').getPropertyValue('justify-content') is &quot;start&quot;
-PASS getComputedStyle(justifyContentEnd, '').getPropertyValue('justify-content') is &quot;end&quot;
-PASS getComputedStyle(justifyContentCenter, '').getPropertyValue('justify-content') is &quot;center&quot;
-PASS getComputedStyle(justifyContentLeft, '').getPropertyValue('justify-content') is &quot;left&quot;
-PASS getComputedStyle(justifyContentRight, '').getPropertyValue('justify-content') is &quot;right&quot;
-PASS getComputedStyle(justifyContentFlexStart, '').getPropertyValue('justify-content') is &quot;flex-start&quot;
-PASS getComputedStyle(justifyContentFlexEnd, '').getPropertyValue('justify-content') is &quot;flex-end&quot;
-PASS getComputedStyle(justifyContentEndUnsafe, '').getPropertyValue('justify-content') is &quot;end unsafe&quot;
-PASS getComputedStyle(justifyContentCenterUnsafe, '').getPropertyValue('justify-content') is &quot;center unsafe&quot;
-PASS getComputedStyle(justifyContentRightSafe, '').getPropertyValue('justify-content') is &quot;right safe&quot;
-PASS getComputedStyle(justifyContentLeftUnsafe, '').getPropertyValue('justify-content') is &quot;left unsafe&quot;
-PASS getComputedStyle(justifyContentFlexStartUnsafe, '').getPropertyValue('justify-content') is &quot;flex-start unsafe&quot;
-PASS getComputedStyle(justifyContentFlexEndSafe, '').getPropertyValue('justify-content') is &quot;flex-end safe&quot;
-PASS getComputedStyle(justifyContentSpaceBetweenLeft, '').getPropertyValue('justify-content') is &quot;space-between left&quot;
-PASS getComputedStyle(justifyContentSpaceAroundCenter, '').getPropertyValue('justify-content') is &quot;space-around center&quot;
-PASS getComputedStyle(justifyContentSpaceEvenlyRight, '').getPropertyValue('justify-content') is &quot;space-evenly right&quot;
-PASS getComputedStyle(justifyContentStretchStartSafe, '').getPropertyValue('justify-content') is &quot;stretch start safe&quot;
-PASS getComputedStyle(justifyContentSpaceAroundEndUnsafe, '').getPropertyValue('justify-content') is &quot;space-around end unsafe&quot;
-PASS getComputedStyle(justifyContentSpaceEvenlyFlexStartSafe, '').getPropertyValue('justify-content') is &quot;space-evenly flex-start safe&quot;
-PASS getComputedStyle(justifyContentSpaceBetweenSafe, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS getComputedStyle(justifyContentSpaceBetweenStretch, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS getComputedStyle(justifyContentSafe, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS getComputedStyle(justifyContentRightSafeUnsafe, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS getComputedStyle(justifyContentCenterLeft, '').getPropertyValue('justify-content') is &quot;normal&quot;
-
-Test initial value of justify-content through JS
-PASS getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-
-Test getting and setting justify-content through JS
-PASS element.style.justifyContent is &quot;center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;center&quot;
-PASS element.style.justifyContent is &quot;start unsafe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start unsafe&quot;
-PASS element.style.justifyContent is &quot;flex-end safe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;flex-end safe&quot;
-PASS element.style.justifyContent is &quot;space-between right safe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;space-between right safe&quot;
-PASS element.style.justifyContent is &quot;stretch center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;stretch center&quot;
-PASS element.style.justifyContent is &quot;right unsafe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;right unsafe&quot;
-PASS element.style.justifyContent is &quot;normal&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;normal&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;normal&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;flex-end&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;flex-end&quot;
-
-Test bad combinations of justify-content
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-PASS element.style.justifyContent is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-
-Test the value 'initial'
-PASS element.style.justifyContent is &quot;stretch center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;stretch center&quot;
-PASS element.style.justifyContent is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-
-Test the value 'initial' for grid containers
-PASS element.style.justifyContent is &quot;space-between left&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;space-between left&quot;
-PASS element.style.justifyContent is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-
-Test the value 'initial' for flex containers
-PASS element.style.justifyContent is &quot;right unsafe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;right unsafe&quot;
-PASS element.style.justifyContent is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;normal&quot;
-
-Test the value 'inherit'
-PASS element.style.justifyContent is &quot;end&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;end&quot;
-PASS element.style.justifyContent is &quot;inherit&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;end&quot;
-PASS element.style.justifyContent is &quot;left safe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;left safe&quot;
-PASS element.style.justifyContent is &quot;inherit&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;left safe&quot;
-PASS element.style.justifyContent is &quot;stretch center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;stretch center&quot;
-PASS element.style.justifyContent is &quot;inherit&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;stretch center&quot;
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestscss3parsejustifycontenthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/parse-justify-content.html (214623 => 214624)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/parse-justify-content.html        2017-03-30 21:13:21 UTC (rev 214623)
+++ trunk/LayoutTests/css3/parse-justify-content.html        2017-03-30 21:27:09 UTC (rev 214624)
</span><span class="lines">@@ -1,6 +1,4 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><del>-&lt;html&gt;
-&lt;head&gt;
</del><span class="cx"> &lt;style&gt;
</span><span class="cx"> #justifyContentAuto {
</span><span class="cx">     justify-content: auto;
</span><span class="lines">@@ -10,8 +8,12 @@
</span><span class="cx">     justify-content: baseline;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#justifyContentFirstBaseline {
+    justify-content: first baseline;
+}
+
</ins><span class="cx"> #justifyContentLastBaseline {
</span><del>-    justify-content: last-baseline;
</del><ins>+    justify-content: last baseline;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #justifyContentSpaceBetween {
</span><span class="lines">@@ -127,11 +129,10 @@
</span><span class="cx">     justify-content: center left;
</span><span class="cx"> }
</span><span class="cx"> &lt;/style&gt;
</span><del>-&lt;script src=&quot;../resources/js-test.js&quot;&gt;&lt;/script&gt;
-&lt;/head&gt;
-&lt;body&gt;
</del><ins>+&lt;p&gt;Test that setting and getting justify-content works as expected&lt;/p&gt;
</ins><span class="cx"> &lt;div id=&quot;justifyContentAuto&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;justifyContentBaseline&quot;&gt;&lt;/div&gt;
</span><ins>+&lt;div id=&quot;justifyContentFirstBaseline&quot;&gt;&lt;/div&gt;
</ins><span class="cx"> &lt;div id=&quot;justifyContentLastBaseline&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;justifyContentSpaceBetween&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;justifyContentSpaceAround&quot;&gt;&lt;/div&gt;
</span><span class="lines">@@ -163,195 +164,180 @@
</span><span class="cx"> &lt;div id=&quot;justifyContentRightSafeUnsafe&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;justifyContentCenterLeft&quot;&gt;&lt;/div&gt;
</span><span class="cx"> 
</span><del>-&lt;script src=&quot;resources/alignment-parsing-utils.js&quot;&gt;&lt;/script&gt;
</del><ins>+&lt;script src=&quot;../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/alignment-parsing-utils-th.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script&gt;
</span><del>-description('Test that setting and getting justify-content works as expected');
</del><ins>+test(function() {
+    var justifyContentAuto = document.getElementById(&quot;justifyContentAuto&quot;);
+    checkValues(justifyContentAuto, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;normal&quot;);
+    var justifyContentBaseline = document.getElementById(&quot;justifyContentBaseline&quot;);
+    checkValues(justifyContentBaseline, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;baseline&quot;);
+    var justifyContentLastBaseline = document.getElementById(&quot;justifyContentFirstBaseline&quot;);
+    checkValues(justifyContentLastBaseline, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;baseline&quot;);
+    var justifyContentLastBaseline = document.getElementById(&quot;justifyContentLastBaseline&quot;);
+    checkValues(justifyContentLastBaseline, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;last baseline&quot;);
+    var justifyContentSpaceBetween = document.getElementById(&quot;justifyContentSpaceBetween&quot;);
+    checkValues(justifyContentSpaceBetween, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;space-between&quot;);
+    var justifyContentSpaceAround = document.getElementById(&quot;justifyContentSpaceAround&quot;);
+    checkValues(justifyContentSpaceAround, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;space-around&quot;);
+    var justifyContentSpaceEvenly = document.getElementById(&quot;justifyContentSpaceEvenly&quot;);
+    checkValues(justifyContentSpaceEvenly, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;space-evenly&quot;);
+    var justifyContentStretch = document.getElementById(&quot;justifyContentStretch&quot;);
+    checkValues(justifyContentStretch, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;stretch&quot;);
+    var justifyContentStart = document.getElementById(&quot;justifyContentStart&quot;);
+    checkValues(justifyContentStart, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;start&quot;);
+    var justifyContentEnd = document.getElementById(&quot;justifyContentEnd&quot;);
+    checkValues(justifyContentEnd, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;end&quot;);
+    var justifyContentCenter = document.getElementById(&quot;justifyContentCenter&quot;);
+    checkValues(justifyContentCenter, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;center&quot;);
+    var justifyContentLeft = document.getElementById(&quot;justifyContentLeft&quot;);
+    checkValues(justifyContentLeft, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;left&quot;);
+    var justifyContentRight = document.getElementById(&quot;justifyContentRight&quot;);
+    checkValues(justifyContentRight, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;right&quot;);
+    var justifyContentFlexStart = document.getElementById(&quot;justifyContentFlexStart&quot;);
+    checkValues(justifyContentFlexStart, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;flex-start&quot;);
+    var justifyContentFlexEnd = document.getElementById(&quot;justifyContentFlexEnd&quot;);
+    checkValues(justifyContentFlexEnd, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;flex-end&quot;);
+    var justifyContentEndUnsafe = document.getElementById(&quot;justifyContentEndUnsafe&quot;);
+    checkValues(justifyContentEndUnsafe, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;end unsafe&quot;);
+    var justifyContentCenterUnsafe = document.getElementById(&quot;justifyContentCenterUnsafe&quot;);
+    checkValues(justifyContentCenterUnsafe, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;center unsafe&quot;);
+    var justifyContentRightSafe = document.getElementById(&quot;justifyContentRightSafe&quot;);
+    checkValues(justifyContentRightSafe, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;right safe&quot;);
+    var justifyContentLeftUnsafe = document.getElementById(&quot;justifyContentLeftUnsafe&quot;);
+    checkValues(justifyContentLeftUnsafe, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;left unsafe&quot;);
+    var justifyContentFlexStartUnsafe = document.getElementById(&quot;justifyContentFlexStartUnsafe&quot;);
+    checkValues(justifyContentFlexStartUnsafe, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;flex-start unsafe&quot;);
+    var justifyContentFlexEndSafe = document.getElementById(&quot;justifyContentFlexEndSafe&quot;);
+    checkValues(justifyContentFlexEndSafe, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;flex-end safe&quot;);
+    var justifyContentSpaceBetweenLeft = document.getElementById(&quot;justifyContentSpaceBetweenLeft&quot;);
+    checkValues(justifyContentSpaceBetweenLeft, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;space-between left&quot;);
+    var justifyContentSpaceAroundCenter = document.getElementById(&quot;justifyContentSpaceAroundCenter&quot;);
+    checkValues(justifyContentSpaceAroundCenter, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;space-around center&quot;);
+    var justifyContentSpaceEvenlyRight = document.getElementById(&quot;justifyContentSpaceEvenlyRight&quot;);
+    checkValues(justifyContentSpaceEvenlyRight, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;space-evenly right&quot;);
+    var justifyContentStretchStartSafe = document.getElementById(&quot;justifyContentStretchStartSafe&quot;);
+    checkValues(justifyContentStretchStartSafe, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;stretch start safe&quot;);
+    var justifyContentSpaceAroundEndUnsafe = document.getElementById(&quot;justifyContentSpaceAroundEndUnsafe&quot;);
+    checkValues(justifyContentSpaceAroundEndUnsafe, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;space-around end unsafe&quot;);
+    var justifyContentSpaceEvenlyFlexStartSafe = document.getElementById(&quot;justifyContentSpaceEvenlyFlexStartSafe&quot;);
+    checkValues(justifyContentSpaceEvenlyFlexStartSafe, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;space-evenly flex-start safe&quot;);
+}, &quot;Test getting justify-content values previously set through CSS.&quot;);
</ins><span class="cx"> 
</span><del>-debug(&quot;Test getting justify-content set through CSS&quot;);
-var justifyContentAuto = document.getElementById(&quot;justifyContentAuto&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentAuto, '').getPropertyValue('justify-content')&quot;, &quot;normal&quot;);
</del><ins>+test(function() {
+    var justifyContentSpaceBetweenSafe = document.getElementById(&quot;justifyContentSpaceBetweenSafe&quot;);
+    checkValues(justifyContentSpaceBetweenSafe, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;normal&quot;);
+    var justifyContentSpaceBetweenStretch = document.getElementById(&quot;justifyContentSpaceBetweenStretch&quot;);
+    checkValues(justifyContentSpaceBetweenStretch, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;normal&quot;);
+    var justifyContentSafe = document.getElementById(&quot;justifyContentSafe&quot;);
+    checkValues(justifyContentSafe, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;normal&quot;);
+    var justifyContentRightSafeUnsafe = document.getElementById(&quot;justifyContentRightSafeUnsafe&quot;);
+    checkValues(justifyContentRightSafeUnsafe, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;normal&quot;);
+    var justifyContentCenterLeft = document.getElementById(&quot;justifyContentCenterLeft&quot;);
+    checkValues(justifyContentCenterLeft, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;normal&quot;);
+}, &quot;Test setting invalid values to justify-content through CSS.&quot;);
</ins><span class="cx"> 
</span><del>-var justifyContentBaseline = document.getElementById(&quot;justifyContentBaseline&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentBaseline, '').getPropertyValue('justify-content')&quot;, &quot;baseline&quot;);
</del><ins>+test(function() {
+    element = document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
+    checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;&quot;, &quot;normal&quot;);
+}, &quot;Test initial value of justify-content through JS&quot;);
</ins><span class="cx"> 
</span><del>-var justifyContentLastBaseline = document.getElementById(&quot;justifyContentLastBaseline&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentLastBaseline, '').getPropertyValue('justify-content')&quot;, &quot;last-baseline&quot;);
</del><ins>+test(function() {
+    element = document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
+    element.style.justifyContent = &quot;center&quot;;
+    checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;center&quot;, &quot;center&quot;);
</ins><span class="cx"> 
</span><del>-var justifyContentSpaceBetween = document.getElementById(&quot;justifyContentSpaceBetween&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceBetween, '').getPropertyValue('justify-content')&quot;, &quot;space-between&quot;);
</del><ins>+    element.style.justifyContent = &quot;unsafe start&quot;;
+    checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;start unsafe&quot;, &quot;start unsafe&quot;);
</ins><span class="cx"> 
</span><del>-var justifyContentSpaceAround = document.getElementById(&quot;justifyContentSpaceAround&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceAround, '').getPropertyValue('justify-content')&quot;, &quot;space-around&quot;);
</del><ins>+    element.style.justifyContent = &quot;flex-end safe&quot;;
+    checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;flex-end safe&quot;, &quot;flex-end safe&quot;);
</ins><span class="cx"> 
</span><del>-var justifyContentSpaceEvenly = document.getElementById(&quot;justifyContentSpaceEvenly&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceEvenly, '').getPropertyValue('justify-content')&quot;, &quot;space-evenly&quot;);
</del><ins>+    element.style.justifyContent = &quot;space-between right safe&quot;;
+    checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;space-between right safe&quot;, &quot;space-between right safe&quot;);
</ins><span class="cx"> 
</span><del>-var justifyContentStretch = document.getElementById(&quot;justifyContentStretch&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentStretch, '').getPropertyValue('justify-content')&quot;, &quot;stretch&quot;);
</del><ins>+    element.style.justifyContent = &quot;center stretch&quot;;
+    checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;stretch center&quot;, &quot;stretch center&quot;);
</ins><span class="cx"> 
</span><del>-var justifyContentStart = document.getElementById(&quot;justifyContentStart&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentStart, '').getPropertyValue('justify-content')&quot;, &quot;start&quot;);
</del><ins>+    element.style.justifyContent = &quot;right unsafe&quot;;
+    checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;right unsafe&quot;, &quot;right unsafe&quot;);
</ins><span class="cx"> 
</span><del>-var justifyContentEnd = document.getElementById(&quot;justifyContentEnd&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentEnd, '').getPropertyValue('justify-content')&quot;, &quot;end&quot;);
</del><ins>+    element.style.justifyContent = &quot;first baseline&quot;;
+    checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;first baseline&quot;, &quot;baseline&quot;);
</ins><span class="cx"> 
</span><del>-var justifyContentCenter = document.getElementById(&quot;justifyContentCenter&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentCenter, '').getPropertyValue('justify-content')&quot;, &quot;center&quot;);
</del><ins>+    element.style.justifyContent = &quot;last baseline&quot;;
+    checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;last baseline&quot;, &quot;last baseline&quot;);
</ins><span class="cx"> 
</span><del>-var justifyContentLeft = document.getElementById(&quot;justifyContentLeft&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentLeft, '').getPropertyValue('justify-content')&quot;, &quot;left&quot;);
</del><ins>+    element.style.justifyContent = &quot;normal&quot;;
+    checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;normal&quot;, &quot;normal&quot;);
</ins><span class="cx"> 
</span><del>-var justifyContentRight = document.getElementById(&quot;justifyContentRight&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentRight, '').getPropertyValue('justify-content')&quot;, &quot;right&quot;);
</del><ins>+    element.style.display = &quot;flex&quot;;
+    element.style.justifyContent = &quot;normal&quot;;
+    checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;normal&quot;, &quot;normal&quot;);
</ins><span class="cx"> 
</span><del>-var justifyContentFlexStart = document.getElementById(&quot;justifyContentFlexStart&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentFlexStart, '').getPropertyValue('justify-content')&quot;, &quot;flex-start&quot;);
</del><ins>+    element.style.display = &quot;grid&quot;;
+    element.style.justifyContent = &quot;normal&quot;;
+    checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;normal&quot;, &quot;normal&quot;);
</ins><span class="cx"> 
</span><del>-var justifyContentFlexEnd = document.getElementById(&quot;justifyContentFlexEnd&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentFlexEnd, '').getPropertyValue('justify-content')&quot;, &quot;flex-end&quot;);
</del><ins>+    element.style.justifyContent = &quot;flex-end&quot;;
+    checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;flex-end&quot;, &quot;flex-end&quot;);
+}, &quot;Test getting and setting justify-content through JS&quot;);
</ins><span class="cx"> 
</span><del>-var justifyContentEndUnsafe = document.getElementById(&quot;justifyContentEndUnsafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentEndUnsafe, '').getPropertyValue('justify-content')&quot;, &quot;end unsafe&quot;);
</del><ins>+test(function() {
+    element = document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
</ins><span class="cx"> 
</span><del>-var justifyContentCenterUnsafe = document.getElementById(&quot;justifyContentCenterUnsafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentCenterUnsafe, '').getPropertyValue('justify-content')&quot;, &quot;center unsafe&quot;);
</del><ins>+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;auto&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;unsafe auto&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;auto safe&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;auto left&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;baseline safe&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;last-baseline center&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;unsafe unsafe&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;unsafe safe&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;center start&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;baseline safe&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;unsafe baseline&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;unsafe safe left&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;unsafe left safe&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;left safe unsafe safe&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;start right space-between&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;safe stretch&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;normal space-between&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;stretch normal&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;normal safe&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;space-around stretch&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;end space-between start&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;right safe left&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;unsafe&quot;);
+    checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;safe&quot;);
+}, &quot;Test bad combinations of justify-content&quot;);
</ins><span class="cx"> 
</span><del>-var justifyContentRightSafe = document.getElementById(&quot;justifyContentRightSafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentRightSafe, '').getPropertyValue('justify-content')&quot;, &quot;right safe&quot;);
</del><ins>+test(function() {
+    element.style.display = &quot;&quot;;
+    checkInitialValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;center&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial'&quot;);
</ins><span class="cx"> 
</span><del>-var justifyContentLeftUnsafe = document.getElementById(&quot;justifyContentLeftUnsafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentLeftUnsafe, '').getPropertyValue('justify-content')&quot;, &quot;left unsafe&quot;);
</del><ins>+test(function() {
+    element.style.display = &quot;grid&quot;;
+    checkInitialValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;left safe&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial' for grid containers&quot;);
</ins><span class="cx"> 
</span><del>-var justifyContentFlexStartUnsafe = document.getElementById(&quot;justifyContentFlexStartUnsafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentFlexStartUnsafe, '').getPropertyValue('justify-content')&quot;, &quot;flex-start unsafe&quot;);
</del><ins>+test(function() {
+    element.style.display = &quot;flex&quot;;
+    checkInitialValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;right unsafe&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial' for flex containers&quot;);
</ins><span class="cx"> 
</span><del>-var justifyContentFlexEndSafe = document.getElementById(&quot;justifyContentFlexEndSafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentFlexEndSafe, '').getPropertyValue('justify-content')&quot;, &quot;flex-end safe&quot;);
</del><ins>+test(function() {
+    checkInheritValues(&quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;end&quot;);
+    checkInheritValues(&quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;left safe&quot;);
+    checkInheritValues(&quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;center unsafe&quot;);
+}, &quot;Test the value 'inherit'&quot;);
</ins><span class="cx"> 
</span><del>-var justifyContentSpaceBetweenLeft = document.getElementById(&quot;justifyContentSpaceBetweenLeft&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceBetweenLeft, '').getPropertyValue('justify-content')&quot;, &quot;space-between left&quot;);
-
-var justifyContentSpaceAroundCenter = document.getElementById(&quot;justifyContentSpaceAroundCenter&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceAroundCenter, '').getPropertyValue('justify-content')&quot;, &quot;space-around center&quot;);
-
-var justifyContentSpaceEvenlyRight = document.getElementById(&quot;justifyContentSpaceEvenlyRight&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceEvenlyRight, '').getPropertyValue('justify-content')&quot;, &quot;space-evenly right&quot;);
-
-var justifyContentStretchStartSafe = document.getElementById(&quot;justifyContentStretchStartSafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentStretchStartSafe, '').getPropertyValue('justify-content')&quot;, &quot;stretch start safe&quot;);
-
-var justifyContentSpaceAroundEndUnsafe = document.getElementById(&quot;justifyContentSpaceAroundEndUnsafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceAroundEndUnsafe, '').getPropertyValue('justify-content')&quot;, &quot;space-around end unsafe&quot;);
-
-var justifyContentSpaceEvenlyFlexStartSafe = document.getElementById(&quot;justifyContentSpaceEvenlyFlexStartSafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceEvenlyFlexStartSafe, '').getPropertyValue('justify-content')&quot;, &quot;space-evenly flex-start safe&quot;);
-
-var justifyContentSpaceBetweenSafe = document.getElementById(&quot;justifyContentSpaceBetweenSafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceBetweenSafe, '').getPropertyValue('justify-content')&quot;, &quot;normal&quot;);
-
-var justifyContentSpaceAroundUnsafe = document.getElementById(&quot;justifyContentSpaceBetweenStretch&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceBetweenStretch, '').getPropertyValue('justify-content')&quot;, &quot;normal&quot;);
-
-var justifyContentSpaceAroundUnsafe = document.getElementById(&quot;justifyContentSafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentSafe, '').getPropertyValue('justify-content')&quot;, &quot;normal&quot;);
-
-var justifyContentSpaceAroundUnsafe = document.getElementById(&quot;justifyContentRightSafeUnsafe&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentRightSafeUnsafe, '').getPropertyValue('justify-content')&quot;, &quot;normal&quot;);
-
-var justifyContentSpaceAroundUnsafe = document.getElementById(&quot;justifyContentCenterLeft&quot;);
-shouldBeEqualToString(&quot;getComputedStyle(justifyContentCenterLeft, '').getPropertyValue('justify-content')&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test initial value of justify-content through JS&quot;);
-element = document.createElement(&quot;div&quot;);
-document.body.appendChild(element);
-shouldBeEqualToString(&quot;getComputedStyle(element, '').getPropertyValue('justify-content')&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test getting and setting justify-content through JS&quot;);
-element = document.createElement(&quot;div&quot;);
-document.body.appendChild(element);
-element.style.justifyContent = &quot;center&quot;;
-checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;center&quot;, &quot;center&quot;);
-
-element.style.justifyContent = &quot;unsafe start&quot;;
-checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;start unsafe&quot;, &quot;start unsafe&quot;);
-
-element.style.justifyContent = &quot;flex-end safe&quot;;
-checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;flex-end safe&quot;, &quot;flex-end safe&quot;);
-
-element.style.justifyContent = &quot;space-between right safe&quot;;
-checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;space-between right safe&quot;, &quot;space-between right safe&quot;);
-
-element.style.justifyContent = &quot;center stretch&quot;;
-checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;stretch center&quot;, &quot;stretch center&quot;);
-
-element.style.justifyContent = &quot;right unsafe&quot;;
-checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;right unsafe&quot;, &quot;right unsafe&quot;);
-
-element.style.justifyContent = &quot;normal&quot;;
-checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;normal&quot;, &quot;normal&quot;);
-
-element.style.display = &quot;-webkit-flex&quot;;
-element.style.justifyContent = &quot;normal&quot;;
-checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;normal&quot;, &quot;normal&quot;);
-
-element.style.display = &quot;grid&quot;;
-element.style.justifyContent = &quot;normal&quot;;
-checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;normal&quot;, &quot;normal&quot;);
-
-element.style.justifyContent = &quot;flex-end&quot;;
-checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;flex-end&quot;, &quot;flex-end&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test bad combinations of justify-content&quot;);
-element = document.createElement(&quot;div&quot;);
-document.body.appendChild(element);
-
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;auto&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;unsafe auto&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;auto safe&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;auto left&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;baseline safe&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;last baseline center&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;unsafe unsafe&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;unsafe safe&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;center start&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;baseline safe&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;unsafe baseline&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;unsafe safe left&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;unsafe left safe&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;left safe unsafe safe&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;start right space-between&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;safe stretch&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;space-around stretch&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;end space-between start&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;right safe left&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;unsafe&quot;);
-checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;safe&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial'&quot;);
-element.style.display = &quot;&quot;;
-checkInitialValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;stretch center&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial' for grid containers&quot;);
-element.style.display = &quot;grid&quot;;
-checkInitialValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;space-between left&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial' for flex containers&quot;);
-element.style.display = &quot;-webkit-flex&quot;;
-checkInitialValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;right unsafe&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'inherit'&quot;);
-checkInheritValues(&quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;end&quot;);
-checkInheritValues(&quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;left safe&quot;);
-checkInheritValues(&quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;stretch center&quot;);
-
</del><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (214623 => 214624)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-03-30 21:13:21 UTC (rev 214623)
+++ trunk/Source/WebCore/ChangeLog        2017-03-30 21:27:09 UTC (rev 214624)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2017-03-30  Javier Fernandez  &lt;jfernandez@igalia.com&gt;
+
+        [css-align] Adapt content-alignment properties to the new baseline syntax
+        https://bugs.webkit.org/show_bug.cgi?id=170262
+
+        Reviewed by David Hyatt.
+
+        The baseline-position syntax has changed recently, so we need to update
+        the CSS properties using the old syntax. This patch address only the
+        content-alignment (align-content and justify-content).
+
+        I used this patch to adapt the implementation of the parsing logic for
+        these properties to the new Blink's CSS Parsing Design.
+
+        The new baseline syntax is &quot;[first | last ]? baseline&quot; which implies
+        modifying the parsing and computed value logic.
+
+        There are several layout tests affected by this change, so I'll update
+        them accordingly.
+
+        No new tests, just added/modified some cases to the tests we
+        already have using the new baseline values.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
+        * css/CSSContentDistributionValue.cpp:
+        (WebCore::CSSContentDistributionValue::customCSSText):
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::operator ItemPosition):
+        (WebCore::CSSPrimitiveValue::operator ContentPosition):
+        * css/CSSValueKeywords.in:
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::isBaselineKeyword):
+        (WebCore::consumeBaselineKeyword):
+        (WebCore::consumeContentDistributionOverflowPosition):
+        (WebCore::consumeSelfPositionOverflowPosition):
+
</ins><span class="cx"> 2017-03-30  James Craig  &lt;jcraig@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         AX: Expose a new AXSubrole for explicit ARIA &quot;group&quot; role
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (214623 => 214624)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2017-03-30 21:13:21 UTC (rev 214623)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2017-03-30 21:27:09 UTC (rev 214624)
</span><span class="lines">@@ -2479,16 +2479,29 @@
</span><span class="cx"> {
</span><span class="cx">     auto&amp; cssValuePool = CSSValuePool::singleton();
</span><span class="cx">     auto result = CSSValueList::createSpaceSeparated();
</span><ins>+    // Handle content-distribution values
</ins><span class="cx">     if (data.distribution() != ContentDistributionDefault)
</span><span class="cx">         result-&gt;append(cssValuePool.createValue(data.distribution()));
</span><del>-    if (data.distribution() == ContentDistributionDefault || data.position() != ContentPositionNormal) {
-        bool gridEnabled = false;
-        gridEnabled = RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled();
-        if (data.position() != ContentPositionNormal || gridEnabled)
-            result-&gt;append(cssValuePool.createValue(data.position()));
-        else
-            result-&gt;append(cssValuePool.createIdentifierValue(normalBehaviorValueID));
</del><ins>+
+    bool gridEnabled = false;
+    gridEnabled = RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled();
+
+    // Handle content-position values (either as fallback or actual value)
+    switch (data.position()) {
+    case ContentPositionNormal:
+        // Handle 'normal' value, not valid as content-distribution fallback.
+        if (data.distribution() == ContentDistributionDefault)
+            result-&gt;append(cssValuePool.createIdentifierValue(gridEnabled ? CSSValueNormal : normalBehaviorValueID));
+        break;
+    case ContentPositionLastBaseline:
+        result-&gt;append(cssValuePool.createIdentifierValue(CSSValueLast));
+        result-&gt;append(cssValuePool.createIdentifierValue(CSSValueBaseline));
+        break;
+    default:
+        result-&gt;append(cssValuePool.createValue(data.position()));
</ins><span class="cx">     }
</span><ins>+
+    // Handle overflow-alignment (only allowed for content-position values)
</ins><span class="cx">     if ((data.position() &gt;= ContentPositionCenter || data.distribution() != ContentDistributionDefault) &amp;&amp; data.overflow() != OverflowAlignmentDefault)
</span><span class="cx">         result-&gt;append(cssValuePool.createValue(data.overflow()));
</span><span class="cx">     ASSERT(result-&gt;length() &gt; 0);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSContentDistributionValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSContentDistributionValue.cpp (214623 => 214624)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSContentDistributionValue.cpp        2017-03-30 21:13:21 UTC (rev 214623)
+++ trunk/Source/WebCore/css/CSSContentDistributionValue.cpp        2017-03-30 21:27:09 UTC (rev 214624)
</span><span class="lines">@@ -45,11 +45,18 @@
</span><span class="cx"> 
</span><span class="cx"> String CSSContentDistributionValue::customCSSText() const
</span><span class="cx"> {
</span><ins>+    auto&amp; cssValuePool = CSSValuePool::singleton();
</ins><span class="cx">     auto list = CSSValueList::createSpaceSeparated();
</span><span class="cx">     if (m_distribution != CSSValueInvalid)
</span><span class="cx">         list-&gt;append(distribution());
</span><del>-    if (m_position != CSSValueInvalid)
-        list-&gt;append(position());
</del><ins>+    if (m_position != CSSValueInvalid) {
+        if (m_position == CSSValueFirstBaseline || m_position == CSSValueLastBaseline) {
+            CSSValueID preference = m_position == CSSValueFirstBaseline ? CSSValueFirst : CSSValueLast;
+            list-&gt;append(cssValuePool.createIdentifierValue(preference));
+            list-&gt;append(cssValuePool.createIdentifierValue(CSSValueBaseline));
+        } else
+            list-&gt;append(position());
+    }
</ins><span class="cx">     if (m_overflow != CSSValueInvalid)
</span><span class="cx">         list-&gt;append(overflow());
</span><span class="cx">     return list-&gt;customCSSText();
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValueMappingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (214623 => 214624)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2017-03-30 21:13:21 UTC (rev 214623)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2017-03-30 21:27:09 UTC (rev 214624)
</span><span class="lines">@@ -5024,6 +5024,8 @@
</span><span class="cx">         return ItemPositionStretch;
</span><span class="cx">     case CSSValueBaseline:
</span><span class="cx">         return ItemPositionBaseline;
</span><ins>+    case CSSValueFirstBaseline:
+        return ItemPositionBaseline;
</ins><span class="cx">     case CSSValueLastBaseline:
</span><span class="cx">         return ItemPositionLastBaseline;
</span><span class="cx">     case CSSValueCenter:
</span><span class="lines">@@ -5127,6 +5129,8 @@
</span><span class="cx">         return ContentPositionNormal;
</span><span class="cx">     case CSSValueBaseline:
</span><span class="cx">         return ContentPositionBaseline;
</span><ins>+    case CSSValueFirstBaseline:
+        return ContentPositionBaseline;
</ins><span class="cx">     case CSSValueLastBaseline:
</span><span class="cx">         return ContentPositionLastBaseline;
</span><span class="cx">     case CSSValueCenter:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueKeywordsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (214623 => 214624)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueKeywords.in        2017-03-30 21:13:21 UTC (rev 214623)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in        2017-03-30 21:27:09 UTC (rev 214624)
</span><span class="lines">@@ -588,6 +588,7 @@
</span><span class="cx"> // flex-end
</span><span class="cx"> // center
</span><span class="cx"> // baseline
</span><ins>+first-baseline
</ins><span class="cx"> last-baseline
</span><span class="cx"> // stretch
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSPropertyParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (214623 => 214624)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2017-03-30 21:13:21 UTC (rev 214623)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2017-03-30 21:27:09 UTC (rev 214624)
</span><span class="lines">@@ -2619,11 +2619,46 @@
</span><span class="cx">     return list;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static bool isBaselineKeyword(CSSValueID id)
+{
+    return identMatches&lt;CSSValueFirst, CSSValueLast, CSSValueBaseline&gt;(id);
+}
+
+static RefPtr&lt;CSSValue&gt; consumeBaselineKeyword(CSSParserTokenRange&amp; range)
+{
+    CSSValueID id = range.peek().id();
+    if (identMatches&lt;CSSValueBaseline&gt;(id))
+        return consumeIdent(range);
+
+    if (RefPtr&lt;CSSPrimitiveValue&gt; preference = consumeIdent&lt;CSSValueFirst, CSSValueLast&gt;(range)) {
+        if (range.peek().id() == CSSValueBaseline)
+            return createPrimitiveValuePair(preference.releaseNonNull(), consumeIdent(range), Pair::IdenticalValueEncoding::Coalesce);
+    }
+    return nullptr;
+}
+
+
</ins><span class="cx"> static RefPtr&lt;CSSValue&gt; consumeContentDistributionOverflowPosition(CSSParserTokenRange&amp; range)
</span><span class="cx"> {
</span><del>-    if (identMatches&lt;CSSValueNormal, CSSValueBaseline, CSSValueLastBaseline&gt;(range.peek().id()))
</del><ins>+    CSSValueID id = range.peek().id();
+    if (identMatches&lt;CSSValueNormal&gt;(id))
</ins><span class="cx">         return CSSContentDistributionValue::create(CSSValueInvalid, range.consumeIncludingWhitespace().id(), CSSValueInvalid);
</span><span class="cx"> 
</span><ins>+    if (isBaselineKeyword(id)) {
+        RefPtr&lt;CSSValue&gt; baseline = consumeBaselineKeyword(range);
+        if (!baseline)
+            return nullptr;
+        CSSValueID baselineID = CSSValueBaseline;
+        auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*baseline);
+        if (auto* pairValue = primitiveValue.pairValue()) {
+            if (pairValue-&gt;first()-&gt;valueID() == CSSValueLast)
+                baselineID = CSSValueLastBaseline;
+            else
+                baselineID = CSSValueFirstBaseline;
+        }
+        return CSSContentDistributionValue::create(CSSValueInvalid, baselineID, CSSValueInvalid);
+    }
+
</ins><span class="cx">     CSSValueID distribution = CSSValueInvalid;
</span><span class="cx">     CSSValueID position = CSSValueInvalid;
</span><span class="cx">     CSSValueID overflow = CSSValueInvalid;
</span><span class="lines">@@ -3017,25 +3052,13 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static RefPtr&lt;CSSValue&gt; consumeBaselineKeyword(CSSParserTokenRange&amp; range)
</del><ins>+static RefPtr&lt;CSSValue&gt; consumeSelfPositionOverflowPosition(CSSParserTokenRange&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     CSSValueID id = range.peek().id();
</span><del>-    if (identMatches&lt;CSSValueBaseline&gt;(id))
</del><ins>+    if (identMatches&lt;CSSValueAuto, CSSValueNormal, CSSValueStretch&gt;(id))
</ins><span class="cx">         return consumeIdent(range);
</span><span class="cx"> 
</span><del>-    if (RefPtr&lt;CSSPrimitiveValue&gt; preference = consumeIdent&lt;CSSValueFirst, CSSValueLast&gt;(range)) {
-        if (range.peek().id() == CSSValueBaseline)
-            return createPrimitiveValuePair(preference.releaseNonNull(), consumeIdent(range), Pair::IdenticalValueEncoding::Coalesce);
-    }
-    return nullptr;
-}
-
-static RefPtr&lt;CSSValue&gt; consumeSelfPositionOverflowPosition(CSSParserTokenRange&amp; range)
-{
-    if (identMatches&lt;CSSValueAuto, CSSValueNormal, CSSValueStretch&gt;(range.peek().id()))
-        return consumeIdent(range);
-
-    if (identMatches&lt;CSSValueFirst, CSSValueLast, CSSValueBaseline&gt;(range.peek().id()))
</del><ins>+    if (isBaselineKeyword(id))
</ins><span class="cx">         return consumeBaselineKeyword(range);
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;CSSPrimitiveValue&gt; overflowPosition = consumeIdent&lt;CSSValueUnsafe, CSSValueSafe&gt;(range);
</span></span></pre>
</div>
</div>

</body>
</html>