<!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>[214564] 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/214564">214564</a></dd>
<dt>Author</dt> <dd>jfernandez@igalia.com</dd>
<dt>Date</dt> <dd>2017-03-29 15:01:11 -0700 (Wed, 29 Mar 2017)</dd>
</dl>

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

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
self-alignment (align-self and justify-self) and default-alignment
(align-items and justify-items).

The content-distribution properties (align-content and justify-content)
will be updated in a follow up patch.

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::valueForItemPositionWithOverflowAlignment):
* css/CSSValueKeywords.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData):
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeBaselineKeyword):
(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-items-expected.txt:
* css3/parse-align-items.html:
* css3/parse-align-self-expected.txt:
* css3/parse-align-self.html:
* css3/resources/alignment-parsing-utils-th.js:
(checkValues):
* fast/css/parse-justify-items-expected.txt:
* fast/css/parse-justify-items.html:
* fast/css/parse-justify-self-expected.txt:
* fast/css/parse-justify-self.html:
* fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js.
(checkValues):
(checkBadValues):
(checkInitialValues):
(checkInheritValues):
(checkLegacyValues):
(checkSupportedValues):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscss3parsealignitemsexpectedtxt">trunk/LayoutTests/css3/parse-align-items-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3parsealignitemshtml">trunk/LayoutTests/css3/parse-align-items.html</a></li>
<li><a href="#trunkLayoutTestscss3parsealignselfexpectedtxt">trunk/LayoutTests/css3/parse-align-self-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3parsealignselfhtml">trunk/LayoutTests/css3/parse-align-self.html</a></li>
<li><a href="#trunkLayoutTestscss3resourcesalignmentparsingutilsthjs">trunk/LayoutTests/css3/resources/alignment-parsing-utils-th.js</a></li>
<li><a href="#trunkLayoutTestsfastcssparsejustifyitemsexpectedtxt">trunk/LayoutTests/fast/css/parse-justify-items-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssparsejustifyitemshtml">trunk/LayoutTests/fast/css/parse-justify-items.html</a></li>
<li><a href="#trunkLayoutTestsfastcssparsejustifyselfexpectedtxt">trunk/LayoutTests/fast/css/parse-justify-self-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssparsejustifyselfhtml">trunk/LayoutTests/fast/css/parse-justify-self.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="#trunkSourceWebCorecssCSSValueKeywordsin">trunk/Source/WebCore/css/CSSValueKeywords.in</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderConverterh">trunk/Source/WebCore/css/StyleBuilderConverter.h</a></li>
<li><a href="#trunkSourceWebCorecssparserCSSPropertyParsercpp">trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcssresourcesalignmentparsingutilsthjs">trunk/LayoutTests/fast/css/resources/alignment-parsing-utils-th.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (214563 => 214564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-03-29 21:58:40 UTC (rev 214563)
+++ trunk/LayoutTests/ChangeLog        2017-03-29 22:01:11 UTC (rev 214564)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2017-03-29  Javier Fernandez  &lt;jfernandez@igalia.com&gt;
+
+        [css-align] Adapt self-alignment properties to the new baseline syntax
+        https://bugs.webkit.org/show_bug.cgi?id=170235
+
+        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-items-expected.txt:
+        * css3/parse-align-items.html:
+        * css3/parse-align-self-expected.txt:
+        * css3/parse-align-self.html:
+        * css3/resources/alignment-parsing-utils-th.js:
+        (checkValues):
+        * fast/css/parse-justify-items-expected.txt:
+        * fast/css/parse-justify-items.html:
+        * fast/css/parse-justify-self-expected.txt:
+        * fast/css/parse-justify-self.html:
+        * fast/css/resources/alignment-parsing-utils-th.js: Copied from LayoutTests/css3/resources/alignment-parsing-utils-th.js.
+        (checkValues):
+        (checkBadValues):
+        (checkInitialValues):
+        (checkInheritValues):
+        (checkLegacyValues):
+        (checkSupportedValues):
+
</ins><span class="cx"> 2017-03-29  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Animated SVG images are not paused in pages loaded in the background
</span></span></pre></div>
<a id="trunkLayoutTestscss3parsealignitemsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/parse-align-items-expected.txt (214563 => 214564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/parse-align-items-expected.txt        2017-03-29 21:58:40 UTC (rev 214563)
+++ trunk/LayoutTests/css3/parse-align-items-expected.txt        2017-03-29 22:01:11 UTC (rev 214564)
</span><span class="lines">@@ -1,139 +1,12 @@
</span><span class="cx"> Test that setting and getting align-items 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-items set through CSS. 
+PASS Test initial value of align-items through JS 
+PASS Test getting and setting align-items through JS 
+PASS Test bad combinations of align-items 
+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-items set through CSS
-PASS getComputedStyle(alignItemsBaseline, '').getPropertyValue('-webkit-align-items') is 'baseline'
-PASS getComputedStyle(alignItemsLastBaseline, '').getPropertyValue('-webkit-align-items') is 'last-baseline'
-PASS getComputedStyle(alignItemsStretch, '').getPropertyValue('-webkit-align-items') is 'stretch'
-PASS getComputedStyle(alignItemsStart, '').getPropertyValue('-webkit-align-items') is 'start'
-PASS getComputedStyle(alignItemsEnd, '').getPropertyValue('-webkit-align-items') is 'end'
-PASS getComputedStyle(alignItemsCenter, '').getPropertyValue('-webkit-align-items') is 'center'
-PASS getComputedStyle(alignItemsSelfEnd, '').getPropertyValue('-webkit-align-items') is 'self-end'
-PASS getComputedStyle(alignItemsSelfStart, '').getPropertyValue('-webkit-align-items') is 'self-start'
-PASS getComputedStyle(alignItemsLeft, '').getPropertyValue('-webkit-align-items') is 'left'
-PASS getComputedStyle(alignItemsRight, '').getPropertyValue('-webkit-align-items') is 'right'
-PASS getComputedStyle(alignItemsFlexStart, '').getPropertyValue('-webkit-align-items') is 'flex-start'
-PASS getComputedStyle(alignItemsFlexEnd, '').getPropertyValue('-webkit-align-items') is 'flex-end'
-PASS getComputedStyle(alignItemsEndUnsafe, '').getPropertyValue('-webkit-align-items') is 'end unsafe'
-PASS getComputedStyle(alignItemsCenterUnsafe, '').getPropertyValue('-webkit-align-items') is 'center unsafe'
-PASS getComputedStyle(alignItemsSelfEndSafe, '').getPropertyValue('-webkit-align-items') is 'self-end safe'
-PASS getComputedStyle(alignItemsSelfStartSafe, '').getPropertyValue('-webkit-align-items') is 'self-start safe'
-PASS getComputedStyle(alignItemsRightSafe, '').getPropertyValue('-webkit-align-items') is 'right safe'
-PASS getComputedStyle(alignItemsLeftUnsafe, '').getPropertyValue('-webkit-align-items') is 'left unsafe'
-PASS getComputedStyle(alignItemsFlexStartUnsafe, '').getPropertyValue('-webkit-align-items') is 'flex-start unsafe'
-PASS getComputedStyle(alignItemsFlexEndSafe, '').getPropertyValue('-webkit-align-items') is 'flex-end safe'
-
-Test initial value of align-items through JS
-PASS getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is 'normal'
-
-Test getting and setting align-items through JS
-PASS element.style.webkitAlignItems is &quot;center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;center&quot;
-PASS element.style.webkitAlignItems is &quot;start unsafe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;start unsafe&quot;
-PASS element.style.webkitAlignItems is &quot;flex-end safe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;flex-end safe&quot;
-PASS element.style.webkitAlignItems is &quot;right&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;right&quot;
-PASS element.style.webkitAlignItems is &quot;center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;center&quot;
-PASS element.style.webkitAlignItems is &quot;self-start&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;self-start&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;self-end&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;self-end&quot;
-
-Test bad combinations of align-items
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-PASS element.style.webkitAlignItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-
-Test the value 'initial'
-PASS element.style.webkitAlignItems is &quot;center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;center&quot;
-PASS element.style.webkitAlignItems is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-
-Test the value 'initial' for grid containers
-PASS element.style.webkitAlignItems is &quot;left safe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;left safe&quot;
-PASS element.style.webkitAlignItems is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-
-Test the value 'initial' for flex containers
-PASS element.style.webkitAlignItems is &quot;right unsafe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;right unsafe&quot;
-PASS element.style.webkitAlignItems is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;normal&quot;
-
-Test the value 'inherit'
-PASS element.style.webkitAlignItems is &quot;end&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;end&quot;
-PASS element.style.webkitAlignItems is &quot;inherit&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;end&quot;
-PASS element.style.webkitAlignItems is &quot;left safe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;left safe&quot;
-PASS element.style.webkitAlignItems is &quot;inherit&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;left safe&quot;
-PASS element.style.webkitAlignItems is &quot;center unsafe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;center unsafe&quot;
-PASS element.style.webkitAlignItems is &quot;inherit&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is &quot;center unsafe&quot;
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestscss3parsealignitemshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/parse-align-items.html (214563 => 214564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/parse-align-items.html        2017-03-29 21:58:40 UTC (rev 214563)
+++ trunk/LayoutTests/css3/parse-align-items.html        2017-03-29 22:01:11 UTC (rev 214564)
</span><span class="lines">@@ -1,92 +1,92 @@
</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"> #alignItemsBaseline {
</span><del>-    -webkit-align-items: baseline;
</del><ins>+    align-items: baseline;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#alignItemsFirstBaseline {
+    align-items: first baseline;
+}
+
</ins><span class="cx"> #alignItemsLastBaseline {
</span><del>-    -webkit-align-items: last-baseline;
</del><ins>+    align-items: last baseline;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignItemsStretch {
</span><del>-    -webkit-align-items: stretch;
</del><ins>+    align-items: stretch;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignItemsStart {
</span><del>-    -webkit-align-items: start;
</del><ins>+    align-items: start;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignItemsEnd {
</span><del>-    -webkit-align-items: end;
</del><ins>+    align-items: end;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignItemsCenter {
</span><del>-    -webkit-align-items: center;
</del><ins>+    align-items: center;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignItemsSelfStart {
</span><del>-    -webkit-align-items: self-start;
</del><ins>+    align-items: self-start;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignItemsSelfEnd {
</span><del>-    -webkit-align-items: self-end;
</del><ins>+    align-items: self-end;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignItemsLeft {
</span><del>-    -webkit-align-items: left;
</del><ins>+    align-items: left;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignItemsRight {
</span><del>-    -webkit-align-items: right;
</del><ins>+    align-items: right;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignItemsFlexStart {
</span><del>-    -webkit-align-items: flex-start;
</del><ins>+    align-items: flex-start;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignItemsFlexEnd {
</span><del>-    -webkit-align-items: flex-end;
</del><ins>+    align-items: flex-end;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignItemsEndUnsafe {
</span><del>-    -webkit-align-items: end unsafe;
</del><ins>+    align-items: end unsafe;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignItemsCenterUnsafe {
</span><del>-    -webkit-align-items: center unsafe;
</del><ins>+    align-items: center unsafe;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignItemsSelfEndSafe {
</span><del>-    -webkit-align-items: self-end safe;
</del><ins>+    align-items: self-end safe;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignItemsSelfStartSafe {
</span><del>-    -webkit-align-items: self-start safe;
</del><ins>+    align-items: self-start safe;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignItemsRightSafe {
</span><del>-    -webkit-align-items: right safe;
</del><ins>+    align-items: right safe;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignItemsLeftUnsafe {
</span><del>-    -webkit-align-items: left unsafe;
</del><ins>+    align-items: left unsafe;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignItemsFlexStartUnsafe {
</span><del>-    -webkit-align-items: flex-start unsafe;
</del><ins>+    align-items: flex-start unsafe;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignItemsFlexEndSafe {
</span><del>-    -webkit-align-items: flex-end safe;
</del><ins>+    align-items: flex-end safe;
</ins><span class="cx"> }
</span><del>-
</del><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-items works as expected&lt;/p&gt;
</ins><span class="cx"> &lt;div id=&quot;alignItemsBaseline&quot;&gt;&lt;/div&gt;
</span><ins>+&lt;div id=&quot;alignItemsFirstBaseline&quot;&gt;&lt;/div&gt;
</ins><span class="cx"> &lt;div id=&quot;alignItemsLastBaseline&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;alignItemsStretch&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;alignItemsStart&quot;&gt;&lt;/div&gt;
</span><span class="lines">@@ -107,167 +107,153 @@
</span><span class="cx"> &lt;div id=&quot;alignItemsLeftUnsafe&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;alignItemsFlexStartUnsafe&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;alignItemsFlexEndSafe&quot;&gt;&lt;/div&gt;
</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-items works as expected');
</del><ins>+test(function() {
+    var alignItemsBaseline = document.getElementById(&quot;alignItemsBaseline&quot;);
+    checkValues(alignItemsBaseline, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;baseline&quot;);
+    var alignItemsFirstBaseline = document.getElementById(&quot;alignItemsFirstBaseline&quot;);
+    checkValues(alignItemsFirstBaseline, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;baseline&quot;);
+    var alignItemsLastBaseline = document.getElementById(&quot;alignItemsLastBaseline&quot;);
+    checkValues(alignItemsLastBaseline, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;last baseline&quot;);
+    var alignItemsStretch = document.getElementById(&quot;alignItemsStretch&quot;);
+    checkValues(alignItemsStretch, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;stretch&quot;);
+    var alignItemsStart = document.getElementById(&quot;alignItemsStart&quot;);
+    checkValues(alignItemsStart, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;start&quot;);
+    var alignItemsEnd = document.getElementById(&quot;alignItemsEnd&quot;);
+    checkValues(alignItemsEnd, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;end&quot;);
+    var alignItemsCenter = document.getElementById(&quot;alignItemsCenter&quot;);
+    checkValues(alignItemsCenter, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;center&quot;);
+    var alignItemsSelfEnd = document.getElementById(&quot;alignItemsSelfEnd&quot;);
+    checkValues(alignItemsSelfEnd, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;self-end&quot;);
+    var alignItemsSelfStart = document.getElementById(&quot;alignItemsSelfStart&quot;);
+    checkValues(alignItemsSelfStart, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;self-start&quot;);
+    var alignItemsLeft = document.getElementById(&quot;alignItemsLeft&quot;);
+    checkValues(alignItemsLeft, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;left&quot;);
+    var alignItemsRight = document.getElementById(&quot;alignItemsRight&quot;);
+    checkValues(alignItemsRight, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;right&quot;);
+    var alignItemsFlexStart = document.getElementById(&quot;alignItemsFlexStart&quot;);
+    checkValues(alignItemsFlexStart, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;flex-start&quot;);
+    var alignItemsFlexEnd = document.getElementById(&quot;alignItemsFlexEnd&quot;);
+    checkValues(alignItemsFlexEnd, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;flex-end&quot;);
</ins><span class="cx"> 
</span><del>-debug(&quot;Test getting align-items set through CSS&quot;);
-var alignItemsBaseline = document.getElementById(&quot;alignItemsBaseline&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsBaseline, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'baseline'&quot;);
</del><ins>+    var alignItemsEndUnsafe = document.getElementById(&quot;alignItemsEndUnsafe&quot;);
+    checkValues(alignItemsEndUnsafe, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;end unsafe&quot;);
+    var alignItemsCenterUnsafe = document.getElementById(&quot;alignItemsCenterUnsafe&quot;);
+    checkValues(alignItemsCenterUnsafe, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;center unsafe&quot;);
+    var alignItemsSelfEndSafe = document.getElementById(&quot;alignItemsSelfEndSafe&quot;);
+    checkValues(alignItemsSelfEndSafe, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;self-end safe&quot;);
+    var alignItemsSelfStartSafe = document.getElementById(&quot;alignItemsSelfStartSafe&quot;);
+    checkValues(alignItemsSelfStartSafe, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;self-start safe&quot;);
+    var alignItemsRightSafe = document.getElementById(&quot;alignItemsRightSafe&quot;);
+    checkValues(alignItemsRightSafe, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;right safe&quot;);
+    var alignItemsLeftUnsafe = document.getElementById(&quot;alignItemsLeftUnsafe&quot;);
+    checkValues(alignItemsLeftUnsafe, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;left unsafe&quot;);
+    var alignItemsFlexStartUnsafe = document.getElementById(&quot;alignItemsFlexStartUnsafe&quot;);
+    checkValues(alignItemsFlexStartUnsafe, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;flex-start unsafe&quot;);
+    var alignItemsFlexEndSafe = document.getElementById(&quot;alignItemsFlexEndSafe&quot;);
+    checkValues(alignItemsFlexEndSafe, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;flex-end safe&quot;);
+}, &quot;Test getting align-items set through CSS.&quot;);
</ins><span class="cx"> 
</span><del>-var alignItemsLastBaseline = document.getElementById(&quot;alignItemsLastBaseline&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsLastBaseline, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'last-baseline'&quot;);
</del><ins>+test(function() {
+    element = document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
+    checkValues(element, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;&quot;, &quot;normal&quot;);
+}, &quot;Test initial value of align-items through JS&quot;);
</ins><span class="cx"> 
</span><del>-var alignItemsStretch = document.getElementById(&quot;alignItemsStretch&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsStretch, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'stretch'&quot;);
</del><ins>+test(function() {
+    element = document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
+    element.style.alignItems = &quot;center&quot;;
+    checkValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;center&quot;, &quot;center&quot;);
</ins><span class="cx"> 
</span><del>-var alignItemsStart = document.getElementById(&quot;alignItemsStart&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsStart, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'start'&quot;);
</del><ins>+    element.style.alignItems = &quot;unsafe start&quot;;
+    checkValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;start unsafe&quot;, &quot;start unsafe&quot;);
</ins><span class="cx"> 
</span><del>-var alignItemsEnd = document.getElementById(&quot;alignItemsEnd&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsEnd, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'end'&quot;);
</del><ins>+    element.style.alignItems = &quot;flex-end safe&quot;;
+    checkValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;flex-end safe&quot;, &quot;flex-end safe&quot;);
</ins><span class="cx"> 
</span><del>-var alignItemsCenter = document.getElementById(&quot;alignItemsCenter&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsCenter, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'center'&quot;);
</del><ins>+    element.style.alignItems = &quot;right&quot;;
+    checkValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;right&quot;, &quot;right&quot;);
</ins><span class="cx"> 
</span><del>-var alignItemsSelfEnd = document.getElementById(&quot;alignItemsSelfEnd&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsSelfEnd, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'self-end'&quot;);
</del><ins>+    element.style.alignItems = &quot;center&quot;;
+    checkValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;center&quot;, &quot;center&quot;);
</ins><span class="cx"> 
</span><del>-var alignItemsSelfStart = document.getElementById(&quot;alignItemsSelfStart&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsSelfStart, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'self-start'&quot;);
</del><ins>+    element.style.alignItems = &quot;self-start&quot;;
+    checkValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;self-start&quot;, &quot;self-start&quot;);
</ins><span class="cx"> 
</span><del>-var alignItemsLeft = document.getElementById(&quot;alignItemsLeft&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsLeft, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'left'&quot;);
</del><ins>+    // The 'auto' value is not valid for the align-items property.
+    element.style.alignItems = &quot;&quot;;
+    element.style.alignItems = &quot;auto&quot;;
+    checkValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;&quot;, &quot;normal&quot;);
</ins><span class="cx"> 
</span><del>-var alignItemsRight = document.getElementById(&quot;alignItemsRight&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsRight, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'right'&quot;);
</del><ins>+    element.style.display = &quot;flex&quot;;
+    element.style.alignItems = &quot;auto&quot;;
+    checkValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;&quot;, &quot;normal&quot;);
</ins><span class="cx"> 
</span><del>-var alignItemsFlexStart = document.getElementById(&quot;alignItemsFlexStart&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsFlexStart, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'flex-start'&quot;);
</del><ins>+    element.style.display = &quot;grid&quot;;
+    element.style.alignItems = &quot;auto&quot;;
+    checkValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;&quot;, &quot;normal&quot;);
</ins><span class="cx"> 
</span><del>-var alignItemsFlexEnd = document.getElementById(&quot;alignItemsFlexEnd&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsFlexEnd, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'flex-end'&quot;);
</del><ins>+    element.style.alignItems = &quot;self-end&quot;;
+    checkValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;self-end&quot;, &quot;self-end&quot;);
+}, &quot;Test getting and setting align-items through JS&quot;);
</ins><span class="cx"> 
</span><del>-var alignItemsEndUnsafe = document.getElementById(&quot;alignItemsEndUnsafe&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsEndUnsafe, '').getPropertyValue('-webkit-align-items')&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 alignItemsCenterUnsafe = document.getElementById(&quot;alignItemsCenterUnsafe&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsCenterUnsafe, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'center unsafe'&quot;);
</del><ins>+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;auto&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;unsafe auto&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;auto safe&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;auto left&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;baseline safe&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;baseline center&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;first baseline center&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;last baseline center&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;baseline last&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;baseline first&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;stretch unsafe&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;stretch right&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;unsafe unsafe&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;unsafe safe&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;center start&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;stretch unsafe&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;safe stretch&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;baseline safe&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;unsafe baseline&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;unsafe safe left&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;unsafe left safe&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;left safe unsafe safe&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;legacy start&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;legacy end&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;legacy right unsafe&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;legacy auto&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;legacy stretch&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;legacy&quot;);
+    checkBadValues(element, &quot;alignItems&quot;, &quot;align-items&quot;,  &quot;legacy left right&quot;);
+}, &quot;Test bad combinations of align-items&quot;);
</ins><span class="cx"> 
</span><del>-var alignItemsSelfEndSafe = document.getElementById(&quot;alignItemsSelfEndSafe&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsSelfEndSafe, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'self-end safe'&quot;);
</del><ins>+test(function() {
+    element.style.display = &quot;&quot;;
+    checkInitialValues(element, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;center&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial'&quot;);
</ins><span class="cx"> 
</span><del>-var alignItemsSelfStartSafe = document.getElementById(&quot;alignItemsSelfStartSafe&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsSelfStartSafe, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'self-start safe'&quot;);
</del><ins>+test(function() {
+    element.style.display = &quot;grid&quot;;
+    checkInitialValues(element, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;left safe&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial' for grid containers&quot;);
</ins><span class="cx"> 
</span><del>-var alignItemsRightSafe = document.getElementById(&quot;alignItemsRightSafe&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsRightSafe, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'right safe'&quot;);
</del><ins>+test(function() {
+    element.style.display = &quot;flex&quot;;
+    checkInitialValues(element, &quot;alignItems&quot;, &quot;align-items&quot;, &quot;right unsafe&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial' for flex containers&quot;);
</ins><span class="cx"> 
</span><del>-var alignItemsLeftUnsafe = document.getElementById(&quot;alignItemsLeftUnsafe&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsLeftUnsafe, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'left unsafe'&quot;);
-
-var alignItemsFlexStartUnsafe = document.getElementById(&quot;alignItemsFlexStartUnsafe&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsFlexStartUnsafe, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'flex-start unsafe'&quot;);
-
-var alignItemsFlexEndSafe = document.getElementById(&quot;alignItemsFlexEndSafe&quot;);
-shouldBe(&quot;getComputedStyle(alignItemsFlexEndSafe, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'flex-end safe'&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test initial value of align-items through JS&quot;);
-element = document.createElement(&quot;div&quot;);
-document.body.appendChild(element);
-shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webkit-align-items')&quot;, &quot;'normal'&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test getting and setting align-items through JS&quot;);
-element = document.createElement(&quot;div&quot;);
-document.body.appendChild(element);
-element.style.webkitAlignItems = &quot;center&quot;;
-checkValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;center&quot;, &quot;center&quot;);
-
-element.style.webkitAlignItems = &quot;unsafe start&quot;;
-checkValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;start unsafe&quot;, &quot;start unsafe&quot;);
-
-element.style.webkitAlignItems = &quot;flex-end safe&quot;;
-checkValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;flex-end safe&quot;, &quot;flex-end safe&quot;);
-
-element.style.webkitAlignItems = &quot;right&quot;;
-checkValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;right&quot;, &quot;right&quot;);
-
-element.style.webkitAlignItems = &quot;center&quot;;
-checkValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;center&quot;, &quot;center&quot;);
-
-element.style.webkitAlignItems = &quot;self-start&quot;;
-checkValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;self-start&quot;, &quot;self-start&quot;);
-
-&lt;!-- The 'auto' value is no valid for the align-items property. --&gt;
-element.style.webkitAlignItems = &quot;&quot;;
-element.style.webkitAlignItems = &quot;auto&quot;;
-checkValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;&quot;, &quot;normal&quot;);
-
-element.style.display = &quot;-webkit-flex&quot;;
-element.style.webkitAlignItems = &quot;auto&quot;;
-checkValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;&quot;, &quot;normal&quot;);
-
-element.style.display = &quot;grid&quot;;
-element.style.webkitAlignItems = &quot;auto&quot;;
-checkValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;&quot;, &quot;normal&quot;);
-
-element.style.webkitAlignItems = &quot;self-end&quot;;
-checkValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;self-end&quot;, &quot;self-end&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test bad combinations of align-items&quot;);
-element = document.createElement(&quot;div&quot;);
-document.body.appendChild(element);
-
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;auto&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;unsafe auto&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;auto safe&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;auto left&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;baseline safe&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;baseline center&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;stretch unsafe&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;stretch right&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;unsafe unsafe&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;unsafe safe&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;center start&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;stretch unsafe&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;safe stretch&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;baseline safe&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;unsafe baseline&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;unsafe safe left&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;unsafe left safe&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;left safe unsafe safe&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;legacy start&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;legacy end&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;legacy right unsafe&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;legacy auto&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;legacy stretch&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;legacy&quot;);
-checkBadValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;,  &quot;legacy left right&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial'&quot;);
-element.style.display = &quot;&quot;;
-checkInitialValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;, &quot;center&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial' for grid containers&quot;);
-element.style.display = &quot;-webkit-grid&quot;;
-checkInitialValues(element, &quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;, &quot;left safe&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;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;, &quot;right unsafe&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'inherit'&quot;);
-checkInheritValues(&quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;, &quot;end&quot;);
-checkInheritValues(&quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;, &quot;left safe&quot;);
-checkInheritValues(&quot;webkitAlignItems&quot;, &quot;-webkit-align-items&quot;, &quot;center unsafe&quot;);
-
</del><ins>+test(function() {
+    checkInheritValues(&quot;alignItems&quot;, &quot;align-items&quot;, &quot;end&quot;);
+    checkInheritValues(&quot;alignItems&quot;, &quot;align-items&quot;, &quot;left safe&quot;);
+    checkInheritValues(&quot;alignItems&quot;, &quot;align-items&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="trunkLayoutTestscss3parsealignselfexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/parse-align-self-expected.txt (214563 => 214564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/parse-align-self-expected.txt        2017-03-29 21:58:40 UTC (rev 214563)
+++ trunk/LayoutTests/css3/parse-align-self-expected.txt        2017-03-29 22:01:11 UTC (rev 214564)
</span><span class="lines">@@ -1,159 +1,16 @@
</span><span class="cx"> Test that setting and getting align-self 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-self set through CSS. 
+PASS Test initial value of align-self through JS 
+PASS Test getting and setting align-self through JS 
+PASS Test 'auto' value resolution for the root node 
+PASS Test bad combinations of align-self 
+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 'initial' for positioned elements 
+PASS Test the value 'initial' for positioned elements in grid containers 
+PASS Test the value 'initial' for positioned elements in grid containers 
+PASS Test the value 'inherit' 
</ins><span class="cx"> 
</span><del>-Test getting align-self set through CSS
-PASS getComputedStyle(alignSelfBaseline, '').getPropertyValue('-webkit-align-self') is 'baseline'
-PASS getComputedStyle(alignSelfLastBaseline, '').getPropertyValue('-webkit-align-self') is 'last-baseline'
-PASS getComputedStyle(alignSelfStretch, '').getPropertyValue('-webkit-align-self') is 'stretch'
-PASS getComputedStyle(alignSelfStart, '').getPropertyValue('-webkit-align-self') is 'start'
-PASS getComputedStyle(alignSelfEnd, '').getPropertyValue('-webkit-align-self') is 'end'
-PASS getComputedStyle(alignSelfCenter, '').getPropertyValue('-webkit-align-self') is 'center'
-PASS getComputedStyle(alignSelfSelfEnd, '').getPropertyValue('-webkit-align-self') is 'self-end'
-PASS getComputedStyle(alignSelfSelfStart, '').getPropertyValue('-webkit-align-self') is 'self-start'
-PASS getComputedStyle(alignSelfLeft, '').getPropertyValue('-webkit-align-self') is 'left'
-PASS getComputedStyle(alignSelfRight, '').getPropertyValue('-webkit-align-self') is 'right'
-PASS getComputedStyle(alignSelfFlexStart, '').getPropertyValue('-webkit-align-self') is 'flex-start'
-PASS getComputedStyle(alignSelfFlexEnd, '').getPropertyValue('-webkit-align-self') is 'flex-end'
-PASS getComputedStyle(alignSelfEndUnsafe, '').getPropertyValue('-webkit-align-self') is 'end unsafe'
-PASS getComputedStyle(alignSelfCenterUnsafe, '').getPropertyValue('-webkit-align-self') is 'center unsafe'
-PASS getComputedStyle(alignSelfSelfEndSafe, '').getPropertyValue('-webkit-align-self') is 'self-end safe'
-PASS getComputedStyle(alignSelfSelfStartSafe, '').getPropertyValue('-webkit-align-self') is 'self-start safe'
-PASS getComputedStyle(alignSelfRightSafe, '').getPropertyValue('-webkit-align-self') is 'right safe'
-PASS getComputedStyle(alignSelfLeftUnsafe, '').getPropertyValue('-webkit-align-self') is 'left unsafe'
-PASS getComputedStyle(alignSelfFlexStartUnsafe, '').getPropertyValue('-webkit-align-self') is 'flex-start unsafe'
-PASS getComputedStyle(alignSelfFlexEndSafe, '').getPropertyValue('-webkit-align-self') is 'flex-end safe'
-
-Test initial value of align-self through JS
-PASS getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is 'normal'
-
-Test getting and setting align-self through JS
-PASS element.style.webkitAlignSelf is &quot;center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;center&quot;
-PASS element.style.webkitAlignSelf is &quot;start unsafe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;start unsafe&quot;
-PASS element.style.webkitAlignSelf is &quot;flex-end safe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;flex-end safe&quot;
-PASS element.style.webkitAlignSelf is &quot;right&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;right&quot;
-PASS element.style.webkitAlignSelf is &quot;center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;center&quot;
-PASS element.style.webkitAlignSelf is &quot;self-start&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;self-start&quot;
-PASS element.style.webkitAlignSelf is &quot;auto&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;auto&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;auto&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;self-end&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;self-end&quot;
-
-Test 'auto' value resolution for the root node
-PASS element.style.webkitAlignSelf is &quot;auto&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-
-Test bad combinations of align-self
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-PASS element.style.webkitAlignSelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-
-Test the value 'initial'
-PASS element.style.webkitAlignSelf is &quot;center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;center&quot;
-PASS element.style.webkitAlignSelf is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-
-Test the value 'initial' for grid containers
-PASS element.style.webkitAlignSelf is &quot;left safe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;left safe&quot;
-PASS element.style.webkitAlignSelf is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-
-Test the value 'initial' for flex containers
-PASS element.style.webkitAlignSelf is &quot;right unsafe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;right unsafe&quot;
-PASS element.style.webkitAlignSelf is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-
-Test the value 'initial' for positioned elements
-PASS element.style.webkitAlignSelf is &quot;left&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;left&quot;
-PASS element.style.webkitAlignSelf is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-
-Test the value 'initial' for positioned elements in grid containers
-PASS element.style.webkitAlignSelf is &quot;right&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;right&quot;
-PASS element.style.webkitAlignSelf is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-
-Test the value 'initial' for positioned elements in grid containers
-PASS element.style.webkitAlignSelf is &quot;end&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;end&quot;
-PASS element.style.webkitAlignSelf is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;normal&quot;
-
-Test the value 'inherit'
-PASS element.style.webkitAlignSelf is &quot;end&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;end&quot;
-PASS element.style.webkitAlignSelf is &quot;inherit&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;end&quot;
-PASS element.style.webkitAlignSelf is &quot;left safe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;left safe&quot;
-PASS element.style.webkitAlignSelf is &quot;inherit&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;left safe&quot;
-PASS element.style.webkitAlignSelf is &quot;center unsafe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;center unsafe&quot;
-PASS element.style.webkitAlignSelf is &quot;inherit&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is &quot;center unsafe&quot;
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestscss3parsealignselfhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/parse-align-self.html (214563 => 214564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/parse-align-self.html        2017-03-29 21:58:40 UTC (rev 214563)
+++ trunk/LayoutTests/css3/parse-align-self.html        2017-03-29 22:01:11 UTC (rev 214564)
</span><span class="lines">@@ -1,91 +1,92 @@
</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"> #alignSelfBaseline {
</span><del>-    -webkit-align-self: baseline;
</del><ins>+    align-self: baseline;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#alignSelfFirstBaseline {
+    align-self: first baseline;
+}
+
</ins><span class="cx"> #alignSelfLastBaseline {
</span><del>-    -webkit-align-self: last-baseline;
</del><ins>+    align-self: last baseline;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignSelfStretch {
</span><del>-    -webkit-align-self: stretch;
</del><ins>+    align-self: stretch;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignSelfStart {
</span><del>-    -webkit-align-self: start;
</del><ins>+    align-self: start;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignSelfEnd {
</span><del>-    -webkit-align-self: end;
</del><ins>+    align-self: end;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignSelfCenter {
</span><del>-    -webkit-align-self: center;
</del><ins>+    align-self: center;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignSelfSelfStart {
</span><del>-    -webkit-align-self: self-start;
</del><ins>+    align-self: self-start;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignSelfSelfEnd {
</span><del>-    -webkit-align-self: self-end;
</del><ins>+    align-self: self-end;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignSelfLeft {
</span><del>-    -webkit-align-self: left;
</del><ins>+    align-self: left;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignSelfRight {
</span><del>-    -webkit-align-self: right;
</del><ins>+    align-self: right;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignSelfFlexStart {
</span><del>-    -webkit-align-self: flex-start;
</del><ins>+    align-self: flex-start;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignSelfFlexEnd {
</span><del>-    -webkit-align-self: flex-end;
</del><ins>+    align-self: flex-end;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignSelfEndUnsafe {
</span><del>-    -webkit-align-self: end unsafe;
</del><ins>+    align-self: end unsafe;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignSelfCenterUnsafe {
</span><del>-    -webkit-align-self: center unsafe;
</del><ins>+    align-self: center unsafe;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignSelfSelfEndSafe {
</span><del>-    -webkit-align-self: self-end safe;
-x}
</del><ins>+    align-self: self-end safe;
+}
</ins><span class="cx"> 
</span><span class="cx"> #alignSelfSelfStartSafe {
</span><del>-    -webkit-align-self: self-start safe;
</del><ins>+    align-self: self-start safe;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignSelfRightSafe {
</span><del>-    -webkit-align-self: right safe;
</del><ins>+    align-self: right safe;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignSelfLeftUnsafe {
</span><del>-    -webkit-align-self: left unsafe;
</del><ins>+    align-self: left unsafe;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignSelfFlexStartUnsafe {
</span><del>-    -webkit-align-self: flex-start unsafe;
</del><ins>+    align-self: flex-start unsafe;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #alignSelfFlexEndSafe {
</span><del>-    -webkit-align-self: flex-end safe;
</del><ins>+    align-self: flex-end safe;
</ins><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-self works as expected&lt;/p&gt;
</ins><span class="cx"> &lt;div id=&quot;alignSelfBaseline&quot;&gt;&lt;/div&gt;
</span><ins>+&lt;div id=&quot;alignSelfFirstBaseline&quot;&gt;&lt;/div&gt;
</ins><span class="cx"> &lt;div id=&quot;alignSelfLastBaseline&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;alignSelfStretch&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;alignSelfStart&quot;&gt;&lt;/div&gt;
</span><span class="lines">@@ -106,191 +107,172 @@
</span><span class="cx"> &lt;div id=&quot;alignSelfLeftUnsafe&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;alignSelfFlexStartUnsafe&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;alignSelfFlexEndSafe&quot;&gt;&lt;/div&gt;
</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-self works as expected');
</del><ins>+test(function() {
+    var alignSelfBaseline = document.getElementById(&quot;alignSelfBaseline&quot;);
+    checkValues(alignSelfBaseline, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;baseline&quot;);
+    var alignSelfFirstBaseline = document.getElementById(&quot;alignSelfFirstBaseline&quot;);
+    checkValues(alignSelfFirstBaseline, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;baseline&quot;);
+    var alignSelfLastBaseline = document.getElementById(&quot;alignSelfLastBaseline&quot;);
+    checkValues(alignSelfLastBaseline, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;last baseline&quot;);
+    var alignSelfStretch = document.getElementById(&quot;alignSelfStretch&quot;);
+    checkValues(alignSelfStretch, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;stretch&quot;);
+    var alignSelfStart = document.getElementById(&quot;alignSelfStart&quot;);
+    checkValues(alignSelfStart, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;start&quot;);
+    var alignSelfEnd = document.getElementById(&quot;alignSelfEnd&quot;);
+    checkValues(alignSelfEnd, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;end&quot;);
+    var alignSelfCenter = document.getElementById(&quot;alignSelfCenter&quot;);
+    checkValues(alignSelfCenter, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;center&quot;);
+    var alignSelfSelfEnd = document.getElementById(&quot;alignSelfSelfEnd&quot;);
+    checkValues(alignSelfSelfEnd, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;self-end&quot;);
+    var alignSelfSelfStart = document.getElementById(&quot;alignSelfSelfStart&quot;);
+    checkValues(alignSelfSelfStart, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;self-start&quot;);
+    var alignSelfLeft = document.getElementById(&quot;alignSelfLeft&quot;);
+    checkValues(alignSelfLeft, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;left&quot;);
+    var alignSelfRight = document.getElementById(&quot;alignSelfRight&quot;);
+    checkValues(alignSelfRight, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;right&quot;);
+    var alignSelfFlexStart = document.getElementById(&quot;alignSelfFlexStart&quot;);
+    checkValues(alignSelfFlexStart, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;flex-start&quot;);
+    var alignSelfFlexEnd = document.getElementById(&quot;alignSelfFlexEnd&quot;);
+    checkValues(alignSelfFlexEnd, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;flex-end&quot;);
</ins><span class="cx"> 
</span><del>-debug(&quot;Test getting align-self set through CSS&quot;);
-var alignSelfBaseline = document.getElementById(&quot;alignSelfBaseline&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfBaseline, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'baseline'&quot;);
</del><ins>+    var alignSelfEndUnsafe = document.getElementById(&quot;alignSelfEndUnsafe&quot;);
+    checkValues(alignSelfEndUnsafe, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;end unsafe&quot;);
+    var alignSelfCenterUnsafe = document.getElementById(&quot;alignSelfCenterUnsafe&quot;);
+    checkValues(alignSelfCenterUnsafe, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;center unsafe&quot;);
+    var alignSelfSelfEndSafe = document.getElementById(&quot;alignSelfSelfEndSafe&quot;);
+    checkValues(alignSelfSelfEndSafe, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;self-end safe&quot;);
+    var alignSelfSelfStartSafe = document.getElementById(&quot;alignSelfSelfStartSafe&quot;);
+    checkValues(alignSelfSelfStartSafe, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;self-start safe&quot;);
+    var alignSelfRightSafe = document.getElementById(&quot;alignSelfRightSafe&quot;);
+    checkValues(alignSelfRightSafe, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;right safe&quot;);
+    var alignSelfLeftUnsafe = document.getElementById(&quot;alignSelfLeftUnsafe&quot;);
+    checkValues(alignSelfLeftUnsafe, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;left unsafe&quot;);
+    var alignSelfFlexStartUnsafe = document.getElementById(&quot;alignSelfFlexStartUnsafe&quot;);
+    checkValues(alignSelfFlexStartUnsafe, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;flex-start unsafe&quot;);
+    var alignSelfFlexEndSafe = document.getElementById(&quot;alignSelfFlexEndSafe&quot;);
+    checkValues(alignSelfFlexEndSafe, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;flex-end safe&quot;);
+}, &quot;Test getting align-self set through CSS.&quot;);
</ins><span class="cx"> 
</span><del>-var alignSelfLastBaseline = document.getElementById(&quot;alignSelfLastBaseline&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfLastBaseline, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'last-baseline'&quot;);
</del><ins>+test(function() {
+    element = document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
+    checkValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;&quot;, &quot;normal&quot;);
+}, &quot;Test initial value of align-self through JS&quot;);
</ins><span class="cx"> 
</span><del>-var alignSelfStretch = document.getElementById(&quot;alignSelfStretch&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfStretch, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'stretch'&quot;);
</del><ins>+test(function() {
+    container = document.createElement(&quot;div&quot;);
+    element = document.createElement(&quot;div&quot;);
+    container.appendChild(element);
+    document.body.appendChild(container);
+    element.style.alignSelf = &quot;center&quot;;
+    checkValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;center&quot;, &quot;center&quot;);
</ins><span class="cx"> 
</span><del>-var alignSelfStart = document.getElementById(&quot;alignSelfStart&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfStart, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'start'&quot;);
</del><ins>+    element.style.alignSelf = &quot;unsafe start&quot;;
+    checkValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;start unsafe&quot;, &quot;start unsafe&quot;);
</ins><span class="cx"> 
</span><del>-var alignSelfEnd = document.getElementById(&quot;alignSelfEnd&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfEnd, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'end'&quot;);
</del><ins>+    element.style.alignSelf = &quot;flex-end safe&quot;;
+    checkValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;flex-end safe&quot;, &quot;flex-end safe&quot;);
</ins><span class="cx"> 
</span><del>-var alignSelfCenter = document.getElementById(&quot;alignSelfCenter&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfCenter, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'center'&quot;);
</del><ins>+    element.style.alignSelf = &quot;right&quot;;
+    checkValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;right&quot;, &quot;right&quot;);
</ins><span class="cx"> 
</span><del>-var alignSelfSelfEnd = document.getElementById(&quot;alignSelfSelfEnd&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfSelfEnd, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'self-end'&quot;);
</del><ins>+    element.style.alignSelf = &quot;center&quot;;
+    checkValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;center&quot;, &quot;center&quot;);
</ins><span class="cx"> 
</span><del>-var alignSelfSelfStart = document.getElementById(&quot;alignSelfSelfStart&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfSelfStart, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'self-start'&quot;);
</del><ins>+    element.style.alignSelf = &quot;self-start&quot;;
+    checkValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;self-start&quot;, &quot;self-start&quot;);
</ins><span class="cx"> 
</span><del>-var alignSelfLeft = document.getElementById(&quot;alignSelfLeft&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfLeft, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'left'&quot;);
</del><ins>+    element.style.alignSelf = &quot;auto&quot;;
+    checkValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;auto&quot;, &quot;normal&quot;);
</ins><span class="cx"> 
</span><del>-var alignSelfRight = document.getElementById(&quot;alignSelfRight&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfRight, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'right'&quot;);
</del><ins>+    container.style.display = &quot;flex&quot;;
+    element.style.alignSelf = &quot;auto&quot;;
+    checkValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;auto&quot;, &quot;normal&quot;);
</ins><span class="cx"> 
</span><del>-var alignSelfFlexStart = document.getElementById(&quot;alignSelfFlexStart&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfFlexStart, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'flex-start'&quot;);
</del><ins>+    container.style.display = &quot;grid&quot;;
+    element.style.alignSelf = &quot;auto&quot;;
+    checkValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;auto&quot;, &quot;normal&quot;);
</ins><span class="cx"> 
</span><del>-var alignSelfFlexEnd = document.getElementById(&quot;alignSelfFlexEnd&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfFlexEnd, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'flex-end'&quot;);
</del><ins>+    element.style.alignSelf = &quot;self-end&quot;;
+    checkValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;self-end&quot;, &quot;self-end&quot;);
+}, &quot;Test getting and setting align-self through JS&quot;);
</ins><span class="cx"> 
</span><del>-var alignSelfEndUnsafe = document.getElementById(&quot;alignSelfEndUnsafe&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfEndUnsafe, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'end unsafe'&quot;);
</del><ins>+test(function() {
+    document.documentElement.style.alignSelf = &quot;auto&quot;;
+    checkValues(document.documentElement, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;auto&quot;, &quot;normal&quot;);
+}, &quot;Test 'auto' value resolution for the root node&quot;);
</ins><span class="cx"> 
</span><del>-var alignSelfCenterUnsafe = document.getElementById(&quot;alignSelfCenterUnsafe&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfCenterUnsafe, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'center unsafe'&quot;);
</del><ins>+test(function() {
+    container = document.createElement(&quot;div&quot;);
+    element = document.createElement(&quot;div&quot;);
+    container.appendChild(element);
+    document.body.appendChild(container);
</ins><span class="cx"> 
</span><del>-var alignSelfSelfEndSafe = document.getElementById(&quot;alignSelfSelfEndSafe&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfSelfEndSafe, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'self-end safe'&quot;);
</del><ins>+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;auto safe&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;auto left&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;baseline safe&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;baseline center&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;stretch unsafe&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;stretch right&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;unsafe unsafe&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;unsafe safe&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;center start&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;stretch unsafe&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;safe stretch&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;baseline safe&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;unsafe baseline&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;unsafe safe left&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;unsafe left safe&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;left safe unsafe safe&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;legacy start&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;legacy end&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;legacy right unsafe&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;legacy auto&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;legacy stretch&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;legacy&quot;);
+    checkBadValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;,  &quot;legacy left right&quot;);
+}, &quot;Test bad combinations of align-self&quot;);
</ins><span class="cx"> 
</span><del>-var alignSelfSelfStartSafe = document.getElementById(&quot;alignSelfSelfStartSafe&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfSelfStartSafe, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'self-start safe'&quot;);
</del><ins>+test(function() {
+    container.style.display = &quot;&quot;;
+    checkInitialValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;center&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial'&quot;);
</ins><span class="cx"> 
</span><del>-var alignSelfRightSafe = document.getElementById(&quot;alignSelfRightSafe&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfRightSafe, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'right safe'&quot;);
</del><ins>+test(function() {
+    container.style.display = &quot;grid&quot;;
+    checkInitialValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;left safe&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial' for grid containers&quot;);
</ins><span class="cx"> 
</span><del>-var alignSelfLeftUnsafe = document.getElementById(&quot;alignSelfLeftUnsafe&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfLeftUnsafe, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'left unsafe'&quot;);
</del><ins>+test(function() {
+    container.style.display = &quot;flex&quot;;
+    checkInitialValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;right unsafe&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial' for flex containers&quot;);
</ins><span class="cx"> 
</span><del>-var alignSelfFlexStartUnsafe = document.getElementById(&quot;alignSelfFlexStartUnsafe&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfFlexStartUnsafe, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'flex-start unsafe'&quot;);
</del><ins>+test(function() {
+    container.style.display = &quot;&quot;;
+    element.style.position = &quot;absolute&quot;;
+    checkInitialValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;left&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial' for positioned elements&quot;);
</ins><span class="cx"> 
</span><del>-var alignSelfFlexEndSafe = document.getElementById(&quot;alignSelfFlexEndSafe&quot;);
-shouldBe(&quot;getComputedStyle(alignSelfFlexEndSafe, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'flex-end safe'&quot;);
</del><ins>+test(function() {
+    container.style.display = &quot;grid&quot;;
+    element.style.position = &quot;absolute&quot;;
+    checkInitialValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;right&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial' for positioned elements in grid containers&quot;);
</ins><span class="cx"> 
</span><del>-debug(&quot;&quot;);
-debug(&quot;Test initial value of align-self through JS&quot;);
-element = document.createElement(&quot;div&quot;);
-document.body.appendChild(element);
-shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('-webkit-align-self')&quot;, &quot;'normal'&quot;);
</del><ins>+test(function() {
+    container.style.display = &quot;flex&quot;;
+    element.style.position = &quot;absolute&quot;;
+    checkInitialValues(element, &quot;alignSelf&quot;, &quot;align-self&quot;, &quot;end&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial' for positioned elements in grid containers&quot;);
</ins><span class="cx"> 
</span><del>-debug(&quot;&quot;);
-debug(&quot;Test getting and setting align-self through JS&quot;);
-container = document.createElement(&quot;div&quot;);
-element = document.createElement(&quot;div&quot;);
-container.appendChild(element);
-document.body.appendChild(container);
-element.style.webkitAlignSelf = &quot;center&quot;;
-checkValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;center&quot;, &quot;center&quot;);
-
-element.style.webkitAlignSelf = &quot;unsafe start&quot;;
-checkValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;start unsafe&quot;, &quot;start unsafe&quot;);
-
-element.style.webkitAlignSelf = &quot;flex-end safe&quot;;
-checkValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;flex-end safe&quot;, &quot;flex-end safe&quot;);
-
-element.style.webkitAlignSelf = &quot;right&quot;;
-checkValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;right&quot;, &quot;right&quot;);
-
-element.style.webkitAlignSelf = &quot;center&quot;;
-checkValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;center&quot;, &quot;center&quot;);
-
-element.style.webkitAlignSelf = &quot;self-start&quot;;
-checkValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;self-start&quot;, &quot;self-start&quot;);
-
-element.style.webkitAlignSelf = &quot;auto&quot;;
-checkValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;auto&quot;, &quot;normal&quot;);
-
-container.style.display = &quot;-webkit-flex&quot;;
-element.style.webkitAlignSelf = &quot;auto&quot;;
-checkValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;auto&quot;, &quot;normal&quot;);
-
-container.style.display = &quot;grid&quot;;
-element.style.webkitAlignSelf = &quot;auto&quot;;
-checkValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;auto&quot;, &quot;normal&quot;);
-
-element.style.webkitAlignSelf = &quot;self-end&quot;;
-checkValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;self-end&quot;, &quot;self-end&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test 'auto' value resolution for the root node&quot;);
-document.documentElement.style.webkitAlignSelf = &quot;auto&quot;;
-checkValues(document.documentElement, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;auto&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test bad combinations of align-self&quot;);
-container = document.createElement(&quot;div&quot;);
-element = document.createElement(&quot;div&quot;);
-container.appendChild(element);
-document.body.appendChild(container);
-
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;unsafe auto&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;auto safe&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;auto left&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;baseline safe&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;baseline center&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;stretch unsafe&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;stretch right&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;unsafe unsafe&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;unsafe safe&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;center start&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;stretch unsafe&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;safe stretch&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;baseline safe&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;unsafe baseline&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;unsafe safe left&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;unsafe left safe&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;left safe unsafe safe&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;legacy start&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;legacy end&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;legacy right unsafe&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;legacy auto&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;legacy stretch&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;legacy&quot;);
-checkBadValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;,  &quot;legacy left right&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial'&quot;);
-container.style.display = &quot;&quot;;
-checkInitialValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;, &quot;center&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial' for grid containers&quot;);
-container.style.display = &quot;-webkit-grid&quot;;
-checkInitialValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;, &quot;left safe&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial' for flex containers&quot;);
-container.style.display = &quot;-webkit-flex&quot;;
-checkInitialValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;, &quot;right unsafe&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial' for positioned elements&quot;);
-container.style.display = &quot;&quot;;
-element.style.position = &quot;absolute&quot;;
-checkInitialValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;, &quot;left&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial' for positioned elements in grid containers&quot;);
-container.style.display = &quot;grid&quot;;
-element.style.position = &quot;absolute&quot;;
-checkInitialValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;, &quot;right&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial' for positioned elements in grid containers&quot;);
-container.style.display = &quot;-webkit-flex&quot;;
-element.style.position = &quot;absolute&quot;;
-checkInitialValues(element, &quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;, &quot;end&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'inherit'&quot;);
-checkInheritValues(&quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;, &quot;end&quot;);
-checkInheritValues(&quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;, &quot;left safe&quot;);
-checkInheritValues(&quot;webkitAlignSelf&quot;, &quot;-webkit-align-self&quot;, &quot;center unsafe&quot;);
-
</del><ins>+test(function() {
+    checkInheritValues(&quot;alignSelf&quot;, &quot;align-self&quot;, &quot;end&quot;);
+    checkInheritValues(&quot;alignSelf&quot;, &quot;align-self&quot;, &quot;left safe&quot;);
+    checkInheritValues(&quot;alignSelf&quot;, &quot;align-self&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="trunkLayoutTestscss3resourcesalignmentparsingutilsthjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/resources/alignment-parsing-utils-th.js (214563 => 214564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/resources/alignment-parsing-utils-th.js        2017-03-29 21:58:40 UTC (rev 214563)
+++ trunk/LayoutTests/css3/resources/alignment-parsing-utils-th.js        2017-03-29 22:01:11 UTC (rev 214564)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx">     window.element = element;
</span><span class="cx">     var elementID = element.id || &quot;element&quot;;
</span><span class="cx">     assert_equals(eval('element.style.' + property), value, property + ' specified value is not what it should.');
</span><del>-    assert_equals(eval(&quot;window.getComputedStyle(&quot; + elementID + &quot;, '').getPropertyValue('&quot; + propertyID + &quot;')&quot;), computedValue, property + &quot; is not what it should.&quot;);
</del><ins>+    assert_equals(eval(&quot;window.getComputedStyle(&quot; + elementID + &quot;, '').getPropertyValue('&quot; + propertyID + &quot;')&quot;), computedValue, property + &quot; is not what is should.&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function checkBadValues(element, property, propertyID, value)
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssparsejustifyitemsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/parse-justify-items-expected.txt (214563 => 214564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/parse-justify-items-expected.txt        2017-03-29 21:58:40 UTC (rev 214563)
+++ trunk/LayoutTests/fast/css/parse-justify-items-expected.txt        2017-03-29 22:01:11 UTC (rev 214564)
</span><span class="lines">@@ -1,157 +1,14 @@
</span><span class="cx"> Test that setting and getting justify-items 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-items set through CSS. 
+PASS Test initial value of justify-items through JS 
+PASS Test getting and setting justify-items through JS 
+PASS Test 'auto' value resolution for the root node 
+PASS Test bad combinations of justify-items 
+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' 
+PASS Test the value 'legacy' 
</ins><span class="cx"> 
</span><del>-Test getting justify-items set through CSS
-PASS getComputedStyle(justifyItemsBaseline, '').getPropertyValue('justify-items') is 'baseline'
-PASS getComputedStyle(justifyItemsLastBaseline, '').getPropertyValue('justify-items') is 'last-baseline'
-PASS getComputedStyle(justifyItemsStretch, '').getPropertyValue('justify-items') is 'stretch'
-PASS getComputedStyle(justifyItemsStart, '').getPropertyValue('justify-items') is 'start'
-PASS getComputedStyle(justifyItemsEnd, '').getPropertyValue('justify-items') is 'end'
-PASS getComputedStyle(justifyItemsCenter, '').getPropertyValue('justify-items') is 'center'
-PASS getComputedStyle(justifyItemsSelfEnd, '').getPropertyValue('justify-items') is 'self-end'
-PASS getComputedStyle(justifyItemsSelfStart, '').getPropertyValue('justify-items') is 'self-start'
-PASS getComputedStyle(justifyItemsLeft, '').getPropertyValue('justify-items') is 'left'
-PASS getComputedStyle(justifyItemsRight, '').getPropertyValue('justify-items') is 'right'
-PASS getComputedStyle(justifyItemsFlexStart, '').getPropertyValue('justify-items') is 'flex-start'
-PASS getComputedStyle(justifyItemsFlexEnd, '').getPropertyValue('justify-items') is 'flex-end'
-PASS getComputedStyle(justifyItemsEndUnsafe, '').getPropertyValue('justify-items') is 'end unsafe'
-PASS getComputedStyle(justifyItemsCenterUnsafe, '').getPropertyValue('justify-items') is 'center unsafe'
-PASS getComputedStyle(justifyItemsSelfEndSafe, '').getPropertyValue('justify-items') is 'self-end safe'
-PASS getComputedStyle(justifyItemsSelfStartSafe, '').getPropertyValue('justify-items') is 'self-start safe'
-PASS getComputedStyle(justifyItemsRightSafe, '').getPropertyValue('justify-items') is 'right safe'
-PASS getComputedStyle(justifyItemsLeftUnsafe, '').getPropertyValue('justify-items') is 'left unsafe'
-PASS getComputedStyle(justifyItemsFlexStartUnsafe, '').getPropertyValue('justify-items') is 'flex-start unsafe'
-PASS getComputedStyle(justifyItemsFlexEndSafe, '').getPropertyValue('justify-items') is 'flex-end safe'
-PASS getComputedStyle(justifyItemsLegacyLeft, '').getPropertyValue('justify-items') is 'legacy left'
-PASS getComputedStyle(justifyItemsLegacyCenter, '').getPropertyValue('justify-items') is 'legacy center'
-PASS getComputedStyle(justifyItemsLegacyRight, '').getPropertyValue('justify-items') is 'legacy right'
-PASS getComputedStyle(justifyItemsLeftLegacy, '').getPropertyValue('justify-items') is 'legacy left'
-PASS getComputedStyle(justifyItemsCenterLegacy, '').getPropertyValue('justify-items') is 'legacy center'
-PASS getComputedStyle(justifyItemsRightLegacy, '').getPropertyValue('justify-items') is 'legacy right'
-
-Test initial value of justify-items through JS
-PASS getComputedStyle(element, '').getPropertyValue('justify-items') is 'normal'
-
-Test getting and setting justify-items through JS
-PASS element.style.justifyItems is &quot;center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;center&quot;
-PASS element.style.justifyItems is &quot;start unsafe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;start unsafe&quot;
-PASS element.style.justifyItems is &quot;flex-end safe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;flex-end safe&quot;
-PASS element.style.justifyItems is &quot;legacy right&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;legacy right&quot;
-PASS element.style.justifyItems is &quot;legacy center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;legacy center&quot;
-PASS element.style.justifyItems is &quot;legacy left&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;legacy left&quot;
-PASS element.style.justifyItems is &quot;auto&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;auto&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;auto&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;self-end&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;self-end&quot;
-
-Test bad combinations of justify-items
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-
-Test the value 'initial'
-PASS element.style.justifyItems is &quot;legacy center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;legacy center&quot;
-PASS element.style.justifyItems is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-
-Test the value 'initial' for grid containers
-PASS element.style.justifyItems is &quot;left safe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;left safe&quot;
-PASS element.style.justifyItems is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-
-Test the value 'initial' for flex containers
-PASS element.style.justifyItems is &quot;right unsafe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;right unsafe&quot;
-PASS element.style.justifyItems is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;normal&quot;
-
-Test the value 'inherit'
-PASS element.style.justifyItems is &quot;end&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;end&quot;
-PASS element.style.justifyItems is &quot;inherit&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;end&quot;
-PASS element.style.justifyItems is &quot;left safe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;left safe&quot;
-PASS element.style.justifyItems is &quot;inherit&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;left safe&quot;
-PASS element.style.justifyItems is &quot;legacy center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;legacy center&quot;
-PASS element.style.justifyItems is &quot;inherit&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;legacy center&quot;
-
-Test the value 'legacy'
-PASS element.style.justifyItems is &quot;legacy left&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;legacy left&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;legacy left&quot;
-PASS element.style.justifyItems is &quot;legacy center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;legacy center&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;legacy center&quot;
-PASS element.style.justifyItems is &quot;legacy right&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;legacy right&quot;
-PASS element.style.justifyItems is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-items') is &quot;legacy right&quot;
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsfastcssparsejustifyitemshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/parse-justify-items.html (214563 => 214564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/parse-justify-items.html        2017-03-29 21:58:40 UTC (rev 214563)
+++ trunk/LayoutTests/fast/css/parse-justify-items.html        2017-03-29 22:01:11 UTC (rev 214564)
</span><span class="lines">@@ -1,13 +1,15 @@
</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"> #justifyItemsBaseline {
</span><span class="cx">     justify-items: baseline;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#justifyItemsFirstBaseline {
+    justify-items: first baseline;
+}
+
</ins><span class="cx"> #justifyItemsLastBaseline {
</span><del>-    justify-items: last-baseline;
</del><ins>+    justify-items: last baseline;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #justifyItemsStretch {
</span><span class="lines">@@ -106,10 +108,9 @@
</span><span class="cx">     justify-items: right legacy;
</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-items works as expected&lt;/p&gt;
</ins><span class="cx"> &lt;div id=&quot;justifyItemsBaseline&quot;&gt;&lt;/div&gt;
</span><ins>+&lt;div id=&quot;justifyItemsFirstBaseline&quot;&gt;&lt;/div&gt;
</ins><span class="cx"> &lt;div id=&quot;justifyItemsLastBaseline&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;justifyItemsStretch&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;justifyItemsStart&quot;&gt;&lt;/div&gt;
</span><span class="lines">@@ -136,188 +137,171 @@
</span><span class="cx"> &lt;div id=&quot;justifyItemsLeftLegacy&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;justifyItemsCenterLegacy&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;justifyItemsRightLegacy&quot;&gt;&lt;/div&gt;
</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-items works as expected');
</del><ins>+test(function() {
+    var justifyItemsBaseline = document.getElementById(&quot;justifyItemsBaseline&quot;);
+    checkValues(justifyItemsBaseline, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;baseline&quot;);
+    var justifyItemsFirstBaseline = document.getElementById(&quot;justifyItemsFirstBaseline&quot;);
+    checkValues(justifyItemsFirstBaseline, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;baseline&quot;);
+    var justifyItemsLastBaseline = document.getElementById(&quot;justifyItemsLastBaseline&quot;);
+    checkValues(justifyItemsLastBaseline, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;last baseline&quot;);
+    var justifyItemsStretch = document.getElementById(&quot;justifyItemsStretch&quot;);
+    checkValues(justifyItemsStretch, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;stretch&quot;);
+    var justifyItemsStart = document.getElementById(&quot;justifyItemsStart&quot;);
+    checkValues(justifyItemsStart, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;start&quot;);
+    var justifyItemsEnd = document.getElementById(&quot;justifyItemsEnd&quot;);
+    checkValues(justifyItemsEnd, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;end&quot;);
+    var justifyItemsCenter = document.getElementById(&quot;justifyItemsCenter&quot;);
+    checkValues(justifyItemsCenter, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;center&quot;);
+    var justifyItemsSelfEnd = document.getElementById(&quot;justifyItemsSelfEnd&quot;);
+    checkValues(justifyItemsSelfEnd, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;self-end&quot;);
+    var justifyItemsSelfStart = document.getElementById(&quot;justifyItemsSelfStart&quot;);
+    checkValues(justifyItemsSelfStart, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;self-start&quot;);
+    var justifyItemsLeft = document.getElementById(&quot;justifyItemsLeft&quot;);
+    checkValues(justifyItemsLeft, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;left&quot;);
+    var justifyItemsRight = document.getElementById(&quot;justifyItemsRight&quot;);
+    checkValues(justifyItemsRight, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;right&quot;);
+    var justifyItemsFlexStart = document.getElementById(&quot;justifyItemsFlexStart&quot;);
+    checkValues(justifyItemsFlexStart, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;flex-start&quot;);
+    var justifyItemsFlexEnd = document.getElementById(&quot;justifyItemsFlexEnd&quot;);
+    checkValues(justifyItemsFlexEnd, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;flex-end&quot;);
</ins><span class="cx"> 
</span><del>-debug(&quot;Test getting justify-items set through CSS&quot;);
-var justifyItemsBaseline = document.getElementById(&quot;justifyItemsBaseline&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsBaseline, '').getPropertyValue('justify-items')&quot;, &quot;'baseline'&quot;);
</del><ins>+    var justifyItemsEndUnsafe = document.getElementById(&quot;justifyItemsEndUnsafe&quot;);
+    checkValues(justifyItemsEndUnsafe, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;end unsafe&quot;);
+    var justifyItemsCenterUnsafe = document.getElementById(&quot;justifyItemsCenterUnsafe&quot;);
+    checkValues(justifyItemsCenterUnsafe, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;center unsafe&quot;);
+    var justifyItemsSelfEndSafe = document.getElementById(&quot;justifyItemsSelfEndSafe&quot;);
+    checkValues(justifyItemsSelfEndSafe, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;self-end safe&quot;);
+    var justifyItemsSelfStartSafe = document.getElementById(&quot;justifyItemsSelfStartSafe&quot;);
+    checkValues(justifyItemsSelfStartSafe, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;self-start safe&quot;);
+    var justifyItemsRightSafe = document.getElementById(&quot;justifyItemsRightSafe&quot;);
+    checkValues(justifyItemsRightSafe, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;right safe&quot;);
+    var justifyItemsLeftUnsafe = document.getElementById(&quot;justifyItemsLeftUnsafe&quot;);
+    checkValues(justifyItemsLeftUnsafe, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;left unsafe&quot;);
+    var justifyItemsFlexStartUnsafe = document.getElementById(&quot;justifyItemsFlexStartUnsafe&quot;);
+    checkValues(justifyItemsFlexStartUnsafe, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;flex-start unsafe&quot;);
+    var justifyItemsFlexEndSafe = document.getElementById(&quot;justifyItemsFlexEndSafe&quot;);
+    checkValues(justifyItemsFlexEndSafe, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;flex-end safe&quot;);
+    var justifyItemsLegacyLeft = document.getElementById(&quot;justifyItemsLegacyLeft&quot;);
+    checkValues(justifyItemsLegacyLeft, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;legacy left&quot;);
+    var justifyItemsLegacyCenter = document.getElementById(&quot;justifyItemsLegacyCenter&quot;);
+    checkValues(justifyItemsLegacyCenter, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;legacy center&quot;);
+    var justifyItemsLegacyRight = document.getElementById(&quot;justifyItemsLegacyRight&quot;);
+    checkValues(justifyItemsLegacyRight, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;legacy right&quot;);
+    var justifyItemsLeftLegacy = document.getElementById(&quot;justifyItemsLeftLegacy&quot;);
+    checkValues(justifyItemsLeftLegacy, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;legacy left&quot;);
+    var justifyItemsCenterLegacy = document.getElementById(&quot;justifyItemsCenterLegacy&quot;);
+    checkValues(justifyItemsCenterLegacy, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;legacy center&quot;);
+    var justifyItemsRightLegacy = document.getElementById(&quot;justifyItemsRightLegacy&quot;);
+    checkValues(justifyItemsRightLegacy, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;legacy right&quot;);
+}, &quot;Test getting justify-items set through CSS.&quot;);
</ins><span class="cx"> 
</span><del>-var justifyItemsLastBaseline = document.getElementById(&quot;justifyItemsLastBaseline&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsLastBaseline, '').getPropertyValue('justify-items')&quot;, &quot;'last-baseline'&quot;);
</del><ins>+test(function() {
+    element = document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
+    checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;&quot;, &quot;normal&quot;);
+}, &quot;Test initial value of justify-items through JS&quot;);
</ins><span class="cx"> 
</span><del>-var justifyItemsStretch = document.getElementById(&quot;justifyItemsStretch&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsStretch, '').getPropertyValue('justify-items')&quot;, &quot;'stretch'&quot;);
</del><ins>+test(function() {
+    element = document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
+    element.style.justifyItems = &quot;center&quot;;
+    checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;center&quot;, &quot;center&quot;);
</ins><span class="cx"> 
</span><del>-var justifyItemsStart = document.getElementById(&quot;justifyItemsStart&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsStart, '').getPropertyValue('justify-items')&quot;, &quot;'start'&quot;);
</del><ins>+    element.style.justifyItems = &quot;unsafe start&quot;;
+    checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;start unsafe&quot;, &quot;start unsafe&quot;);
</ins><span class="cx"> 
</span><del>-var justifyItemsEnd = document.getElementById(&quot;justifyItemsEnd&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsEnd, '').getPropertyValue('justify-items')&quot;, &quot;'end'&quot;);
</del><ins>+    element.style.justifyItems = &quot;flex-end safe&quot;;
+    checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;flex-end safe&quot;, &quot;flex-end safe&quot;);
</ins><span class="cx"> 
</span><del>-var justifyItemsCenter = document.getElementById(&quot;justifyItemsCenter&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsCenter, '').getPropertyValue('justify-items')&quot;, &quot;'center'&quot;);
</del><ins>+    element.style.justifyItems = &quot;right legacy&quot;;
+    checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy right&quot;, &quot;legacy right&quot;);
</ins><span class="cx"> 
</span><del>-var justifyItemsSelfEnd = document.getElementById(&quot;justifyItemsSelfEnd&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsSelfEnd, '').getPropertyValue('justify-items')&quot;, &quot;'self-end'&quot;);
</del><ins>+    element.style.justifyItems = &quot;center legacy&quot;;
+    checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy center&quot;, &quot;legacy center&quot;);
</ins><span class="cx"> 
</span><del>-var justifyItemsSelfStart = document.getElementById(&quot;justifyItemsSelfStart&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsSelfStart, '').getPropertyValue('justify-items')&quot;, &quot;'self-start'&quot;);
</del><ins>+    element.style.justifyItems = &quot;left legacy&quot;;
+    checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy left&quot;, &quot;legacy left&quot;);
</ins><span class="cx"> 
</span><del>-var justifyItemsLeft = document.getElementById(&quot;justifyItemsLeft&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsLeft, '').getPropertyValue('justify-items')&quot;, &quot;'left'&quot;);
</del><ins>+    element.style.justifyItems = &quot;auto&quot;;
+    checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;auto&quot;, &quot;normal&quot;);
</ins><span class="cx"> 
</span><del>-var justifyItemsRight = document.getElementById(&quot;justifyItemsRight&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsRight, '').getPropertyValue('justify-items')&quot;, &quot;'right'&quot;);
</del><ins>+    element.style.display = &quot;flex&quot;;
+    element.style.justifyItems = &quot;auto&quot;;
+    checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;auto&quot;, &quot;normal&quot;);
</ins><span class="cx"> 
</span><del>-var justifyItemsFlexStart = document.getElementById(&quot;justifyItemsFlexStart&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsFlexStart, '').getPropertyValue('justify-items')&quot;, &quot;'flex-start'&quot;);
</del><ins>+    element.style.display = &quot;grid&quot;;
+    element.style.justifyItems = &quot;auto&quot;;
+    checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;auto&quot;, &quot;normal&quot;);
</ins><span class="cx"> 
</span><del>-var justifyItemsFlexEnd = document.getElementById(&quot;justifyItemsFlexEnd&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsFlexEnd, '').getPropertyValue('justify-items')&quot;, &quot;'flex-end'&quot;);
</del><ins>+    element.style.justifyItems = &quot;self-end&quot;;
+    checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;self-end&quot;, &quot;self-end&quot;);
+}, &quot;Test getting and setting justify-items through JS&quot;);
</ins><span class="cx"> 
</span><del>-var justifyItemsEndUnsafe = document.getElementById(&quot;justifyItemsEndUnsafe&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsEndUnsafe, '').getPropertyValue('justify-items')&quot;, &quot;'end unsafe'&quot;);
</del><ins>+test(function() {
+    document.documentElement.style.justifyItems = &quot;auto&quot;;
+    checkValues(document.documentElement, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;auto&quot;, &quot;normal&quot;);
+}, &quot;Test 'auto' value resolution for the root node&quot;);
</ins><span class="cx"> 
</span><del>-var justifyItemsCenterUnsafe = document.getElementById(&quot;justifyItemsCenterUnsafe&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsCenterUnsafe, '').getPropertyValue('justify-items')&quot;, &quot;'center unsafe'&quot;);
</del><ins>+test(function() {
+    container = document.createElement(&quot;div&quot;);
+    element = document.createElement(&quot;div&quot;);
+    container.appendChild(element);
+    document.body.appendChild(container);
</ins><span class="cx"> 
</span><del>-var justifyItemsSelfEndSafe = document.getElementById(&quot;justifyItemsSelfEndSafe&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsSelfEndSafe, '').getPropertyValue('justify-items')&quot;, &quot;'self-end safe'&quot;);
</del><ins>+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;unsafe auto&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;auto safe&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;auto left&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;baseline safe&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;baseline center&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;stretch unsafe&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;stretch right&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;unsafe unsafe&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;unsafe safe&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;center start&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;stretch unsafe&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;safe stretch&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;baseline safe&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;unsafe baseline&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;unsafe safe left&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;unsafe left safe&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;left safe unsafe safe&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy start&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy end&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy right unsafe&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy auto&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy stretch&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy&quot;);
+    checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy left right&quot;);
+}, &quot;Test bad combinations of justify-items&quot;);
</ins><span class="cx"> 
</span><del>-var justifyItemsSelfStartSafe = document.getElementById(&quot;justifyItemsSelfStartSafe&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsSelfStartSafe, '').getPropertyValue('justify-items')&quot;, &quot;'self-start safe'&quot;);
</del><ins>+test(function() {
+    element.style.display = &quot;&quot;;
+    checkInitialValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;legacy center&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial'&quot;);
</ins><span class="cx"> 
</span><del>-var justifyItemsRightSafe = document.getElementById(&quot;justifyItemsRightSafe&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsRightSafe, '').getPropertyValue('justify-items')&quot;, &quot;'right safe'&quot;);
</del><ins>+test(function() {
+    element.style.display = &quot;grid&quot;;
+    checkInitialValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;left safe&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial' for grid containers&quot;);
</ins><span class="cx"> 
</span><del>-var justifyItemsLeftUnsafe = document.getElementById(&quot;justifyItemsLeftUnsafe&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsLeftUnsafe, '').getPropertyValue('justify-items')&quot;, &quot;'left unsafe'&quot;);
</del><ins>+test(function() {
+    element.style.display = &quot;flex&quot;;
+    checkInitialValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;right unsafe&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial' for flex containers&quot;);
</ins><span class="cx"> 
</span><del>-var justifyItemsFlexStartUnsafe = document.getElementById(&quot;justifyItemsFlexStartUnsafe&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsFlexStartUnsafe, '').getPropertyValue('justify-items')&quot;, &quot;'flex-start unsafe'&quot;);
</del><ins>+test(function() {
+    checkInheritValues(&quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;end&quot;);
+    checkInheritValues(&quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;left safe&quot;);
+    checkInheritValues(&quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;legacy center&quot;);
+}, &quot;Test the value 'inherit'&quot;);
</ins><span class="cx"> 
</span><del>-var justifyItemsFlexEndSafe = document.getElementById(&quot;justifyItemsFlexEndSafe&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsFlexEndSafe, '').getPropertyValue('justify-items')&quot;, &quot;'flex-end safe'&quot;);
-
-var justifyItemsLegacyLeft = document.getElementById(&quot;justifyItemsLegacyLeft&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsLegacyLeft, '').getPropertyValue('justify-items')&quot;, &quot;'legacy left'&quot;);
-
-var justifyItemsLegacyCenter = document.getElementById(&quot;justifyItemsLegacyCenter&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsLegacyCenter, '').getPropertyValue('justify-items')&quot;, &quot;'legacy center'&quot;);
-
-var justifyItemsLegacyRight = document.getElementById(&quot;justifyItemsLegacyRight&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsLegacyRight, '').getPropertyValue('justify-items')&quot;, &quot;'legacy right'&quot;);
-
-var justifyItemsLeftLegacy = document.getElementById(&quot;justifyItemsLeftLegacy&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsLeftLegacy, '').getPropertyValue('justify-items')&quot;, &quot;'legacy left'&quot;);
-
-var justifyItemsCenterLegacy = document.getElementById(&quot;justifyItemsCenterLegacy&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsCenterLegacy, '').getPropertyValue('justify-items')&quot;, &quot;'legacy center'&quot;);
-
-var justifyItemsRightLegacy = document.getElementById(&quot;justifyItemsRightLegacy&quot;);
-shouldBe(&quot;getComputedStyle(justifyItemsRightLegacy, '').getPropertyValue('justify-items')&quot;, &quot;'legacy right'&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test initial value of justify-items through JS&quot;);
-element = document.createElement(&quot;div&quot;);
-document.body.appendChild(element);
-shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('justify-items')&quot;, &quot;'normal'&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test getting and setting justify-items through JS&quot;);
-element = document.createElement(&quot;div&quot;);
-document.body.appendChild(element);
-element.style.justifyItems = &quot;center&quot;;
-checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;center&quot;, &quot;center&quot;);
-
-element.style.justifyItems = &quot;unsafe start&quot;;
-checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;start unsafe&quot;, &quot;start unsafe&quot;);
-
-element.style.justifyItems = &quot;flex-end safe&quot;;
-checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;flex-end safe&quot;, &quot;flex-end safe&quot;);
-
-element.style.justifyItems = &quot;right legacy&quot;;
-checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy right&quot;, &quot;legacy right&quot;);
-
-element.style.justifyItems = &quot;center legacy&quot;;
-checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy center&quot;, &quot;legacy center&quot;);
-
-element.style.justifyItems = &quot;left legacy&quot;;
-checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy left&quot;, &quot;legacy left&quot;);
-
-element.style.justifyItems = &quot;auto&quot;;
-checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;auto&quot;, &quot;normal&quot;);
-
-element.style.display = &quot;flex&quot;;
-element.style.justifyItems = &quot;auto&quot;;
-checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;auto&quot;, &quot;normal&quot;);
-
-element.style.display = &quot;grid&quot;;
-element.style.justifyItems = &quot;auto&quot;;
-checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;auto&quot;, &quot;normal&quot;);
-
-element.style.justifyItems = &quot;self-end&quot;;
-checkValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;self-end&quot;, &quot;self-end&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test bad combinations of justify-items&quot;);
-element = document.createElement(&quot;div&quot;);
-document.body.appendChild(element);
-
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;unsafe auto&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;auto safe&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;auto left&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;baseline safe&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;baseline center&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;stretch unsafe&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;stretch right&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;unsafe unsafe&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;unsafe safe&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;center start&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;stretch unsafe&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;safe stretch&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;baseline safe&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;unsafe baseline&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;unsafe safe left&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;unsafe left safe&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;left safe unsafe safe&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy start&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy end&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy right unsafe&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy auto&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy stretch&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy&quot;);
-checkBadValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;,  &quot;legacy left right&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial'&quot;);
-element.style.display = &quot;&quot;;
-checkInitialValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;legacy 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;justifyItems&quot;, &quot;justify-items&quot;, &quot;left safe&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial' for flex containers&quot;);
-element.style.display = &quot;flex&quot;;
-checkInitialValues(element, &quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;right unsafe&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'inherit'&quot;);
-checkInheritValues(&quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;end&quot;);
-checkInheritValues(&quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;left safe&quot;);
-checkInheritValues(&quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;legacy center&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'legacy'&quot;);
-checkLegacyValues(&quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;legacy left&quot;);
-checkLegacyValues(&quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;legacy center&quot;);
-checkLegacyValues(&quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;legacy right&quot;);
-
</del><ins>+test(function() {
+    checkLegacyValues(&quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;legacy left&quot;);
+    checkLegacyValues(&quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;legacy center&quot;);
+    checkLegacyValues(&quot;justifyItems&quot;, &quot;justify-items&quot;, &quot;legacy right&quot;);
+}, &quot;Test the value 'legacy'&quot;);
</ins><span class="cx"> &lt;/script&gt;
</span><del>-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsfastcssparsejustifyselfexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/parse-justify-self-expected.txt (214563 => 214564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/parse-justify-self-expected.txt        2017-03-29 21:58:40 UTC (rev 214563)
+++ trunk/LayoutTests/fast/css/parse-justify-self-expected.txt        2017-03-29 22:01:11 UTC (rev 214564)
</span><span class="lines">@@ -1,155 +1,16 @@
</span><span class="cx"> Test that setting and getting justify-self 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-self set through CSS. 
+PASS Test initial value of justify-self through JS 
+PASS Test getting and setting justify-self through JS 
+PASS Test 'auto' value resolution for the root node 
+PASS Test bad combinations of justify-self 
+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 'initial' for positioned elements 
+PASS Test the value 'initial' for positioned elements in grid containers 
+PASS Test the value 'initial' for positioned elements in grid containers 
+PASS Test the value 'inherit' 
</ins><span class="cx"> 
</span><del>-Test getting justify-self set through CSS
-PASS getComputedStyle(justifySelfBaseline, '').getPropertyValue('justify-self') is 'baseline'
-PASS getComputedStyle(justifySelfLastBaseline, '').getPropertyValue('justify-self') is 'last-baseline'
-PASS getComputedStyle(justifySelfStretch, '').getPropertyValue('justify-self') is 'stretch'
-PASS getComputedStyle(justifySelfStart, '').getPropertyValue('justify-self') is 'start'
-PASS getComputedStyle(justifySelfEnd, '').getPropertyValue('justify-self') is 'end'
-PASS getComputedStyle(justifySelfCenter, '').getPropertyValue('justify-self') is 'center'
-PASS getComputedStyle(justifySelfSelfEnd, '').getPropertyValue('justify-self') is 'self-end'
-PASS getComputedStyle(justifySelfSelfStart, '').getPropertyValue('justify-self') is 'self-start'
-PASS getComputedStyle(justifySelfLeft, '').getPropertyValue('justify-self') is 'left'
-PASS getComputedStyle(justifySelfRight, '').getPropertyValue('justify-self') is 'right'
-PASS getComputedStyle(justifySelfFlexStart, '').getPropertyValue('justify-self') is 'flex-start'
-PASS getComputedStyle(justifySelfFlexEnd, '').getPropertyValue('justify-self') is 'flex-end'
-PASS getComputedStyle(justifySelfEndUnsafe, '').getPropertyValue('justify-self') is 'end unsafe'
-PASS getComputedStyle(justifySelfCenterUnsafe, '').getPropertyValue('justify-self') is 'center unsafe'
-PASS getComputedStyle(justifySelfSelfEndSafe, '').getPropertyValue('justify-self') is 'self-end safe'
-PASS getComputedStyle(justifySelfSelfStartSafe, '').getPropertyValue('justify-self') is 'self-start safe'
-PASS getComputedStyle(justifySelfRightSafe, '').getPropertyValue('justify-self') is 'right safe'
-PASS getComputedStyle(justifySelfLeftUnsafe, '').getPropertyValue('justify-self') is 'left unsafe'
-PASS getComputedStyle(justifySelfFlexStartUnsafe, '').getPropertyValue('justify-self') is 'flex-start unsafe'
-PASS getComputedStyle(justifySelfFlexEndSafe, '').getPropertyValue('justify-self') is 'flex-end safe'
-
-Test initial value of justify-self through JS
-PASS getComputedStyle(element, '').getPropertyValue('justify-self') is 'normal'
-
-Test getting and setting justify-self through JS
-PASS element.style.justifySelf is &quot;center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;center&quot;
-PASS element.style.justifySelf is &quot;start unsafe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;start unsafe&quot;
-PASS element.style.justifySelf is &quot;flex-end safe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;flex-end safe&quot;
-PASS element.style.justifySelf is &quot;right&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;right&quot;
-PASS element.style.justifySelf is &quot;center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;center&quot;
-PASS element.style.justifySelf is &quot;self-start&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;self-start&quot;
-PASS element.style.justifySelf is &quot;auto&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;auto&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;auto&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;self-end&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;self-end&quot;
-
-Test bad combinations of justify-self
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-PASS element.style.justifySelf is &quot;&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-
-Test the value 'initial'
-PASS element.style.justifySelf is &quot;center&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;center&quot;
-PASS element.style.justifySelf is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-
-Test the value 'initial' for grid containers
-PASS element.style.justifySelf is &quot;left safe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;left safe&quot;
-PASS element.style.justifySelf is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-
-Test the value 'initial' for flex containers
-PASS element.style.justifySelf is &quot;right unsafe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;right unsafe&quot;
-PASS element.style.justifySelf is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-
-Test the value 'initial' for positioned elements
-PASS element.style.justifySelf is &quot;left&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;left&quot;
-PASS element.style.justifySelf is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-
-Test the value 'initial' for positioned elements in grid containers
-PASS element.style.justifySelf is &quot;right&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;right&quot;
-PASS element.style.justifySelf is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-
-Test the value 'initial' for positioned elements in grid containers
-PASS element.style.justifySelf is &quot;end&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;end&quot;
-PASS element.style.justifySelf is &quot;initial&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;normal&quot;
-
-Test the value 'inherit'
-PASS element.style.justifySelf is &quot;end&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;end&quot;
-PASS element.style.justifySelf is &quot;inherit&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;end&quot;
-PASS element.style.justifySelf is &quot;left safe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;left safe&quot;
-PASS element.style.justifySelf is &quot;inherit&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;left safe&quot;
-PASS element.style.justifySelf is &quot;center unsafe&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;center unsafe&quot;
-PASS element.style.justifySelf is &quot;inherit&quot;
-PASS window.getComputedStyle(element, '').getPropertyValue('justify-self') is &quot;center unsafe&quot;
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsfastcssparsejustifyselfhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/parse-justify-self.html (214563 => 214564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/parse-justify-self.html        2017-03-29 21:58:40 UTC (rev 214563)
+++ trunk/LayoutTests/fast/css/parse-justify-self.html        2017-03-29 22:01:11 UTC (rev 214564)
</span><span class="lines">@@ -1,13 +1,15 @@
</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"> #justifySelfBaseline {
</span><span class="cx">     justify-self: baseline;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#justifySelfFirstBaseline {
+    justify-self: first baseline;
+}
+
</ins><span class="cx"> #justifySelfLastBaseline {
</span><del>-    justify-self: last-baseline;
</del><ins>+    justify-self: last baseline;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #justifySelfStretch {
</span><span class="lines">@@ -82,10 +84,9 @@
</span><span class="cx">     justify-self: flex-end safe;
</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-self works as expected&lt;/p&gt;
</ins><span class="cx"> &lt;div id=&quot;justifySelfBaseline&quot;&gt;&lt;/div&gt;
</span><ins>+&lt;div id=&quot;justifySelfFirstBaseline&quot;&gt;&lt;/div&gt;
</ins><span class="cx"> &lt;div id=&quot;justifySelfLastBaseline&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;justifySelfStretch&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;justifySelfStart&quot;&gt;&lt;/div&gt;
</span><span class="lines">@@ -106,186 +107,173 @@
</span><span class="cx"> &lt;div id=&quot;justifySelfLeftUnsafe&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;justifySelfFlexStartUnsafe&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;div id=&quot;justifySelfFlexEndSafe&quot;&gt;&lt;/div&gt;
</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-self works as expected');
</del><ins>+test(function() {
+    var justifySelfBaseline = document.getElementById(&quot;justifySelfBaseline&quot;);
+    checkValues(justifySelfBaseline, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;baseline&quot;);
+    var justifySelfFirstBaseline = document.getElementById(&quot;justifySelfFirstBaseline&quot;);
+    checkValues(justifySelfFirstBaseline, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;baseline&quot;);
+    var justifySelfLastBaseline = document.getElementById(&quot;justifySelfLastBaseline&quot;);
+    checkValues(justifySelfLastBaseline, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;last baseline&quot;);
+    var justifySelfStretch = document.getElementById(&quot;justifySelfStretch&quot;);
+    checkValues(justifySelfStretch, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;stretch&quot;);
+    var justifySelfStart = document.getElementById(&quot;justifySelfStart&quot;);
+    checkValues(justifySelfStart, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;start&quot;);
+    var justifySelfEnd = document.getElementById(&quot;justifySelfEnd&quot;);
+    checkValues(justifySelfEnd, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;end&quot;);
+    var justifySelfCenter = document.getElementById(&quot;justifySelfCenter&quot;);
+    checkValues(justifySelfCenter, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;center&quot;);
+    var justifySelfSelfEnd = document.getElementById(&quot;justifySelfSelfEnd&quot;);
+    checkValues(justifySelfSelfEnd, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;self-end&quot;);
+    var justifySelfSelfStart = document.getElementById(&quot;justifySelfSelfStart&quot;);
+    checkValues(justifySelfSelfStart, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;self-start&quot;);
+    var justifySelfLeft = document.getElementById(&quot;justifySelfLeft&quot;);
+    checkValues(justifySelfLeft, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;left&quot;);
+    var justifySelfRight = document.getElementById(&quot;justifySelfRight&quot;);
+    checkValues(justifySelfRight, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;right&quot;);
+    var justifySelfFlexStart = document.getElementById(&quot;justifySelfFlexStart&quot;);
+    checkValues(justifySelfFlexStart, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;flex-start&quot;);
+    var justifySelfFlexEnd = document.getElementById(&quot;justifySelfFlexEnd&quot;);
+    checkValues(justifySelfFlexEnd, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;flex-end&quot;);
</ins><span class="cx"> 
</span><del>-debug(&quot;Test getting justify-self set through CSS&quot;);
-var justifySelfBaseline = document.getElementById(&quot;justifySelfBaseline&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfBaseline, '').getPropertyValue('justify-self')&quot;, &quot;'baseline'&quot;);
</del><ins>+    var justifySelfEndUnsafe = document.getElementById(&quot;justifySelfEndUnsafe&quot;);
+    checkValues(justifySelfEndUnsafe, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;end unsafe&quot;);
+    var justifySelfCenterUnsafe = document.getElementById(&quot;justifySelfCenterUnsafe&quot;);
+    checkValues(justifySelfCenterUnsafe, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;center unsafe&quot;);
+    var justifySelfSelfEndSafe = document.getElementById(&quot;justifySelfSelfEndSafe&quot;);
+    checkValues(justifySelfSelfEndSafe, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;self-end safe&quot;);
+    var justifySelfSelfStartSafe = document.getElementById(&quot;justifySelfSelfStartSafe&quot;);
+    checkValues(justifySelfSelfStartSafe, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;self-start safe&quot;);
+    var justifySelfRightSafe = document.getElementById(&quot;justifySelfRightSafe&quot;);
+    checkValues(justifySelfRightSafe, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;right safe&quot;);
+    var justifySelfLeftUnsafe = document.getElementById(&quot;justifySelfLeftUnsafe&quot;);
+    checkValues(justifySelfLeftUnsafe, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;left unsafe&quot;);
+    var justifySelfFlexStartUnsafe = document.getElementById(&quot;justifySelfFlexStartUnsafe&quot;);
+    checkValues(justifySelfFlexStartUnsafe, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;flex-start unsafe&quot;);
+    var justifySelfFlexEndSafe = document.getElementById(&quot;justifySelfFlexEndSafe&quot;);
+    checkValues(justifySelfFlexEndSafe, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;flex-end safe&quot;);
+}, &quot;Test getting justify-self set through CSS.&quot;);
</ins><span class="cx"> 
</span><del>-var justifySelfLastBaseline = document.getElementById(&quot;justifySelfLastBaseline&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfLastBaseline, '').getPropertyValue('justify-self')&quot;, &quot;'last-baseline'&quot;);
</del><ins>+test(function() {
+    element = document.createElement(&quot;div&quot;);
+    document.body.appendChild(element);
+    checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;&quot;, &quot;normal&quot;);
+}, &quot;Test initial value of justify-self through JS&quot;);
</ins><span class="cx"> 
</span><del>-var justifySelfStretch = document.getElementById(&quot;justifySelfStretch&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfStretch, '').getPropertyValue('justify-self')&quot;, &quot;'stretch'&quot;);
</del><ins>+test(function() {
+    container = document.createElement(&quot;div&quot;);
+    element = document.createElement(&quot;div&quot;);
+    container.appendChild(element);
+    document.body.appendChild(container);
+    element.style.justifySelf = &quot;center&quot;;
+    checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;center&quot;, &quot;center&quot;);
</ins><span class="cx"> 
</span><del>-var justifySelfStart = document.getElementById(&quot;justifySelfStart&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfStart, '').getPropertyValue('justify-self')&quot;, &quot;'start'&quot;);
</del><ins>+    element.style.justifySelf = &quot;unsafe start&quot;;
+    checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;start unsafe&quot;, &quot;start unsafe&quot;);
</ins><span class="cx"> 
</span><del>-var justifySelfEnd = document.getElementById(&quot;justifySelfEnd&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfEnd, '').getPropertyValue('justify-self')&quot;, &quot;'end'&quot;);
</del><ins>+    element.style.justifySelf = &quot;flex-end safe&quot;;
+    checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;flex-end safe&quot;, &quot;flex-end safe&quot;);
</ins><span class="cx"> 
</span><del>-var justifySelfCenter = document.getElementById(&quot;justifySelfCenter&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfCenter, '').getPropertyValue('justify-self')&quot;, &quot;'center'&quot;);
</del><ins>+    element.style.justifySelf = &quot;right&quot;;
+    checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;right&quot;, &quot;right&quot;);
</ins><span class="cx"> 
</span><del>-var justifySelfSelfEnd = document.getElementById(&quot;justifySelfSelfEnd&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfSelfEnd, '').getPropertyValue('justify-self')&quot;, &quot;'self-end'&quot;);
</del><ins>+    element.style.justifySelf = &quot;center&quot;;
+    checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;center&quot;, &quot;center&quot;);
</ins><span class="cx"> 
</span><del>-var justifySelfSelfStart = document.getElementById(&quot;justifySelfSelfStart&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfSelfStart, '').getPropertyValue('justify-self')&quot;, &quot;'self-start'&quot;);
</del><ins>+    element.style.justifySelf = &quot;self-start&quot;;
+    checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;self-start&quot;, &quot;self-start&quot;);
</ins><span class="cx"> 
</span><del>-var justifySelfLeft = document.getElementById(&quot;justifySelfLeft&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfLeft, '').getPropertyValue('justify-self')&quot;, &quot;'left'&quot;);
</del><ins>+    element.style.justifySelf = &quot;auto&quot;;
+    checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;auto&quot;, &quot;normal&quot;);
</ins><span class="cx"> 
</span><del>-var justifySelfRight = document.getElementById(&quot;justifySelfRight&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfRight, '').getPropertyValue('justify-self')&quot;, &quot;'right'&quot;);
</del><ins>+    container.style.display = &quot;flex&quot;;
+    element.style.justifySelf = &quot;auto&quot;;
+    checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;auto&quot;, &quot;normal&quot;);
</ins><span class="cx"> 
</span><del>-var justifySelfFlexStart = document.getElementById(&quot;justifySelfFlexStart&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfFlexStart, '').getPropertyValue('justify-self')&quot;, &quot;'flex-start'&quot;);
</del><ins>+    container.style.display = &quot;grid&quot;;
+    element.style.justifySelf = &quot;auto&quot;;
+    checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;auto&quot;, &quot;normal&quot;);
</ins><span class="cx"> 
</span><del>-var justifySelfFlexEnd = document.getElementById(&quot;justifySelfFlexEnd&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfFlexEnd, '').getPropertyValue('justify-self')&quot;, &quot;'flex-end'&quot;);
</del><ins>+    element.style.justifySelf = &quot;self-end&quot;;
+    checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;self-end&quot;, &quot;self-end&quot;);
+}, &quot;Test getting and setting justify-self through JS&quot;);
</ins><span class="cx"> 
</span><del>-var justifySelfEndUnsafe = document.getElementById(&quot;justifySelfEndUnsafe&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfEndUnsafe, '').getPropertyValue('justify-self')&quot;, &quot;'end unsafe'&quot;);
</del><ins>+test(function() {
+    document.documentElement.style.justifySelf = &quot;auto&quot;;
+    checkValues(document.documentElement, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;auto&quot;, &quot;normal&quot;);
+}, &quot;Test 'auto' value resolution for the root node&quot;);
</ins><span class="cx"> 
</span><del>-var justifySelfCenterUnsafe = document.getElementById(&quot;justifySelfCenterUnsafe&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfCenterUnsafe, '').getPropertyValue('justify-self')&quot;, &quot;'center unsafe'&quot;);
</del><ins>+test(function() {
+    container = document.createElement(&quot;div&quot;);
+    element = document.createElement(&quot;div&quot;);
+    container.appendChild(element);
+    document.body.appendChild(container);
</ins><span class="cx"> 
</span><del>-var justifySelfSelfEndSafe = document.getElementById(&quot;justifySelfSelfEndSafe&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfSelfEndSafe, '').getPropertyValue('justify-self')&quot;, &quot;'self-end safe'&quot;);
</del><ins>+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;unsafe auto&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;auto safe&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;auto left&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;baseline safe&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;baseline center&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;stretch unsafe&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;stretch right&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;unsafe unsafe&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;unsafe safe&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;center start&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;stretch unsafe&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;safe stretch&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;baseline safe&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;unsafe baseline&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;unsafe safe left&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;unsafe left safe&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;left safe unsafe safe&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;legacy start&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;legacy end&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;legacy right unsafe&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;legacy auto&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;legacy stretch&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;legacy&quot;);
+    checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;legacy left right&quot;);
+}, &quot;Test bad combinations of justify-self&quot;);
</ins><span class="cx"> 
</span><del>-var justifySelfSelfStartSafe = document.getElementById(&quot;justifySelfSelfStartSafe&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfSelfStartSafe, '').getPropertyValue('justify-self')&quot;, &quot;'self-start safe'&quot;);
</del><ins>+test(function() {
+    container.style.display = &quot;&quot;;
+    checkInitialValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;center&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial'&quot;);
</ins><span class="cx"> 
</span><del>-var justifySelfRightSafe = document.getElementById(&quot;justifySelfRightSafe&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfRightSafe, '').getPropertyValue('justify-self')&quot;, &quot;'right safe'&quot;);
</del><ins>+test(function() {
+    container.style.display = &quot;grid&quot;;
+    checkInitialValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;left safe&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial' for grid containers&quot;);
</ins><span class="cx"> 
</span><del>-var justifySelfLeftUnsafe = document.getElementById(&quot;justifySelfLeftUnsafe&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfLeftUnsafe, '').getPropertyValue('justify-self')&quot;, &quot;'left unsafe'&quot;);
</del><ins>+test(function() {
+    container.style.display = &quot;flex&quot;;
+    checkInitialValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;right unsafe&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial' for flex containers&quot;);
</ins><span class="cx"> 
</span><del>-var justifySelfFlexStartUnsafe = document.getElementById(&quot;justifySelfFlexStartUnsafe&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfFlexStartUnsafe, '').getPropertyValue('justify-self')&quot;, &quot;'flex-start unsafe'&quot;);
</del><ins>+test(function() {
+    container.style.display = &quot;&quot;;
+    element.style.position = &quot;absolute&quot;;
+    checkInitialValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;left&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial' for positioned elements&quot;);
</ins><span class="cx"> 
</span><del>-var justifySelfFlexEndSafe = document.getElementById(&quot;justifySelfFlexEndSafe&quot;);
-shouldBe(&quot;getComputedStyle(justifySelfFlexEndSafe, '').getPropertyValue('justify-self')&quot;, &quot;'flex-end safe'&quot;);
</del><ins>+test(function() {
+    container.style.display = &quot;grid&quot;;
+    element.style.position = &quot;absolute&quot;;
+    checkInitialValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;right&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial' for positioned elements in grid containers&quot;);
</ins><span class="cx"> 
</span><del>-debug(&quot;&quot;);
-debug(&quot;Test initial value of justify-self through JS&quot;);
-element = document.createElement(&quot;div&quot;);
-document.body.appendChild(element);
-shouldBe(&quot;getComputedStyle(element, '').getPropertyValue('justify-self')&quot;, &quot;'normal'&quot;);
</del><ins>+test(function() {
+    container.style.display = &quot;flex&quot;;
+    element.style.position = &quot;absolute&quot;;
+    checkInitialValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;end&quot;, &quot;normal&quot;);
+}, &quot;Test the value 'initial' for positioned elements in grid containers&quot;);
</ins><span class="cx"> 
</span><del>-debug(&quot;&quot;);
-debug(&quot;Test getting and setting justify-self through JS&quot;);
-container = document.createElement(&quot;div&quot;);
-element = document.createElement(&quot;div&quot;);
-container.appendChild(element);
-document.body.appendChild(container);
-element.style.justifySelf = &quot;center&quot;;
-checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;center&quot;, &quot;center&quot;);
-
-element.style.justifySelf = &quot;unsafe start&quot;;
-checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;start unsafe&quot;, &quot;start unsafe&quot;);
-
-element.style.justifySelf = &quot;flex-end safe&quot;;
-checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;flex-end safe&quot;, &quot;flex-end safe&quot;);
-
-element.style.justifySelf = &quot;right&quot;;
-checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;right&quot;, &quot;right&quot;);
-
-element.style.justifySelf = &quot;center&quot;;
-checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;center&quot;, &quot;center&quot;);
-
-element.style.justifySelf = &quot;self-start&quot;;
-checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;self-start&quot;, &quot;self-start&quot;);
-
-element.style.justifySelf = &quot;auto&quot;;
-checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;auto&quot;, &quot;normal&quot;);
-
-container.style.display = &quot;flex&quot;;
-element.style.justifySelf = &quot;auto&quot;;
-checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;auto&quot;, &quot;normal&quot;);
-
-container.style.display = &quot;grid&quot;;
-element.style.justifySelf = &quot;auto&quot;;
-checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;auto&quot;, &quot;normal&quot;);
-
-element.style.justifySelf = &quot;self-end&quot;;
-checkValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;self-end&quot;, &quot;self-end&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test bad combinations of justify-self&quot;);
-container = document.createElement(&quot;div&quot;);
-element = document.createElement(&quot;div&quot;);
-container.appendChild(element);
-document.body.appendChild(container);
-
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;unsafe auto&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;auto safe&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;auto left&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;baseline safe&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;baseline center&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;stretch unsafe&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;stretch right&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;unsafe unsafe&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;unsafe safe&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;center start&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;stretch unsafe&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;safe stretch&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;baseline safe&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;unsafe baseline&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;unsafe safe left&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;unsafe left safe&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;left safe unsafe safe&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;legacy start&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;legacy end&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;legacy right unsafe&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;legacy auto&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;legacy stretch&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;legacy&quot;);
-checkBadValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;,  &quot;legacy left right&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial'&quot;);
-container.style.display = &quot;&quot;;
-checkInitialValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;center&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial' for grid containers&quot;);
-container.style.display = &quot;grid&quot;;
-checkInitialValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;left safe&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial' for flex containers&quot;);
-container.style.display = &quot;flex&quot;;
-checkInitialValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;right unsafe&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial' for positioned elements&quot;);
-container.style.display = &quot;&quot;;
-element.style.position = &quot;absolute&quot;;
-checkInitialValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;left&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial' for positioned elements in grid containers&quot;);
-container.style.display = &quot;grid&quot;;
-element.style.position = &quot;absolute&quot;;
-checkInitialValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;right&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'initial' for positioned elements in grid containers&quot;);
-container.style.display = &quot;flex&quot;;
-element.style.position = &quot;absolute&quot;;
-checkInitialValues(element, &quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;end&quot;, &quot;normal&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Test the value 'inherit'&quot;);
-checkInheritValues(&quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;end&quot;);
-checkInheritValues(&quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;left safe&quot;);
-checkInheritValues(&quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;center unsafe&quot;);
-
</del><ins>+test(function() {
+    checkInheritValues(&quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;end&quot;);
+    checkInheritValues(&quot;justifySelf&quot;, &quot;justify-self&quot;, &quot;left safe&quot;);
+    checkInheritValues(&quot;justifySelf&quot;, &quot;justify-self&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="trunkLayoutTestsfastcssresourcesalignmentparsingutilsthjsfromrev214563trunkLayoutTestscss3resourcesalignmentparsingutilsthjs"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/fast/css/resources/alignment-parsing-utils-th.js (from rev 214563, trunk/LayoutTests/css3/resources/alignment-parsing-utils-th.js) (0 => 214564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/resources/alignment-parsing-utils-th.js                                (rev 0)
+++ trunk/LayoutTests/fast/css/resources/alignment-parsing-utils-th.js        2017-03-29 22:01:11 UTC (rev 214564)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+function checkValues(element, property, propertyID, value, computedValue)
+{
+    window.element = element;
+    var elementID = element.id || &quot;element&quot;;
+    assert_equals(eval('element.style.' + property), value, property + ' specified value is not what it should.');
+    assert_equals(eval(&quot;window.getComputedStyle(&quot; + elementID + &quot;, '').getPropertyValue('&quot; + propertyID + &quot;')&quot;), computedValue, property + &quot; is not what is should.&quot;);
+}
+
+function checkBadValues(element, property, propertyID, value)
+{
+    var elementID = element.id || &quot;element&quot;;
+    var initialValue = eval(&quot;window.getComputedStyle(&quot; + elementID + &quot; , '').getPropertyValue('&quot; + propertyID + &quot;')&quot;);
+    element.style[property] = value;
+    checkValues(element, property, propertyID, &quot;&quot;, initialValue);
+}
+
+function checkInitialValues(element, property, propertyID, value, initial)
+{
+    element.style[property] = value;
+    checkValues(element, property, propertyID, value, value);
+    element.style[property] = &quot;initial&quot;;
+    checkValues(element, property, propertyID, &quot;initial&quot;, initial);
+}
+
+function checkInheritValues(property, propertyID, value)
+{
+    var parentElement = document.createElement(&quot;div&quot;);
+    document.body.appendChild(parentElement);
+    parentElement.style[property] = value;
+    checkValues(parentElement, property, propertyID, value, value);
+
+    var element = document.createElement(&quot;div&quot;);
+    parentElement.appendChild(element);
+    element.style[property] = &quot;inherit&quot;;
+    checkValues(element, property, propertyID, &quot;inherit&quot;, value);
+}
+
+function checkLegacyValues(property, propertyID, value)
+{
+    var parentElement = document.createElement(&quot;div&quot;);
+    document.body.appendChild(parentElement);
+    parentElement.style[property] = value;
+    checkValues(parentElement, property, propertyID, value, value);
+
+    var element = document.createElement(&quot;div&quot;);
+    parentElement.appendChild(element);
+    checkValues(element, property, propertyID, &quot;&quot;, value);
+}
+
+function checkSupportedValues(elementID, property)
+{
+    var value = eval(&quot;window.getComputedStyle(&quot; + elementID + &quot; , '').getPropertyValue('&quot; + property + &quot;')&quot;);
+    var value1 = eval(&quot;window.getComputedStyle(&quot; + elementID + &quot; , '')&quot;);
+    shouldBeTrue(&quot;CSS.supports('&quot; + property + &quot;', '&quot; + value + &quot;')&quot;);
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (214563 => 214564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-03-29 21:58:40 UTC (rev 214563)
+++ trunk/Source/WebCore/ChangeLog        2017-03-29 22:01:11 UTC (rev 214564)
</span><span class="lines">@@ -1,3 +1,35 @@
</span><ins>+2017-03-29  Javier Fernandez  &lt;jfernandez@igalia.com&gt;
+
+        [css-align] Adapt self-alignment properties to the new baseline syntax
+        https://bugs.webkit.org/show_bug.cgi?id=170235
+
+        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
+        self-alignment (align-self and justify-self) and default-alignment
+        (align-items and justify-items).
+
+        The content-distribution properties (align-content and justify-content)
+        will be updated in a follow up patch.
+
+        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::valueForItemPositionWithOverflowAlignment):
+        * css/CSSValueKeywords.in:
+        * css/StyleBuilderConverter.h:
+        (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData):
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::consumeBaselineKeyword):
+        (WebCore::consumeSelfPositionOverflowPosition):
+
</ins><span class="cx"> 2017-03-29  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Animated SVG images are not paused in pages loaded in the background
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (214563 => 214564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2017-03-29 21:58:40 UTC (rev 214563)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2017-03-29 22:01:11 UTC (rev 214564)
</span><span class="lines">@@ -2462,7 +2462,13 @@
</span><span class="cx">     auto result = CSSValueList::createSpaceSeparated();
</span><span class="cx">     if (data.positionType() == LegacyPosition)
</span><span class="cx">         result-&gt;append(cssValuePool.createIdentifierValue(CSSValueLegacy));
</span><del>-    result-&gt;append(cssValuePool.createValue(data.position()));
</del><ins>+    if (data.position() == ItemPositionBaseline)
+        result-&gt;append(cssValuePool.createIdentifierValue(CSSValueBaseline));
+    else if (data.position() == ItemPositionLastBaseline) {
+        result-&gt;append(cssValuePool.createIdentifierValue(CSSValueLast));
+        result-&gt;append(cssValuePool.createIdentifierValue(CSSValueBaseline));
+    } else
+        result-&gt;append(cssValuePool.createValue(data.position()));
</ins><span class="cx">     if (data.position() &gt;= ItemPositionCenter &amp;&amp; data.overflow() != OverflowAlignmentDefault)
</span><span class="cx">         result-&gt;append(cssValuePool.createValue(data.overflow()));
</span><span class="cx">     ASSERT(result-&gt;length() &lt;= 2);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueKeywordsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (214563 => 214564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueKeywords.in        2017-03-29 21:58:40 UTC (rev 214563)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in        2017-03-29 22:01:11 UTC (rev 214564)
</span><span class="lines">@@ -606,7 +606,8 @@
</span><span class="cx"> // auto
</span><span class="cx"> // stretch
</span><span class="cx"> // baseline
</span><del>-// last-baseline
</del><ins>+// last baseline
+// first baseline
</ins><span class="cx"> // center
</span><span class="cx"> // start
</span><span class="cx"> // end
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderConverterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (214563 => 214564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderConverter.h        2017-03-29 21:58:40 UTC (rev 214563)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h        2017-03-29 22:01:11 UTC (rev 214564)
</span><span class="lines">@@ -1361,6 +1361,10 @@
</span><span class="cx">         if (pairValue-&gt;first()-&gt;valueID() == CSSValueLegacy) {
</span><span class="cx">             alignmentData.setPositionType(LegacyPosition);
</span><span class="cx">             alignmentData.setPosition(*pairValue-&gt;second());
</span><ins>+        } else if (pairValue-&gt;first()-&gt;valueID() == CSSValueFirst) {
+            alignmentData.setPosition(ItemPositionBaseline);
+        } else if (pairValue-&gt;first()-&gt;valueID() == CSSValueLast) {
+            alignmentData.setPosition(ItemPositionLastBaseline);
</ins><span class="cx">         } else {
</span><span class="cx">             alignmentData.setPosition(*pairValue-&gt;first());
</span><span class="cx">             alignmentData.setOverflow(*pairValue-&gt;second());
</span></span></pre></div>
<a id="trunkSourceWebCorecssparserCSSPropertyParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (214563 => 214564)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2017-03-29 21:58:40 UTC (rev 214563)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp        2017-03-29 22:01:11 UTC (rev 214564)
</span><span class="lines">@@ -3017,11 +3017,27 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+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; consumeSelfPositionOverflowPosition(CSSParserTokenRange&amp; range)
</span><span class="cx"> {
</span><del>-    if (identMatches&lt;CSSValueAuto, CSSValueNormal, CSSValueStretch, CSSValueBaseline, CSSValueLastBaseline&gt;(range.peek().id()))
</del><ins>+    if (identMatches&lt;CSSValueAuto, CSSValueNormal, CSSValueStretch&gt;(range.peek().id()))
</ins><span class="cx">         return consumeIdent(range);
</span><span class="cx"> 
</span><ins>+    if (identMatches&lt;CSSValueFirst, CSSValueLast, CSSValueBaseline&gt;(range.peek().id()))
+        return consumeBaselineKeyword(range);
+
</ins><span class="cx">     RefPtr&lt;CSSPrimitiveValue&gt; overflowPosition = consumeIdent&lt;CSSValueUnsafe, CSSValueSafe&gt;(range);
</span><span class="cx">     RefPtr&lt;CSSPrimitiveValue&gt; selfPosition = consumeSelfPositionKeyword(range);
</span><span class="cx">     if (!selfPosition)
</span></span></pre>
</div>
</div>

</body>
</html>