<!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>[183748] 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/183748">183748</a></dd>
<dt>Author</dt> <dd>jfernandez@igalia.com</dd>
<dt>Date</dt> <dd>2015-05-04 10:25:21 -0700 (Mon, 04 May 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>[CSS Box Alignment] Upgrade justify-content parsing to CSS3 Box Alignment spec.
https://bugs.webkit.org/show_bug.cgi?id=144442

Reviewed by David Hyatt.

Upgrade the justify-content property to the last CSS3 Box
Alignment specification. It defines a different enumeration for
Positional and Distribution alignment, which requires changes in
the FlexibleBox implementation.

Source/WebCore:

A new parsing function has been implemented to replace the basic
keyword IDs validation. Because of the complexity of the new
values, a new CSSPrimitiveValue derived class has been defined
which simplifies considerably the parsing logic.

We will follow the same approach than for Self Alignment, defining
a single class to hold all the related alignment data. This makes
possible to use a StyleBuilderConverter function instead of custom
builder functions for these properties.

Test: css3/parse-justify-content.html

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::resolveContentAlignmentAuto):
(WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
(WebCore::ComputedStyleExtractor::propertyValue):
(WebCore::valueForItemPositionWithOverflowAlignment): Deleted.
* css/CSSContentDistributionValue.cpp: Added.
(WebCore::CSSContentDistributionValue::CSSContentDistributionValue):
(WebCore::CSSContentDistributionValue::~CSSContentDistributionValue):
(WebCore::CSSContentDistributionValue::customCSSText):
(WebCore::CSSContentDistributionValue::equals):
* css/CSSContentDistributionValue.h: Added.
(WebCore::CSSContentDistributionValue::create):
(WebCore::CSSContentDistributionValue::distribution):
(WebCore::CSSContentDistributionValue::position):
(WebCore::CSSContentDistributionValue::overflow):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
(WebCore::isContentDistributionKeyword):
(WebCore::isContentPositionKeyword):
(WebCore::isAlignmentOverflowKeyword):
(WebCore::CSSParser::parseContentDistributionOverflowPosition):
(WebCore::CSSParser::parseItemPositionOverflowPosition):
(WebCore::CSSParser::parseLegacyPosition): Deleted.
* css/CSSParser.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ContentPosition):
(WebCore::CSSPrimitiveValue::operator ContentDistributionType):
(WebCore::CSSPrimitiveValue::operator EFlexDirection): Deleted.
* css/CSSPropertyNames.in:
* css/CSSValue.cpp:
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isContentDistributionValue):
(WebCore::CSSValue::isWebKitCSSFilterValue): Deleted.
* css/CSSValueKeywords.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertContentAlignmentData):
(WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): Deleted.
* rendering/RenderFlexibleBox.cpp:
(WebCore::initialJustifyContentOffset):
(WebCore::justifyContentSpaceBetweenChildren):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::layoutColumnReverse):
* rendering/RenderFullScreen.cpp:
(WebCore::createFullScreenStyle):
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
(WebCore::RenderMathMLScripts::fixAnonymousStyles):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleContentAlignmentData.h: Added.
(WebCore::StyleContentAlignmentData::StyleContentAlignmentData):
(WebCore::StyleContentAlignmentData::setPosition):
(WebCore::StyleContentAlignmentData::setDistribution):
(WebCore::StyleContentAlignmentData::setOverflow):
(WebCore::StyleContentAlignmentData::position):
(WebCore::StyleContentAlignmentData::distribution):
(WebCore::StyleContentAlignmentData::overflow):
(WebCore::StyleContentAlignmentData::operator==):
(WebCore::StyleContentAlignmentData::operator!=):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:

LayoutTests:

Some minor changes in some Flexbox related test cases for adapting
them to the new parsing logic. New layout tests, not Flexbox
specific, to verify the parsing of the new values.

* css3/flexbox/css-properties.html:
* css3/parse-justify-content-expected.txt: Added.
* css3/parse-justify-content.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscss3flexboxcsspropertieshtml">trunk/LayoutTests/css3/flexbox/css-properties.html</a></li>
<li><a href="#trunkLayoutTestsfastcssgetComputedStylecomputedstyleexpectedtxt">trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgetComputedStylecomputedstylewithoutrendererexpectedtxt">trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcssgetComputedStylebasicexpectedtxt">trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorecssCSSAllInOnecpp">trunk/Source/WebCore/css/CSSAllInOne.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParserh">trunk/Source/WebCore/css/CSSParser.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValueMappingsh">trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSPropertyNamesin">trunk/Source/WebCore/css/CSSPropertyNames.in</a></li>
<li><a href="#trunkSourceWebCorecssCSSValuecpp">trunk/Source/WebCore/css/CSSValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueh">trunk/Source/WebCore/css/CSSValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueKeywordsin">trunk/Source/WebCore/css/CSSValueKeywords.in</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderConverterh">trunk/Source/WebCore/css/StyleBuilderConverter.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderFlexibleBoxcpp">trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderFullScreencpp">trunk/Source/WebCore/rendering/RenderFullScreen.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLScriptscpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleh">trunk/Source/WebCore/rendering/style/RenderStyle.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleConstantsh">trunk/Source/WebCore/rendering/style/RenderStyleConstants.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatacpp">trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatah">trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestscss3parsejustifycontentexpectedtxt">trunk/LayoutTests/css3/parse-justify-content-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3parsejustifycontenthtml">trunk/LayoutTests/css3/parse-justify-content.html</a></li>
<li><a href="#trunkSourceWebCorecssCSSContentDistributionValuecpp">trunk/Source/WebCore/css/CSSContentDistributionValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSContentDistributionValueh">trunk/Source/WebCore/css/CSSContentDistributionValue.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleContentAlignmentDatah">trunk/Source/WebCore/rendering/style/StyleContentAlignmentData.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/LayoutTests/ChangeLog        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2015-05-04  Javier Fernandez  &lt;jfernandez@igalia.com&gt;
+
+        [CSS Box Alignment] Upgrade justify-content parsing to CSS3 Box Alignment spec.
+        https://bugs.webkit.org/show_bug.cgi?id=144442
+
+        Reviewed by David Hyatt.
+
+        Upgrade the justify-content property to the last CSS3 Box
+        Alignment specification. It defines a different enumeration for
+        Positional and Distribution alignment, which requires changes in
+        the FlexibleBox implementation.
+
+        Some minor changes in some Flexbox related test cases for adapting
+        them to the new parsing logic. New layout tests, not Flexbox
+        specific, to verify the parsing of the new values.
+
+        * css3/flexbox/css-properties.html:
+        * css3/parse-justify-content-expected.txt: Added.
+        * css3/parse-justify-content.html: Added.
+
</ins><span class="cx"> 2015-05-04  Manuel Rego Casasnovas  &lt;rego@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [CSS Grid Layout] Wrong computed style for named grid lines in implicit tracks
</span></span></pre></div>
<a id="trunkLayoutTestscss3flexboxcsspropertieshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/flexbox/css-properties.html (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/flexbox/css-properties.html        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/LayoutTests/css3/flexbox/css-properties.html        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -51,6 +51,8 @@
</span><span class="cx"> shouldBeEqualToString('flexitem.style.webkitOrder', '');
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+flexbox.style.display = '-webkit-flex';
+
</ins><span class="cx"> shouldBeEqualToString('flexbox.style.webkitJustifyContent', '');
</span><span class="cx"> // The initial value is 'flex-start'.
</span><span class="cx"> shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitJustifyContent', 'flex-start');
</span><span class="lines">@@ -78,8 +80,6 @@
</span><span class="cx"> shouldBeEqualToString('flexbox.style.webkitJustifyContent', '');
</span><span class="cx"> shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitJustifyContent', 'flex-start');
</span><span class="cx"> 
</span><del>-flexbox.style.display = '-webkit-flex';
-
</del><span class="cx"> shouldBeEqualToString('flexbox.style.webkitAlignSelf', '');
</span><span class="cx"> // The initial value is 'auto', which will be resolved depending on parent's style (except for the 'document' element).
</span><span class="cx"> shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', 'start');
</span></span></pre></div>
<a id="trunkLayoutTestscss3parsejustifycontentexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/parse-justify-content-expected.txt (0 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/parse-justify-content-expected.txt                                (rev 0)
+++ trunk/LayoutTests/css3/parse-justify-content-expected.txt        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -0,0 +1,142 @@
</span><ins>+Test that setting and getting justify-content works as expected
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Test getting justify-content set through CSS
+PASS getComputedStyle(justifyContentAuto, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS getComputedStyle(justifyContentBaseline, '').getPropertyValue('justify-content') is &quot;baseline&quot;
+PASS getComputedStyle(justifyContentLastBaseline, '').getPropertyValue('justify-content') is &quot;last-baseline&quot;
+PASS getComputedStyle(justifyContentSpaceBetween, '').getPropertyValue('justify-content') is &quot;space-between&quot;
+PASS getComputedStyle(justifyContentSpaceAround, '').getPropertyValue('justify-content') is &quot;space-around&quot;
+PASS getComputedStyle(justifyContentSpaceEvenly, '').getPropertyValue('justify-content') is &quot;space-evenly&quot;
+PASS getComputedStyle(justifyContentStretch, '').getPropertyValue('justify-content') is &quot;stretch&quot;
+PASS getComputedStyle(justifyContentStart, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS getComputedStyle(justifyContentEnd, '').getPropertyValue('justify-content') is &quot;end&quot;
+PASS getComputedStyle(justifyContentCenter, '').getPropertyValue('justify-content') is &quot;center&quot;
+PASS getComputedStyle(justifyContentLeft, '').getPropertyValue('justify-content') is &quot;left&quot;
+PASS getComputedStyle(justifyContentRight, '').getPropertyValue('justify-content') is &quot;right&quot;
+PASS getComputedStyle(justifyContentFlexStart, '').getPropertyValue('justify-content') is &quot;flex-start&quot;
+PASS getComputedStyle(justifyContentFlexEnd, '').getPropertyValue('justify-content') is &quot;flex-end&quot;
+PASS getComputedStyle(justifyContentEndTrue, '').getPropertyValue('justify-content') is &quot;end true&quot;
+PASS getComputedStyle(justifyContentCenterTrue, '').getPropertyValue('justify-content') is &quot;center true&quot;
+PASS getComputedStyle(justifyContentRightSafe, '').getPropertyValue('justify-content') is &quot;right safe&quot;
+PASS getComputedStyle(justifyContentLeftTrue, '').getPropertyValue('justify-content') is &quot;left true&quot;
+PASS getComputedStyle(justifyContentFlexStartTrue, '').getPropertyValue('justify-content') is &quot;flex-start true&quot;
+PASS getComputedStyle(justifyContentFlexEndSafe, '').getPropertyValue('justify-content') is &quot;flex-end safe&quot;
+PASS getComputedStyle(justifyContentSpaceBetweenLeft, '').getPropertyValue('justify-content') is &quot;space-between left&quot;
+PASS getComputedStyle(justifyContentSpaceAroundCenter, '').getPropertyValue('justify-content') is &quot;space-around center&quot;
+PASS getComputedStyle(justifyContentSpaceEvenlyRight, '').getPropertyValue('justify-content') is &quot;space-evenly right&quot;
+PASS getComputedStyle(justifyContentStretchStartSafe, '').getPropertyValue('justify-content') is &quot;stretch start safe&quot;
+PASS getComputedStyle(justifyContentSpaceAroundEndTrue, '').getPropertyValue('justify-content') is &quot;space-around end true&quot;
+PASS getComputedStyle(justifyContentSpaceEvenlyFlexStartSafe, '').getPropertyValue('justify-content') is &quot;space-evenly flex-start safe&quot;
+PASS getComputedStyle(justifyContentSpaceBetweenSafe, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS getComputedStyle(justifyContentSpaceBetweenStretch, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS getComputedStyle(justifyContentSafe, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS getComputedStyle(justifyContentRightSafeTrue, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS getComputedStyle(justifyContentCenterLeft, '').getPropertyValue('justify-content') is &quot;start&quot;
+
+Test initial value of justify-content through JS
+PASS getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+
+Test getting and setting justify-content through JS
+PASS element.style.justifyContent is &quot;center&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;center&quot;
+PASS element.style.justifyContent is &quot;start true&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start true&quot;
+PASS element.style.justifyContent is &quot;flex-end safe&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;flex-end safe&quot;
+PASS element.style.justifyContent is &quot;space-between right safe&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;space-between right safe&quot;
+PASS element.style.justifyContent is &quot;stretch center&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;stretch center&quot;
+PASS element.style.justifyContent is &quot;right true&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;right true&quot;
+PASS element.style.justifyContent is &quot;auto&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;auto&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;flex-start&quot;
+PASS element.style.justifyContent is &quot;auto&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;flex-end&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;flex-end&quot;
+
+Test bad combinations of justify-content
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+PASS element.style.justifyContent is &quot;&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+
+Test the value 'initial'
+PASS element.style.justifyContent is &quot;stretch center&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;stretch center&quot;
+PASS element.style.justifyContent is &quot;initial&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+
+Test the value 'initial' for grid containers
+PASS element.style.justifyContent is &quot;space-between left&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;space-between left&quot;
+PASS element.style.justifyContent is &quot;initial&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;start&quot;
+
+Test the value 'initial' for flex containers
+PASS element.style.justifyContent is &quot;right true&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;right true&quot;
+PASS element.style.justifyContent is &quot;initial&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;flex-start&quot;
+
+Test the value 'inherit'
+PASS element.style.justifyContent is &quot;end&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;end&quot;
+PASS element.style.justifyContent is &quot;inherit&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;end&quot;
+PASS element.style.justifyContent is &quot;left safe&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;left safe&quot;
+PASS element.style.justifyContent is &quot;inherit&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;left safe&quot;
+PASS element.style.justifyContent is &quot;stretch center&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;stretch center&quot;
+PASS element.style.justifyContent is &quot;inherit&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('justify-content') is &quot;stretch center&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscss3parsejustifycontenthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/parse-justify-content.html (0 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/parse-justify-content.html                                (rev 0)
+++ trunk/LayoutTests/css3/parse-justify-content.html        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -0,0 +1,356 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+#justifyContentAuto {
+    justify-content: auto;
+}
+
+#justifyContentBaseline {
+    justify-content: baseline;
+}
+
+#justifyContentLastBaseline {
+    justify-content: last-baseline;
+}
+
+#justifyContentSpaceBetween {
+    justify-content: space-between;
+}
+
+#justifyContentSpaceAround {
+    justify-content: space-around;
+}
+
+#justifyContentSpaceEvenly {
+    justify-content: space-evenly;
+}
+
+#justifyContentStretch {
+    justify-content: stretch;
+}
+
+#justifyContentStart {
+    justify-content: start;
+}
+
+#justifyContentEnd {
+    justify-content: end;
+}
+
+#justifyContentCenter {
+    justify-content: center;
+}
+
+#justifyContentLeft {
+    justify-content: left;
+}
+
+#justifyContentRight {
+    justify-content: right;
+}
+
+#justifyContentFlexStart {
+    justify-content: flex-start;
+}
+
+#justifyContentFlexEnd {
+    justify-content: flex-end;
+}
+
+#justifyContentEndTrue {
+    justify-content: end true;
+}
+
+#justifyContentCenterTrue {
+    justify-content: center true;
+}
+
+#justifyContentRightSafe {
+    justify-content: right safe;
+}
+
+#justifyContentLeftTrue {
+    justify-content: left true;
+}
+
+#justifyContentFlexStartTrue {
+    justify-content: flex-start true;
+}
+
+#justifyContentFlexEndSafe {
+    justify-content: flex-end safe;
+}
+
+#justifyContentSpaceBetweenLeft {
+    justify-content: space-between left;
+}
+
+#justifyContentSpaceAroundCenter {
+    justify-content: space-around center;
+}
+
+#justifyContentSpaceEvenlyRight {
+    justify-content: space-evenly right;
+}
+
+#justifyContentStretchStartSafe {
+    justify-content: stretch start safe;
+}
+
+#justifyContentSpaceAroundEndTrue {
+    justify-content: space-around end true;
+}
+
+#justifyContentSpaceEvenlyFlexStartSafe {
+    justify-content: space-evenly flex-start safe;
+}
+
+&lt;!-- Invalid CSS cases --&gt;
+#justifyContentSpaceBetweenSafe {
+    justify-content: space-between safe;
+}
+
+#justifyContentSpaceBetweenStretch {
+    justify-content: space-between stretch;
+}
+
+#justifyContentSafe {
+    justify-content: safe;
+}
+
+#justifyContentRightSafeTrue {
+    justify-content: right safe true;
+}
+
+#justifyContentCenterLeft {
+    justify-content: center left;
+}
+&lt;/style&gt;
+&lt;script src=&quot;../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;justifyContentAuto&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentBaseline&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentLastBaseline&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentSpaceBetween&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentSpaceAround&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentSpaceEvenly&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentStretch&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentStart&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentEnd&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentCenter&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentLeft&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentRight&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentFlexStart&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentFlexEnd&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentEndTrue&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentCenterTrue&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentRightSafe&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentLeftTrue&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentFlexStartTrue&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentFlexEndSafe&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentSpaceBetweenLeft&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentSpaceAroundCenter&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentSpaceEvenlyRight&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentStretchStartSafe&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentSpaceAroundEndTrue&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentSpaceEvenlyFlexStartSafe&quot;&gt;&lt;/div&gt;
+
+&lt;div id=&quot;justifyContentSpaceBetweenSafe&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentSpaceBetweenStretch&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentSafe&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentRightSafeTrue&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;justifyContentCenterLeft&quot;&gt;&lt;/div&gt;
+
+&lt;script src=&quot;resources/alignment-parsing-utils.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+description('Test that setting and getting justify-content works as expected');
+
+debug(&quot;Test getting justify-content set through CSS&quot;);
+var justifyContentAuto = document.getElementById(&quot;justifyContentAuto&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentAuto, '').getPropertyValue('justify-content')&quot;, &quot;start&quot;);
+
+var justifyContentBaseline = document.getElementById(&quot;justifyContentBaseline&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentBaseline, '').getPropertyValue('justify-content')&quot;, &quot;baseline&quot;);
+
+var justifyContentLastBaseline = document.getElementById(&quot;justifyContentLastBaseline&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentLastBaseline, '').getPropertyValue('justify-content')&quot;, &quot;last-baseline&quot;);
+
+var justifyContentSpaceBetween = document.getElementById(&quot;justifyContentSpaceBetween&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceBetween, '').getPropertyValue('justify-content')&quot;, &quot;space-between&quot;);
+
+var justifyContentSpaceAround = document.getElementById(&quot;justifyContentSpaceAround&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceAround, '').getPropertyValue('justify-content')&quot;, &quot;space-around&quot;);
+
+var justifyContentSpaceEvenly = document.getElementById(&quot;justifyContentSpaceEvenly&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceEvenly, '').getPropertyValue('justify-content')&quot;, &quot;space-evenly&quot;);
+
+var justifyContentStretch = document.getElementById(&quot;justifyContentStretch&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentStretch, '').getPropertyValue('justify-content')&quot;, &quot;stretch&quot;);
+
+var justifyContentStart = document.getElementById(&quot;justifyContentStart&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentStart, '').getPropertyValue('justify-content')&quot;, &quot;start&quot;);
+
+var justifyContentEnd = document.getElementById(&quot;justifyContentEnd&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentEnd, '').getPropertyValue('justify-content')&quot;, &quot;end&quot;);
+
+var justifyContentCenter = document.getElementById(&quot;justifyContentCenter&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentCenter, '').getPropertyValue('justify-content')&quot;, &quot;center&quot;);
+
+var justifyContentLeft = document.getElementById(&quot;justifyContentLeft&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentLeft, '').getPropertyValue('justify-content')&quot;, &quot;left&quot;);
+
+var justifyContentRight = document.getElementById(&quot;justifyContentRight&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentRight, '').getPropertyValue('justify-content')&quot;, &quot;right&quot;);
+
+var justifyContentFlexStart = document.getElementById(&quot;justifyContentFlexStart&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentFlexStart, '').getPropertyValue('justify-content')&quot;, &quot;flex-start&quot;);
+
+var justifyContentFlexEnd = document.getElementById(&quot;justifyContentFlexEnd&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentFlexEnd, '').getPropertyValue('justify-content')&quot;, &quot;flex-end&quot;);
+
+var justifyContentEndTrue = document.getElementById(&quot;justifyContentEndTrue&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentEndTrue, '').getPropertyValue('justify-content')&quot;, &quot;end true&quot;);
+
+var justifyContentCenterTrue = document.getElementById(&quot;justifyContentCenterTrue&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentCenterTrue, '').getPropertyValue('justify-content')&quot;, &quot;center true&quot;);
+
+var justifyContentRightSafe = document.getElementById(&quot;justifyContentRightSafe&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentRightSafe, '').getPropertyValue('justify-content')&quot;, &quot;right safe&quot;);
+
+var justifyContentLeftTrue = document.getElementById(&quot;justifyContentLeftTrue&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentLeftTrue, '').getPropertyValue('justify-content')&quot;, &quot;left true&quot;);
+
+var justifyContentFlexStartTrue = document.getElementById(&quot;justifyContentFlexStartTrue&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentFlexStartTrue, '').getPropertyValue('justify-content')&quot;, &quot;flex-start true&quot;);
+
+var justifyContentFlexEndSafe = document.getElementById(&quot;justifyContentFlexEndSafe&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentFlexEndSafe, '').getPropertyValue('justify-content')&quot;, &quot;flex-end safe&quot;);
+
+var justifyContentSpaceBetweenLeft = document.getElementById(&quot;justifyContentSpaceBetweenLeft&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceBetweenLeft, '').getPropertyValue('justify-content')&quot;, &quot;space-between left&quot;);
+
+var justifyContentSpaceAroundCenter = document.getElementById(&quot;justifyContentSpaceAroundCenter&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceAroundCenter, '').getPropertyValue('justify-content')&quot;, &quot;space-around center&quot;);
+
+var justifyContentSpaceEvenlyRight = document.getElementById(&quot;justifyContentSpaceEvenlyRight&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceEvenlyRight, '').getPropertyValue('justify-content')&quot;, &quot;space-evenly right&quot;);
+
+var justifyContentStretchStartSafe = document.getElementById(&quot;justifyContentStretchStartSafe&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentStretchStartSafe, '').getPropertyValue('justify-content')&quot;, &quot;stretch start safe&quot;);
+
+var justifyContentSpaceAroundEndTrue = document.getElementById(&quot;justifyContentSpaceAroundEndTrue&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceAroundEndTrue, '').getPropertyValue('justify-content')&quot;, &quot;space-around end true&quot;);
+
+var justifyContentSpaceEvenlyFlexStartSafe = document.getElementById(&quot;justifyContentSpaceEvenlyFlexStartSafe&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceEvenlyFlexStartSafe, '').getPropertyValue('justify-content')&quot;, &quot;space-evenly flex-start safe&quot;);
+
+var justifyContentSpaceBetweenSafe = document.getElementById(&quot;justifyContentSpaceBetweenSafe&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceBetweenSafe, '').getPropertyValue('justify-content')&quot;, &quot;start&quot;);
+
+var justifyContentSpaceAroundTrue = document.getElementById(&quot;justifyContentSpaceBetweenStretch&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentSpaceBetweenStretch, '').getPropertyValue('justify-content')&quot;, &quot;start&quot;);
+
+var justifyContentSpaceAroundTrue = document.getElementById(&quot;justifyContentSafe&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentSafe, '').getPropertyValue('justify-content')&quot;, &quot;start&quot;);
+
+var justifyContentSpaceAroundTrue = document.getElementById(&quot;justifyContentRightSafeTrue&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentRightSafeTrue, '').getPropertyValue('justify-content')&quot;, &quot;start&quot;);
+
+var justifyContentSpaceAroundTrue = document.getElementById(&quot;justifyContentCenterLeft&quot;);
+shouldBeEqualToString(&quot;getComputedStyle(justifyContentCenterLeft, '').getPropertyValue('justify-content')&quot;, &quot;start&quot;);
+
+debug(&quot;&quot;);
+debug(&quot;Test initial value of justify-content through JS&quot;);
+element = document.createElement(&quot;div&quot;);
+document.body.appendChild(element);
+shouldBeEqualToString(&quot;getComputedStyle(element, '').getPropertyValue('justify-content')&quot;, &quot;start&quot;);
+
+debug(&quot;&quot;);
+debug(&quot;Test getting and setting justify-content through JS&quot;);
+element = document.createElement(&quot;div&quot;);
+document.body.appendChild(element);
+element.style.justifyContent = &quot;center&quot;;
+checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;center&quot;, &quot;center&quot;);
+
+element.style.justifyContent = &quot;true start&quot;;
+checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;start true&quot;, &quot;start true&quot;);
+
+element.style.justifyContent = &quot;flex-end safe&quot;;
+checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;flex-end safe&quot;, &quot;flex-end safe&quot;);
+
+element.style.justifyContent = &quot;space-between right safe&quot;;
+checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;space-between right safe&quot;, &quot;space-between right safe&quot;);
+
+element.style.justifyContent = &quot;center stretch&quot;;
+checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;stretch center&quot;, &quot;stretch center&quot;);
+
+element.style.justifyContent = &quot;right true&quot;;
+checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;right true&quot;, &quot;right true&quot;);
+
+element.style.justifyContent = &quot;auto&quot;;
+checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;auto&quot;, &quot;start&quot;);
+
+element.style.display = &quot;-webkit-flex&quot;;
+element.style.justifyContent = &quot;auto&quot;;
+checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;auto&quot;, &quot;flex-start&quot;);
+
+element.style.display = &quot;-webkit-grid&quot;;
+element.style.justifyContent = &quot;auto&quot;;
+checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;auto&quot;, &quot;start&quot;);
+
+element.style.justifyContent = &quot;flex-end&quot;;
+checkValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;flex-end&quot;, &quot;flex-end&quot;);
+
+debug(&quot;&quot;);
+debug(&quot;Test bad combinations of justify-content&quot;);
+element = document.createElement(&quot;div&quot;);
+document.body.appendChild(element);
+
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;true auto&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;auto safe&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;auto left&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;baseline safe&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;last baseline center&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;true true&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;true safe&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;center start&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;baseline safe&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;true baseline&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;true safe left&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;true left safe&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;left safe true safe&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;start right space-between&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;safe stretch&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;space-around stretch&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;end space-between start&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;right safe left&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;true&quot;);
+checkBadValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;,  &quot;safe&quot;);
+
+debug(&quot;&quot;);
+debug(&quot;Test the value 'initial'&quot;);
+element.style.display = &quot;&quot;;
+checkInitialValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;stretch center&quot;, &quot;start&quot;);
+
+debug(&quot;&quot;);
+debug(&quot;Test the value 'initial' for grid containers&quot;);
+element.style.display = &quot;-webkit-grid&quot;;
+checkInitialValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;space-between left&quot;, &quot;start&quot;);
+
+debug(&quot;&quot;);
+debug(&quot;Test the value 'initial' for flex containers&quot;);
+element.style.display = &quot;-webkit-flex&quot;;
+checkInitialValues(element, &quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;right true&quot;, &quot;flex-start&quot;);
+
+debug(&quot;&quot;);
+debug(&quot;Test the value 'inherit'&quot;);
+checkInheritValues(&quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;end&quot;);
+checkInheritValues(&quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;left safe&quot;);
+checkInheritValues(&quot;justifyContent&quot;, &quot;justify-content&quot;, &quot;stretch center&quot;);
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssgetComputedStylecomputedstyleexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -151,7 +151,7 @@
</span><span class="cx"> align-self: start;
</span><span class="cx"> flex-direction: row;
</span><span class="cx"> flex-wrap: nowrap;
</span><del>-justify-content: flex-start;
</del><ins>+justify-content: start;
</ins><span class="cx"> justify-self: start;
</span><span class="cx"> justify-items: start;
</span><span class="cx"> -webkit-font-kerning: auto;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgetComputedStylecomputedstylewithoutrendererexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -150,7 +150,7 @@
</span><span class="cx"> align-self: auto
</span><span class="cx"> flex-direction: row
</span><span class="cx"> flex-wrap: nowrap
</span><del>-justify-content: flex-start
</del><ins>+justify-content: auto
</ins><span class="cx"> justify-self: auto
</span><span class="cx"> justify-items: auto
</span><span class="cx"> -webkit-font-kerning: auto
</span></span></pre></div>
<a id="trunkLayoutTestssvgcssgetComputedStylebasicexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -300,8 +300,8 @@
</span><span class="cx"> rect: style.getPropertyCSSValue(flex-direction) : [object CSSPrimitiveValue]
</span><span class="cx"> rect: style.getPropertyValue(flex-wrap) : nowrap
</span><span class="cx"> rect: style.getPropertyCSSValue(flex-wrap) : [object CSSPrimitiveValue]
</span><del>-rect: style.getPropertyValue(justify-content) : flex-start
-rect: style.getPropertyCSSValue(justify-content) : [object CSSPrimitiveValue]
</del><ins>+rect: style.getPropertyValue(justify-content) : start
+rect: style.getPropertyCSSValue(justify-content) : [object CSSValueList]
</ins><span class="cx"> rect: style.getPropertyValue(justify-self) : start
</span><span class="cx"> rect: style.getPropertyCSSValue(justify-self) : [object CSSValueList]
</span><span class="cx"> rect: style.getPropertyValue(justify-items) : start
</span><span class="lines">@@ -818,8 +818,8 @@
</span><span class="cx"> g: style.getPropertyCSSValue(flex-direction) : [object CSSPrimitiveValue]
</span><span class="cx"> g: style.getPropertyValue(flex-wrap) : nowrap
</span><span class="cx"> g: style.getPropertyCSSValue(flex-wrap) : [object CSSPrimitiveValue]
</span><del>-g: style.getPropertyValue(justify-content) : flex-start
-g: style.getPropertyCSSValue(justify-content) : [object CSSPrimitiveValue]
</del><ins>+g: style.getPropertyValue(justify-content) : start
+g: style.getPropertyCSSValue(justify-content) : [object CSSValueList]
</ins><span class="cx"> g: style.getPropertyValue(justify-self) : start
</span><span class="cx"> g: style.getPropertyCSSValue(justify-self) : [object CSSValueList]
</span><span class="cx"> g: style.getPropertyValue(justify-items) : start
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -1241,6 +1241,7 @@
</span><span class="cx">     css/CSSCanvasValue.cpp
</span><span class="cx">     css/CSSCharsetRule.cpp
</span><span class="cx">     css/CSSComputedStyleDeclaration.cpp
</span><ins>+    css/CSSContentDistributionValue.cpp
</ins><span class="cx">     css/CSSCrossfadeValue.cpp
</span><span class="cx">     css/CSSCursorImageValue.cpp
</span><span class="cx">     css/CSSDefaultStyleSheets.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/ChangeLog        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -1,3 +1,99 @@
</span><ins>+2015-05-04  Javier Fernandez  &lt;jfernandez@igalia.com&gt;
+
+        [CSS Box Alignment] Upgrade justify-content parsing to CSS3 Box Alignment spec.
+        https://bugs.webkit.org/show_bug.cgi?id=144442
+
+        Reviewed by David Hyatt.
+
+        Upgrade the justify-content property to the last CSS3 Box
+        Alignment specification. It defines a different enumeration for
+        Positional and Distribution alignment, which requires changes in
+        the FlexibleBox implementation.
+
+        A new parsing function has been implemented to replace the basic
+        keyword IDs validation. Because of the complexity of the new
+        values, a new CSSPrimitiveValue derived class has been defined
+        which simplifies considerably the parsing logic.
+
+        We will follow the same approach than for Self Alignment, defining
+        a single class to hold all the related alignment data. This makes
+        possible to use a StyleBuilderConverter function instead of custom
+        builder functions for these properties.
+
+        Test: css3/parse-justify-content.html
+
+        * CMakeLists.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::resolveContentAlignmentAuto):
+        (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
+        (WebCore::ComputedStyleExtractor::propertyValue):
+        (WebCore::valueForItemPositionWithOverflowAlignment): Deleted.
+        * css/CSSContentDistributionValue.cpp: Added.
+        (WebCore::CSSContentDistributionValue::CSSContentDistributionValue):
+        (WebCore::CSSContentDistributionValue::~CSSContentDistributionValue):
+        (WebCore::CSSContentDistributionValue::customCSSText):
+        (WebCore::CSSContentDistributionValue::equals):
+        * css/CSSContentDistributionValue.h: Added.
+        (WebCore::CSSContentDistributionValue::create):
+        (WebCore::CSSContentDistributionValue::distribution):
+        (WebCore::CSSContentDistributionValue::position):
+        (WebCore::CSSContentDistributionValue::overflow):
+        * css/CSSParser.cpp:
+        (WebCore::isValidKeywordPropertyAndValue):
+        (WebCore::isKeywordPropertyID):
+        (WebCore::CSSParser::parseValue):
+        (WebCore::isContentDistributionKeyword):
+        (WebCore::isContentPositionKeyword):
+        (WebCore::isAlignmentOverflowKeyword):
+        (WebCore::CSSParser::parseContentDistributionOverflowPosition):
+        (WebCore::CSSParser::parseItemPositionOverflowPosition):
+        (WebCore::CSSParser::parseLegacyPosition): Deleted.
+        * css/CSSParser.h:
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        (WebCore::CSSPrimitiveValue::operator ContentPosition):
+        (WebCore::CSSPrimitiveValue::operator ContentDistributionType):
+        (WebCore::CSSPrimitiveValue::operator EFlexDirection): Deleted.
+        * css/CSSPropertyNames.in:
+        * css/CSSValue.cpp:
+        (WebCore::CSSValue::equals):
+        (WebCore::CSSValue::cssText):
+        (WebCore::CSSValue::destroy):
+        * css/CSSValue.h:
+        (WebCore::CSSValue::isContentDistributionValue):
+        (WebCore::CSSValue::isWebKitCSSFilterValue): Deleted.
+        * css/CSSValueKeywords.in:
+        * css/StyleBuilderConverter.h:
+        (WebCore::StyleBuilderConverter::convertContentAlignmentData):
+        (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): Deleted.
+        * rendering/RenderFlexibleBox.cpp:
+        (WebCore::initialJustifyContentOffset):
+        (WebCore::justifyContentSpaceBetweenChildren):
+        (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
+        (WebCore::RenderFlexibleBox::layoutColumnReverse):
+        * rendering/RenderFullScreen.cpp:
+        (WebCore::createFullScreenStyle):
+        * rendering/mathml/RenderMathMLScripts.cpp:
+        (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
+        (WebCore::RenderMathMLScripts::fixAnonymousStyles):
+        * rendering/style/RenderStyle.h:
+        * rendering/style/RenderStyleConstants.h:
+        * rendering/style/StyleContentAlignmentData.h: Added.
+        (WebCore::StyleContentAlignmentData::StyleContentAlignmentData):
+        (WebCore::StyleContentAlignmentData::setPosition):
+        (WebCore::StyleContentAlignmentData::setDistribution):
+        (WebCore::StyleContentAlignmentData::setOverflow):
+        (WebCore::StyleContentAlignmentData::position):
+        (WebCore::StyleContentAlignmentData::distribution):
+        (WebCore::StyleContentAlignmentData::overflow):
+        (WebCore::StyleContentAlignmentData::operator==):
+        (WebCore::StyleContentAlignmentData::operator!=):
+        * rendering/style/StyleRareNonInheritedData.cpp:
+        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
+        (WebCore::StyleRareNonInheritedData::operator==):
+        * rendering/style/StyleRareNonInheritedData.h:
+
</ins><span class="cx"> 2015-05-04  Per Arne Vollan  &lt;peavo@outlook.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WinCairo] Compile error in sharedEGLDisplay() method.
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -3789,6 +3789,9 @@
</span><span class="cx">                 9BF9A8801648DD2F001C6B23 /* JSHTMLFormControlsCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9BF9A87E1648DD2F001C6B23 /* JSHTMLFormControlsCollection.cpp */; };
</span><span class="cx">                 9BF9A8811648DD2F001C6B23 /* JSHTMLFormControlsCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 9BF9A87F1648DD2F001C6B23 /* JSHTMLFormControlsCollection.h */; };
</span><span class="cx">                 9D6380101AF173220031A15C /* StyleSelfAlignmentData.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D63800F1AF16E160031A15C /* StyleSelfAlignmentData.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                9DAC7C541AF2CAA100437C44 /* CSSContentDistributionValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9DAC7C521AF2CAA100437C44 /* CSSContentDistributionValue.cpp */; };
+                9DAC7C551AF2CAA200437C44 /* CSSContentDistributionValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 9DAC7C531AF2CAA100437C44 /* CSSContentDistributionValue.h */; };
+                9DAC7C571AF2CB6400437C44 /* StyleContentAlignmentData.h in Headers */ = {isa = PBXBuildFile; fileRef = 9DAC7C561AF2CB6400437C44 /* StyleContentAlignmentData.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 9F72304F11184B4100AD0126 /* ScriptProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F72304C11184B4100AD0126 /* ScriptProfile.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 9FA37EE41172FC8000C4CD55 /* ScriptProfileNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 9FA37EE31172FC8000C4CD55 /* ScriptProfileNode.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 9FA37EFA1172FDA600C4CD55 /* JSScriptProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9FA37EF61172FD9300C4CD55 /* JSScriptProfile.cpp */; };
</span><span class="lines">@@ -11078,6 +11081,9 @@
</span><span class="cx">                 9BF9A87E1648DD2F001C6B23 /* JSHTMLFormControlsCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLFormControlsCollection.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9BF9A87F1648DD2F001C6B23 /* JSHTMLFormControlsCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLFormControlsCollection.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9D63800F1AF16E160031A15C /* StyleSelfAlignmentData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleSelfAlignmentData.h; path = style/StyleSelfAlignmentData.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                9DAC7C521AF2CAA100437C44 /* CSSContentDistributionValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSContentDistributionValue.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                9DAC7C531AF2CAA100437C44 /* CSSContentDistributionValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSContentDistributionValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                9DAC7C561AF2CB6400437C44 /* StyleContentAlignmentData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleContentAlignmentData.h; path = style/StyleContentAlignmentData.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 9F72304C11184B4100AD0126 /* ScriptProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptProfile.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9FA37EE31172FC8000C4CD55 /* ScriptProfileNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptProfileNode.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 9FA37EEF1172FD4100C4CD55 /* ScriptProfile.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ScriptProfile.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -21376,6 +21382,7 @@
</span><span class="cx">                 BC8C8FAA0DDCD2F200B592F4 /* style */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                9DAC7C561AF2CB6400437C44 /* StyleContentAlignmentData.h */,
</ins><span class="cx">                                 9D63800F1AF16E160031A15C /* StyleSelfAlignmentData.h */,
</span><span class="cx">                                 FBD6AF8215EF21A3008B7110 /* BasicShapes.cpp */,
</span><span class="cx">                                 FBD6AF8315EF21A3008B7110 /* BasicShapes.h */,
</span><span class="lines">@@ -22334,6 +22341,8 @@
</span><span class="cx">                         children = (
</span><span class="cx">                                 31BC742B1AAFF45C006B4340 /* CSSAnimationTriggerScrollValue.cpp */,
</span><span class="cx">                                 31BC742C1AAFF45C006B4340 /* CSSAnimationTriggerScrollValue.h */,
</span><ins>+                                9DAC7C521AF2CAA100437C44 /* CSSContentDistributionValue.cpp */,
+                                9DAC7C531AF2CAA100437C44 /* CSSContentDistributionValue.h */,
</ins><span class="cx">                                 83520C7D1A71BFCC006BD2AA /* CSSFontFamily.h */,
</span><span class="cx">                                 FBD6AF8415EF21D4008B7110 /* BasicShapeFunctions.cpp */,
</span><span class="cx">                                 FBD6AF8515EF21D4008B7110 /* BasicShapeFunctions.h */,
</span><span class="lines">@@ -23993,7 +24002,6 @@
</span><span class="cx">                                 CE1252371A15BDBE00864480 /* CoreGraphicsSPI.h in Headers */,
</span><span class="cx">                                 443818001A91B2F8006E04F2 /* CoreMediaSoftLink.h in Headers */,
</span><span class="cx">                                 7C9DBFEE1A9C49B1000D6B25 /* JSHTMLAttachmentElement.h in Headers */,
</span><del>-                                9D6380101AF173220031A15C /* StyleSelfAlignmentData.h in Headers */,
</del><span class="cx">                                 4449A4051A964B0000B64AD5 /* CoreMediaSPI.h in Headers */,
</span><span class="cx">                                 1C6466251A12C38E0094603C /* CoreTextSPI.h in Headers */,
</span><span class="cx">                                 862F129E18C1576F005C54AF /* CountedUserActivity.h in Headers */,
</span><span class="lines">@@ -24058,6 +24066,7 @@
</span><span class="cx">                                 BC6049CC0DB560C200204739 /* CSSCanvasValue.h in Headers */,
</span><span class="cx">                                 A80E6CF90A1989CA007FB8C5 /* CSSCharsetRule.h in Headers */,
</span><span class="cx">                                 BCEA4790097CAAC80094C9E4 /* CSSComputedStyleDeclaration.h in Headers */,
</span><ins>+                                9DAC7C551AF2CAA200437C44 /* CSSContentDistributionValue.h in Headers */,
</ins><span class="cx">                                 2D8FEBDD143E3EF70072502B /* CSSCrossfadeValue.h in Headers */,
</span><span class="cx">                                 AA21ECCD0ABF0FC6002B834C /* CSSCursorImageValue.h in Headers */,
</span><span class="cx">                                 4A9CC81816BB9AC600EC645A /* CSSDefaultStyleSheets.h in Headers */,
</span><span class="lines">@@ -26516,6 +26525,7 @@
</span><span class="cx">                                 835D363719FF6193004C93AB /* StyleBuilderCustom.h in Headers */,
</span><span class="cx">                                 BCEF444D0E674628001C1287 /* StyleCachedImage.h in Headers */,
</span><span class="cx">                                 9393E605151A9A1800066F06 /* StyleCachedImageSet.h in Headers */,
</span><ins>+                                9DAC7C571AF2CB6400437C44 /* StyleContentAlignmentData.h in Headers */,
</ins><span class="cx">                                 BC5EB67F0E81D4A700B25965 /* StyleDashboardRegion.h in Headers */,
</span><span class="cx">                                 A8C4A7FD09D563270003AC8D /* StyledElement.h in Headers */,
</span><span class="cx">                                 BC5EB8B90E8201BD00B25965 /* StyleDeprecatedFlexibleBoxData.h in Headers */,
</span><span class="lines">@@ -26542,6 +26552,7 @@
</span><span class="cx">                                 E4BBED4D14FCDBA1003F0B98 /* StyleRule.h in Headers */,
</span><span class="cx">                                 E4946EAF156E64DD00D3297F /* StyleRuleImport.h in Headers */,
</span><span class="cx">                                 F47A5E3E195B8C8A00483100 /* StyleScrollSnapPoints.h in Headers */,
</span><ins>+                                9D6380101AF173220031A15C /* StyleSelfAlignmentData.h in Headers */,
</ins><span class="cx">                                 A8EA800C0A19516E00A8EF5F /* StyleSheet.h in Headers */,
</span><span class="cx">                                 E4F9EEF3156DA00700D23E7E /* StyleSheetContents.h in Headers */,
</span><span class="cx">                                 A8EA800A0A19516E00A8EF5F /* StyleSheetList.h in Headers */,
</span><span class="lines">@@ -27787,6 +27798,7 @@
</span><span class="cx">                                 BC604A430DB5634E00204739 /* CSSCanvasValue.cpp in Sources */,
</span><span class="cx">                                 E1EBBBD40AAC9B87001FE8E2 /* CSSCharsetRule.cpp in Sources */,
</span><span class="cx">                                 BCEA478F097CAAC80094C9E4 /* CSSComputedStyleDeclaration.cpp in Sources */,
</span><ins>+                                9DAC7C541AF2CAA100437C44 /* CSSContentDistributionValue.cpp in Sources */,
</ins><span class="cx">                                 2D8FEBDC143E3EF70072502B /* CSSCrossfadeValue.cpp in Sources */,
</span><span class="cx">                                 AA21ECCA0ABF0FBA002B834C /* CSSCursorImageValue.cpp in Sources */,
</span><span class="cx">                                 4A9CC81716BB9AC600EC645A /* CSSDefaultStyleSheets.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSAllInOnecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSAllInOne.cpp (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSAllInOne.cpp        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/css/CSSAllInOne.cpp        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &quot;CSSCanvasValue.cpp&quot;
</span><span class="cx"> #include &quot;CSSCharsetRule.cpp&quot;
</span><span class="cx"> #include &quot;CSSComputedStyleDeclaration.cpp&quot;
</span><ins>+#include &quot;CSSContentDistributionValue.cpp&quot;
</ins><span class="cx"> #include &quot;CSSCrossfadeValue.cpp&quot;
</span><span class="cx"> #include &quot;CSSCursorImageValue.cpp&quot;
</span><span class="cx"> #include &quot;CSSDefaultStyleSheets.cpp&quot;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -1717,8 +1717,7 @@
</span><span class="cx">     if (position != ItemPositionAuto || !element)
</span><span class="cx">         return position;
</span><span class="cx"> 
</span><del>-    bool isFlexOrGrid = element-&gt;style().isDisplayFlexibleOrGridBox();
-    return isFlexOrGrid ? ItemPositionStretch : ItemPositionStart;
</del><ins>+    return element-&gt;style().isDisplayFlexibleOrGridBox() ? ItemPositionStretch : ItemPositionStart;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static ItemPosition resolveSelfAlignmentAuto(ItemPosition position, OverflowAlignment&amp; overflow, RenderObject* element)
</span><span class="lines">@@ -1734,6 +1733,14 @@
</span><span class="cx">     return resolveContainerAlignmentAuto(parent-&gt;style().alignItemsPosition(), parent);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static ContentPosition resolveContentAlignmentAuto(ContentPosition position, ContentDistributionType distribution, RenderObject* element)
+{
+    if (position != ContentPositionAuto || distribution != ContentDistributionDefault || !element)
+        return position;
+
+    return element-&gt;style().isDisplayFlexibleBox() ? ContentPositionFlexStart : ContentPositionStart;
+}
+
</ins><span class="cx"> PassRefPtr&lt;CSSValue&gt; CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropertyID propertyID, EUpdateLayout updateLayout) const
</span><span class="cx"> {
</span><span class="cx">     return ComputedStyleExtractor(m_node, m_allowVisitedStyle, m_pseudoElementSpecifier).propertyValue(propertyID, updateLayout);
</span><span class="lines">@@ -1826,6 +1833,20 @@
</span><span class="cx">     return result.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static PassRefPtr&lt;CSSValueList&gt; valueForContentPositionAndDistributionWithOverflowAlignment(ContentPosition position, ContentDistributionType distribution, OverflowAlignment overflowAlignment)
+{
+    RefPtr&lt;CSSValueList&gt; result = CSSValueList::createSpaceSeparated();
+    if (distribution != ContentDistributionDefault)
+        result-&gt;append(CSSPrimitiveValue::create(distribution));
+    if (distribution == ContentDistributionDefault || position != ContentPositionAuto)
+        result-&gt;append(CSSPrimitiveValue::create(position));
+    if ((position &gt;= ContentPositionCenter || distribution != ContentDistributionDefault) &amp;&amp; overflowAlignment != OverflowAlignmentDefault)
+        result-&gt;append(CSSPrimitiveValue::create(overflowAlignment));
+    ASSERT(result-&gt;length() &gt; 0);
+    ASSERT(result-&gt;length() &lt;= 3);
+    return result.release();
+}
+
</ins><span class="cx"> PassRefPtr&lt;CSSValue&gt; ComputedStyleExtractor::propertyValue(CSSPropertyID propertyID, EUpdateLayout updateLayout) const
</span><span class="cx"> {
</span><span class="cx">     Node* styledNode = this-&gt;styledNode();
</span><span class="lines">@@ -2210,7 +2231,7 @@
</span><span class="cx">         case CSSPropertyFlexWrap:
</span><span class="cx">             return cssValuePool().createValue(style-&gt;flexWrap());
</span><span class="cx">         case CSSPropertyJustifyContent:
</span><del>-            return cssValuePool().createValue(style-&gt;justifyContent());
</del><ins>+            return valueForContentPositionAndDistributionWithOverflowAlignment(resolveContentAlignmentAuto(style-&gt;justifyContentPosition(), style-&gt;justifyContentDistribution(), renderer), style-&gt;justifyContentDistribution(), style-&gt;justifyContentOverflowAlignment());
</ins><span class="cx">         case CSSPropertyJustifyItems:
</span><span class="cx">             return valueForItemPositionWithOverflowAlignment(resolveContainerAlignmentAuto(style-&gt;justifyItemsPosition(), renderer), style-&gt;justifyItemsOverflowAlignment(), style-&gt;justifyItemsPositionType());
</span><span class="cx">         case CSSPropertyJustifySelf: {
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSContentDistributionValuecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/CSSContentDistributionValue.cpp (0 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSContentDistributionValue.cpp                                (rev 0)
+++ trunk/Source/WebCore/css/CSSContentDistributionValue.cpp        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+/*
+ * Copyright (C) 2015 Igalia S.L. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;CSSContentDistributionValue.h&quot;
+
+#include &quot;CSSValueList.h&quot;
+#include &lt;wtf/text/StringBuilder.h&gt;
+
+namespace WebCore {
+
+CSSContentDistributionValue::CSSContentDistributionValue(CSSValueID distribution, CSSValueID position, CSSValueID overflow)
+    : CSSValue(CSSContentDistributionClass)
+    , m_distribution(distribution)
+    , m_position(position)
+    , m_overflow(overflow)
+{
+}
+
+CSSContentDistributionValue::~CSSContentDistributionValue()
+{
+}
+
+String CSSContentDistributionValue::customCSSText() const
+{
+    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSpaceSeparated();
+    if (m_distribution != CSSValueInvalid)
+        list-&gt;append(distribution());
+    if (m_position != CSSValueInvalid)
+        list-&gt;append(position());
+    if (m_overflow != CSSValueInvalid)
+        list-&gt;append(overflow());
+    return list.release()-&gt;customCSSText();
+}
+
+bool CSSContentDistributionValue::equals(const CSSContentDistributionValue&amp; other) const
+{
+    return m_distribution == other.m_distribution &amp;&amp; m_position == other.m_position &amp;&amp; m_overflow == other.m_overflow;
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorecssCSSContentDistributionValueh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/CSSContentDistributionValue.h (0 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSContentDistributionValue.h                                (rev 0)
+++ trunk/Source/WebCore/css/CSSContentDistributionValue.h        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+/*
+ * Copyright (C) 2015 Igalia S.L. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef CSSContentDistributionValue_h
+#define CSSContentDistributionValue_h
+
+#include &quot;CSSValue.h&quot;
+#include &quot;CSSValuePool.h&quot;
+#include &lt;wtf/RefPtr.h&gt;
+
+namespace WebCore {
+
+class CSSContentDistributionValue : public CSSValue {
+public:
+    static Ref&lt;CSSContentDistributionValue&gt; create(CSSValueID distribution, CSSValueID position, CSSValueID overflow)
+    {
+        return adoptRef(*new CSSContentDistributionValue(distribution, position, overflow));
+    }
+    ~CSSContentDistributionValue();
+
+    Ref&lt;CSSPrimitiveValue&gt; distribution() const { return cssValuePool().createIdentifierValue(m_distribution); }
+    Ref&lt;CSSPrimitiveValue&gt; position() const { return cssValuePool().createIdentifierValue(m_position); }
+    Ref&lt;CSSPrimitiveValue&gt; overflow() const { return cssValuePool().createIdentifierValue(m_overflow); }
+
+    String customCSSText() const;
+
+    bool equals(const CSSContentDistributionValue&amp;) const;
+
+private:
+    CSSContentDistributionValue(CSSValueID distribution, CSSValueID position, CSSValueID overflow);
+
+    CSSValueID m_distribution;
+    CSSValueID m_position;
+    CSSValueID m_overflow;
+};
+
+} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSContentDistributionValue, isContentDistributionValue())
+
+#endif // CSSContentDistributionValue_h
</ins></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include &quot;CSSBasicShapes.h&quot;
</span><span class="cx"> #include &quot;CSSBorderImage.h&quot;
</span><span class="cx"> #include &quot;CSSCanvasValue.h&quot;
</span><ins>+#include &quot;CSSContentDistributionValue.h&quot;
</ins><span class="cx"> #include &quot;CSSCrossfadeValue.h&quot;
</span><span class="cx"> #include &quot;CSSCursorImageValue.h&quot;
</span><span class="cx"> #include &quot;CSSFilterImageValue.h&quot;
</span><span class="lines">@@ -892,11 +893,6 @@
</span><span class="cx">         if (valueID == CSSValueNowrap || valueID == CSSValueWrap || valueID == CSSValueWrapReverse)
</span><span class="cx">              return true;
</span><span class="cx">         break;
</span><del>-    case CSSPropertyJustifyContent:
-        // FIXME: Per CSS alignment, this property should accept an optional &lt;overflow-position&gt;. We should share this parsing code with 'justify-self'.
-        if (valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || valueID == CSSValueCenter || valueID == CSSValueSpaceBetween || valueID == CSSValueSpaceAround)
-            return true;
-        break;
</del><span class="cx">     case CSSPropertyWebkitFontKerning:
</span><span class="cx">         if (valueID == CSSValueAuto || valueID == CSSValueNormal || valueID == CSSValueNone)
</span><span class="cx">             return true;
</span><span class="lines">@@ -1128,7 +1124,6 @@
</span><span class="cx">     case CSSPropertyAlignContent:
</span><span class="cx">     case CSSPropertyFlexDirection:
</span><span class="cx">     case CSSPropertyFlexWrap:
</span><del>-    case CSSPropertyJustifyContent:
</del><span class="cx">     case CSSPropertyWebkitFontKerning:
</span><span class="cx">     case CSSPropertyWebkitFontSmoothing:
</span><span class="cx">     case CSSPropertyWebkitHyphens:
</span><span class="lines">@@ -2713,6 +2708,9 @@
</span><span class="cx">         }
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><ins>+    case CSSPropertyJustifyContent:
+        parsedValue = parseContentDistributionOverflowPosition();
+        break;
</ins><span class="cx">     case CSSPropertyJustifySelf:
</span><span class="cx">         return parseItemPositionOverflowPosition(propId, important);
</span><span class="cx">     case CSSPropertyJustifyItems:
</span><span class="lines">@@ -3119,7 +3117,6 @@
</span><span class="cx">     case CSSPropertyAlignContent:
</span><span class="cx">     case CSSPropertyFlexDirection:
</span><span class="cx">     case CSSPropertyFlexWrap:
</span><del>-    case CSSPropertyJustifyContent:
</del><span class="cx">     case CSSPropertyWebkitFontKerning:
</span><span class="cx">     case CSSPropertyWebkitFontSmoothing:
</span><span class="cx">     case CSSPropertyWebkitHyphens:
</span><span class="lines">@@ -3232,11 +3229,29 @@
</span><span class="cx">     lval = WTF::move(list);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static bool isContentDistributionKeyword(CSSValueID id)
+{
+    return id == CSSValueSpaceBetween || id == CSSValueSpaceAround
+        || id == CSSValueSpaceEvenly || id == CSSValueStretch;
+}
+
+static bool isContentPositionKeyword(CSSValueID id)
+{
+    return id == CSSValueStart || id == CSSValueEnd || id == CSSValueCenter
+        || id == CSSValueFlexStart || id == CSSValueFlexEnd
+        || id == CSSValueLeft || id == CSSValueRight;
+}
+
</ins><span class="cx"> static inline bool isBaselinePositionKeyword(CSSValueID id)
</span><span class="cx"> {
</span><span class="cx">     return id == CSSValueBaseline || id == CSSValueLastBaseline;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static bool isAlignmentOverflowKeyword(CSSValueID id)
+{
+    return id == CSSValueTrue || id == CSSValueSafe;
+}
+
</ins><span class="cx"> static bool isItemPositionKeyword(CSSValueID id)
</span><span class="cx"> {
</span><span class="cx">     return id == CSSValueStart || id == CSSValueEnd || id == CSSValueCenter
</span><span class="lines">@@ -3268,6 +3283,57 @@
</span><span class="cx">     return !m_valueList-&gt;next();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+PassRefPtr&lt;CSSValue&gt; CSSParser::parseContentDistributionOverflowPosition()
+{
+    // auto | &lt;baseline-position&gt; | &lt;content-distribution&gt; || [ &lt;overflow-position&gt;? &amp;&amp; &lt;content-position&gt; ]
+    // &lt;baseline-position&gt; = baseline | last-baseline;
+    // &lt;content-distribution&gt; = space-between | space-around | space-evenly | stretch;
+    // &lt;content-position&gt; = center | start | end | flex-start | flex-end | left | right;
+    // &lt;overflow-position&gt; = true | safe
+
+    CSSParserValue* value = m_valueList-&gt;current();
+    if (!value)
+        return nullptr;
+
+    // auto | &lt;baseline-position&gt;
+    if (value-&gt;id == CSSValueAuto || isBaselinePositionKeyword(value-&gt;id)) {
+        m_valueList-&gt;next();
+        return CSSContentDistributionValue::create(CSSValueInvalid, value-&gt;id, CSSValueInvalid);
+    }
+
+    CSSValueID distribution = CSSValueInvalid;
+    CSSValueID position = CSSValueInvalid;
+    CSSValueID overflow = CSSValueInvalid;
+    while (value) {
+        if (isContentDistributionKeyword(value-&gt;id)) {
+            if (distribution != CSSValueInvalid)
+                return nullptr;
+            distribution = value-&gt;id;
+        } else if (isContentPositionKeyword(value-&gt;id)) {
+            if (position != CSSValueInvalid)
+                return nullptr;
+            position = value-&gt;id;
+        } else if (isAlignmentOverflowKeyword(value-&gt;id)) {
+            if (overflow != CSSValueInvalid)
+                return nullptr;
+            overflow = value-&gt;id;
+        } else
+            return nullptr;
+        value = m_valueList-&gt;next();
+    }
+
+    // The grammar states that we should have at least &lt;content-distribution&gt; or
+    // &lt;content-position&gt; ( &lt;content-distribution&gt; || &lt;content-position&gt; ).
+    if (position == CSSValueInvalid &amp;&amp; distribution == CSSValueInvalid)
+        return nullptr;
+
+    // The grammar states that &lt;overflow-position&gt; must be associated to &lt;content-position&gt;.
+    if (overflow != CSSValueInvalid &amp;&amp; position == CSSValueInvalid)
+        return nullptr;
+
+    return CSSContentDistributionValue::create(distribution, position, overflow);
+}
+
</ins><span class="cx"> bool CSSParser::parseItemPositionOverflowPosition(CSSPropertyID propId, bool important)
</span><span class="cx"> {
</span><span class="cx">     // auto | stretch | &lt;baseline-position&gt; | [&lt;item-position&gt; &amp;&amp; &lt;overflow-position&gt;? ]
</span><span class="lines">@@ -3297,16 +3363,15 @@
</span><span class="cx">                 return false;
</span><span class="cx">             overflowAlignmentKeyword = cssValuePool().createIdentifierValue(value-&gt;id);
</span><span class="cx">         }
</span><del>-    } else if (value-&gt;id != CSSValueTrue &amp;&amp; value-&gt;id != CSSValueSafe)
-        return false;
-    else {
</del><ins>+    } else if (isAlignmentOverflowKeyword(value-&gt;id)) {
</ins><span class="cx">         overflowAlignmentKeyword = cssValuePool().createIdentifierValue(value-&gt;id);
</span><span class="cx">         value = m_valueList-&gt;next();
</span><span class="cx">         if (value &amp;&amp; isItemPositionKeyword(value-&gt;id))
</span><span class="cx">             position = cssValuePool().createIdentifierValue(value-&gt;id);
</span><span class="cx">         else
</span><span class="cx">             return false;
</span><del>-    }
</del><ins>+    } else
+        return false;
</ins><span class="cx"> 
</span><span class="cx">     if (m_valueList-&gt;next())
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/css/CSSParser.h        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -231,6 +231,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool parseLegacyPosition(CSSPropertyID, bool important);
</span><span class="cx">     bool parseItemPositionOverflowPosition(CSSPropertyID, bool important);
</span><ins>+    PassRefPtr&lt;CSSValue&gt; parseContentDistributionOverflowPosition();
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><span class="cx">     PassRefPtr&lt;CSSValue&gt; parseShapeProperty(CSSPropertyID);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValueMappingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -1438,52 +1438,6 @@
</span><span class="cx">     return SHOW;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; inline CSSPrimitiveValue::CSSPrimitiveValue(EJustifyContent e)
-    : CSSValue(PrimitiveClass)
-{
-    m_primitiveUnitType = CSS_VALUE_ID;
-    switch (e) {
-    case JustifyFlexStart:
-        m_value.valueID = CSSValueFlexStart;
-        break;
-    case JustifyFlexEnd:
-        m_value.valueID = CSSValueFlexEnd;
-        break;
-    case JustifyCenter:
-        m_value.valueID = CSSValueCenter;
-        break;
-    case JustifySpaceBetween:
-        m_value.valueID = CSSValueSpaceBetween;
-        break;
-    case JustifySpaceAround:
-        m_value.valueID = CSSValueSpaceAround;
-        break;
-    }
-}
-
-template&lt;&gt; inline CSSPrimitiveValue::operator EJustifyContent() const
-{
-    ASSERT(isValueID());
-
-    switch (m_value.valueID) {
-    case CSSValueFlexStart:
-        return JustifyFlexStart;
-    case CSSValueFlexEnd:
-        return JustifyFlexEnd;
-    case CSSValueCenter:
-        return JustifyCenter;
-    case CSSValueSpaceBetween:
-        return JustifySpaceBetween;
-    case CSSValueSpaceAround:
-        return JustifySpaceAround;
-    default:
-        break;
-    }
-
-    ASSERT_NOT_REACHED();
-    return JustifyFlexStart;
-}
-
</del><span class="cx"> template&lt;&gt; inline CSSPrimitiveValue::CSSPrimitiveValue(EFlexDirection e)
</span><span class="cx">     : CSSValue(PrimitiveClass)
</span><span class="cx"> {
</span><span class="lines">@@ -5186,7 +5140,115 @@
</span><span class="cx">     return OverflowAlignmentTrue;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+template&lt;&gt; inline CSSPrimitiveValue::CSSPrimitiveValue(ContentPosition contentPosition)
+    : CSSValue(PrimitiveClass)
+{
+    m_primitiveUnitType = CSS_VALUE_ID;
+    switch (contentPosition) {
+    case ContentPositionAuto:
+        m_value.valueID = CSSValueAuto;
+        break;
+    case ContentPositionBaseline:
+        m_value.valueID = CSSValueBaseline;
+        break;
+    case ContentPositionLastBaseline:
+        m_value.valueID = CSSValueLastBaseline;
+        break;
+    case ContentPositionCenter:
+        m_value.valueID = CSSValueCenter;
+        break;
+    case ContentPositionStart:
+        m_value.valueID = CSSValueStart;
+        break;
+    case ContentPositionEnd:
+        m_value.valueID = CSSValueEnd;
+        break;
+    case ContentPositionFlexStart:
+        m_value.valueID = CSSValueFlexStart;
+        break;
+    case ContentPositionFlexEnd:
+        m_value.valueID = CSSValueFlexEnd;
+        break;
+    case ContentPositionLeft:
+        m_value.valueID = CSSValueLeft;
+        break;
+    case ContentPositionRight:
+        m_value.valueID = CSSValueRight;
+        break;
+    }
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt; inline CSSPrimitiveValue::operator ContentPosition() const
+{
+    switch (m_value.valueID) {
+    case CSSValueAuto:
+        return ContentPositionAuto;
+    case CSSValueBaseline:
+        return ContentPositionBaseline;
+    case CSSValueLastBaseline:
+        return ContentPositionLastBaseline;
+    case CSSValueCenter:
+        return ContentPositionCenter;
+    case CSSValueStart:
+        return ContentPositionStart;
+    case CSSValueEnd:
+        return ContentPositionEnd;
+    case CSSValueFlexStart:
+        return ContentPositionFlexStart;
+    case CSSValueFlexEnd:
+        return ContentPositionFlexEnd;
+    case CSSValueLeft:
+        return ContentPositionLeft;
+    case CSSValueRight:
+        return ContentPositionRight;
+    default:
+        break;
+    }
+    ASSERT_NOT_REACHED();
+    return ContentPositionAuto;
+}
+
+template&lt;&gt; inline CSSPrimitiveValue::CSSPrimitiveValue(ContentDistributionType contentDistribution)
+    : CSSValue(PrimitiveClass)
+{
+    m_primitiveUnitType = CSS_VALUE_ID;
+    switch (contentDistribution) {
+    case ContentDistributionDefault:
+        m_value.valueID = CSSValueDefault;
+        break;
+    case ContentDistributionSpaceBetween:
+        m_value.valueID = CSSValueSpaceBetween;
+        break;
+    case ContentDistributionSpaceAround:
+        m_value.valueID = CSSValueSpaceAround;
+        break;
+    case ContentDistributionSpaceEvenly:
+        m_value.valueID = CSSValueSpaceEvenly;
+        break;
+    case ContentDistributionStretch:
+        m_value.valueID = CSSValueStretch;
+        break;
+    }
+}
+
+template&lt;&gt; inline CSSPrimitiveValue::operator ContentDistributionType() const
+{
+    switch (m_value.valueID) {
+    case CSSValueSpaceBetween:
+        return ContentDistributionSpaceBetween;
+    case CSSValueSpaceAround:
+        return ContentDistributionSpaceAround;
+    case CSSValueSpaceEvenly:
+        return ContentDistributionSpaceEvenly;
+    case CSSValueStretch:
+        return ContentDistributionStretch;
+    default:
+        break;
+    }
+    ASSERT_NOT_REACHED();
+    return ContentDistributionStretch;
+}
+
</ins><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><span class="cx"> template&lt;&gt; inline CSSPrimitiveValue::CSSPrimitiveValue(ScrollSnapType e)
</span><span class="cx">     : CSSValue(PrimitiveClass)
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertyNames.in        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -473,7 +473,7 @@
</span><span class="cx"> -webkit-flex-shrink = flex-shrink
</span><span class="cx"> flex-wrap
</span><span class="cx"> -webkit-flex-wrap = flex-wrap
</span><del>-justify-content
</del><ins>+justify-content [Initial=initialContentAlignment, Converter=ContentAlignmentData]
</ins><span class="cx"> -webkit-justify-content = justify-content
</span><span class="cx"> #if defined(ENABLE_FILTERS_LEVEL_2) &amp;&amp; ENABLE_FILTERS_LEVEL_2
</span><span class="cx"> -webkit-backdrop-filter [ConditionalConverter=FilterOperations]
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValue.cpp (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValue.cpp        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/css/CSSValue.cpp        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include &quot;CSSBorderImageSliceValue.h&quot;
</span><span class="cx"> #include &quot;CSSCalculationValue.h&quot;
</span><span class="cx"> #include &quot;CSSCanvasValue.h&quot;
</span><ins>+#include &quot;CSSContentDistributionValue.h&quot;
</ins><span class="cx"> #include &quot;CSSCrossfadeValue.h&quot;
</span><span class="cx"> #include &quot;CSSCursorImageValue.h&quot;
</span><span class="cx"> #include &quot;CSSFilterImageValue.h&quot;
</span><span class="lines">@@ -231,6 +232,8 @@
</span><span class="cx">         case AnimationTriggerScrollClass:
</span><span class="cx">             return compareCSSValues&lt;CSSAnimationTriggerScrollValue&gt;(*this, other);
</span><span class="cx"> #endif
</span><ins>+        case CSSContentDistributionClass:
+            return compareCSSValues&lt;CSSContentDistributionValue&gt;(*this, other);
</ins><span class="cx">         default:
</span><span class="cx">             ASSERT_NOT_REACHED();
</span><span class="cx">             return false;
</span><span class="lines">@@ -323,6 +326,8 @@
</span><span class="cx"> #endif
</span><span class="cx">     case WebKitCSSResourceClass:
</span><span class="cx">         return downcast&lt;WebKitCSSResourceValue&gt;(*this).customCSSText();
</span><ins>+    case CSSContentDistributionClass:
+        return downcast&lt;CSSContentDistributionValue&gt;(*this).customCSSText();
</ins><span class="cx">     }
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><span class="cx">     return String();
</span><span class="lines">@@ -443,6 +448,9 @@
</span><span class="cx">     case WebKitCSSResourceClass:
</span><span class="cx">         delete downcast&lt;WebKitCSSResourceValue&gt;(this);
</span><span class="cx">         return;
</span><ins>+    case CSSContentDistributionClass:
+        delete downcast&lt;CSSContentDistributionValue&gt;(this);
+        return;
</ins><span class="cx">     }
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValue.h (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValue.h        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/css/CSSValue.h        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -96,6 +96,7 @@
</span><span class="cx">     bool isCalcValue() const {return m_classType == CalculationClass; }
</span><span class="cx">     bool isFilterImageValue() const { return m_classType == FilterImageClass; }
</span><span class="cx">     bool isWebKitCSSFilterValue() const { return m_classType == WebKitCSSFilterClass; }
</span><ins>+    bool isContentDistributionValue() const { return m_classType == CSSContentDistributionClass; }
</ins><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><span class="cx">     bool isGridTemplateAreasValue() const { return m_classType == GridTemplateAreasClass; }
</span><span class="cx">     bool isGridLineNamesValue() const { return m_classType == GridLineNamesClass; }
</span><span class="lines">@@ -173,6 +174,8 @@
</span><span class="cx">         AnimationTriggerScrollClass,
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+        CSSContentDistributionClass,
+
</ins><span class="cx">         // List class types must appear after ValueListClass.
</span><span class="cx">         ValueListClass,
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueKeywordsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueKeywords.in        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -545,6 +545,7 @@
</span><span class="cx"> // center
</span><span class="cx"> space-between
</span><span class="cx"> space-around
</span><ins>+space-evenly
</ins><span class="cx"> // stretch
</span><span class="cx"> 
</span><span class="cx"> // CSS_PROP_ALIGN_ITEMS / CSS_PROP_ALIGN_SELF
</span><span class="lines">@@ -556,11 +557,15 @@
</span><span class="cx"> // stretch
</span><span class="cx"> 
</span><span class="cx"> // CSS_PROP_JUSTIFY_CONTENT
</span><ins>+// start
+// end
</ins><span class="cx"> // flex-start
</span><span class="cx"> // flex-end
</span><span class="cx"> // center
</span><span class="cx"> // space-between
</span><span class="cx"> // space-around
</span><ins>+// space-evenly
+// stretch
</ins><span class="cx"> 
</span><span class="cx"> // CSS_PROP_JUSTIFY_ITEMS / CSS_PROP_JUSTIFY_SELF
</span><span class="cx"> // auto
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderConverterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderConverter.h        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;BasicShapeFunctions.h&quot;
</span><span class="cx"> #include &quot;CSSCalculationValue.h&quot;
</span><ins>+#include &quot;CSSContentDistributionValue.h&quot;
</ins><span class="cx"> #include &quot;CSSFontFeatureValue.h&quot;
</span><span class="cx"> #include &quot;CSSFunctionValue.h&quot;
</span><span class="cx"> #include &quot;CSSGridLineNamesValue.h&quot;
</span><span class="lines">@@ -122,6 +123,7 @@
</span><span class="cx">     static String convertSVGURIReference(StyleResolver&amp;, CSSValue&amp;);
</span><span class="cx">     static Color convertSVGColor(StyleResolver&amp;, CSSValue&amp;);
</span><span class="cx">     static StyleSelfAlignmentData convertSelfOrDefaultAlignmentData(StyleResolver&amp;, CSSValue&amp;);
</span><ins>+    static StyleContentAlignmentData convertContentAlignmentData(StyleResolver&amp;, CSSValue&amp;);
</ins><span class="cx">     static EGlyphOrientation convertGlyphOrientation(StyleResolver&amp;, CSSValue&amp;);
</span><span class="cx">     static EGlyphOrientation convertGlyphOrientationOrAuto(StyleResolver&amp;, CSSValue&amp;);
</span><span class="cx">     static Optional&lt;Length&gt; convertLineHeight(StyleResolver&amp;, CSSValue&amp;, float multiplier = 1.f);
</span><span class="lines">@@ -1188,6 +1190,19 @@
</span><span class="cx">     return alignmentData;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline StyleContentAlignmentData StyleBuilderConverter::convertContentAlignmentData(StyleResolver&amp;, CSSValue&amp; value)
+{
+    StyleContentAlignmentData alignmentData = RenderStyle::initialContentAlignment();
+    auto&amp; contentValue = downcast&lt;CSSContentDistributionValue&gt;(value);
+    if (contentValue.distribution()-&gt;getValueID() != CSSValueInvalid)
+        alignmentData.setDistribution(contentValue.distribution().get());
+    if (contentValue.position()-&gt;getValueID() != CSSValueInvalid)
+        alignmentData.setPosition(contentValue.position().get());
+    if (contentValue.overflow()-&gt;getValueID() != CSSValueInvalid)
+        alignmentData.setOverflow(contentValue.overflow().get());
+    return alignmentData;
+}
+
</ins><span class="cx"> inline EGlyphOrientation StyleBuilderConverter::convertGlyphOrientation(StyleResolver&amp;, CSSValue&amp; value)
</span><span class="cx"> {
</span><span class="cx">     float angle = fabsf(fmodf(downcast&lt;CSSPrimitiveValue&gt;(value).getFloatValue(), 360.0f));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderFlexibleBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -958,13 +958,13 @@
</span><span class="cx">     return !totalViolation;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static LayoutUnit initialJustifyContentOffset(LayoutUnit availableFreeSpace, EJustifyContent justifyContent, unsigned numberOfChildren)
</del><ins>+static LayoutUnit initialJustifyContentOffset(LayoutUnit availableFreeSpace, ContentPosition justifyContent, ContentDistributionType justifyContentDistribution, unsigned numberOfChildren)
</ins><span class="cx"> {
</span><del>-    if (justifyContent == JustifyFlexEnd)
</del><ins>+    if (justifyContent == ContentPositionFlexEnd)
</ins><span class="cx">         return availableFreeSpace;
</span><del>-    if (justifyContent == JustifyCenter)
</del><ins>+    if (justifyContent == ContentPositionCenter)
</ins><span class="cx">         return availableFreeSpace / 2;
</span><del>-    if (justifyContent == JustifySpaceAround) {
</del><ins>+    if (justifyContentDistribution == ContentDistributionSpaceAround) {
</ins><span class="cx">         if (availableFreeSpace &gt; 0 &amp;&amp; numberOfChildren)
</span><span class="cx">             return availableFreeSpace / (2 * numberOfChildren);
</span><span class="cx">         else
</span><span class="lines">@@ -973,12 +973,12 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static LayoutUnit justifyContentSpaceBetweenChildren(LayoutUnit availableFreeSpace, EJustifyContent justifyContent, unsigned numberOfChildren)
</del><ins>+static LayoutUnit justifyContentSpaceBetweenChildren(LayoutUnit availableFreeSpace, ContentDistributionType justifyContentDistribution, unsigned numberOfChildren)
</ins><span class="cx"> {
</span><span class="cx">     if (availableFreeSpace &gt; 0 &amp;&amp; numberOfChildren &gt; 1) {
</span><del>-        if (justifyContent == JustifySpaceBetween)
</del><ins>+        if (justifyContentDistribution == ContentDistributionSpaceBetween)
</ins><span class="cx">             return availableFreeSpace / (numberOfChildren - 1);
</span><del>-        if (justifyContent == JustifySpaceAround)
</del><ins>+        if (justifyContentDistribution == ContentDistributionSpaceAround)
</ins><span class="cx">             return availableFreeSpace / numberOfChildren;
</span><span class="cx">     }
</span><span class="cx">     return 0;
</span><span class="lines">@@ -1060,7 +1060,7 @@
</span><span class="cx">     size_t numberOfChildrenForJustifyContent = numberOfInFlowPositionedChildren(children);
</span><span class="cx">     LayoutUnit autoMarginOffset = autoMarginOffsetInMainAxis(children, availableFreeSpace);
</span><span class="cx">     LayoutUnit mainAxisOffset = flowAwareBorderStart() + flowAwarePaddingStart();
</span><del>-    mainAxisOffset += initialJustifyContentOffset(availableFreeSpace, style().justifyContent(), numberOfChildrenForJustifyContent);
</del><ins>+    mainAxisOffset += initialJustifyContentOffset(availableFreeSpace, style().justifyContentPosition(), style().justifyContentDistribution(), numberOfChildrenForJustifyContent);
</ins><span class="cx">     if (style().flexDirection() == FlowRowReverse)
</span><span class="cx">         mainAxisOffset += isHorizontalFlow() ? verticalScrollbarWidth() : horizontalScrollbarHeight();
</span><span class="cx"> 
</span><span class="lines">@@ -1117,7 +1117,7 @@
</span><span class="cx"> 
</span><span class="cx">         ++seenInFlowPositionedChildren;
</span><span class="cx">         if (seenInFlowPositionedChildren &lt; numberOfChildrenForJustifyContent)
</span><del>-            mainAxisOffset += justifyContentSpaceBetweenChildren(availableFreeSpace, style().justifyContent(), numberOfChildrenForJustifyContent);
</del><ins>+            mainAxisOffset += justifyContentSpaceBetweenChildren(availableFreeSpace, style().justifyContentDistribution(), numberOfChildrenForJustifyContent);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (isColumnFlow())
</span><span class="lines">@@ -1143,7 +1143,7 @@
</span><span class="cx">     // just moving the children to a new position.
</span><span class="cx">     size_t numberOfChildrenForJustifyContent = numberOfInFlowPositionedChildren(children);
</span><span class="cx">     LayoutUnit mainAxisOffset = logicalHeight() - flowAwareBorderEnd() - flowAwarePaddingEnd();
</span><del>-    mainAxisOffset -= initialJustifyContentOffset(availableFreeSpace, style().justifyContent(), numberOfChildrenForJustifyContent);
</del><ins>+    mainAxisOffset -= initialJustifyContentOffset(availableFreeSpace, style().justifyContentPosition(), style().justifyContentDistribution(), numberOfChildrenForJustifyContent);
</ins><span class="cx">     mainAxisOffset -= isHorizontalFlow() ? verticalScrollbarWidth() : horizontalScrollbarHeight();
</span><span class="cx"> 
</span><span class="cx">     size_t seenInFlowPositionedChildren = 0;
</span><span class="lines">@@ -1161,7 +1161,7 @@
</span><span class="cx"> 
</span><span class="cx">         ++seenInFlowPositionedChildren;
</span><span class="cx">         if (seenInFlowPositionedChildren &lt; numberOfChildrenForJustifyContent)
</span><del>-            mainAxisOffset -= justifyContentSpaceBetweenChildren(availableFreeSpace, style().justifyContent(), numberOfChildrenForJustifyContent);
</del><ins>+            mainAxisOffset -= justifyContentSpaceBetweenChildren(availableFreeSpace, style().justifyContentDistribution(), numberOfChildrenForJustifyContent);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderFullScreencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderFullScreen.cpp (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderFullScreen.cpp        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/rendering/RenderFullScreen.cpp        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">     fullscreenStyle.get().fontCascade().update(nullptr);
</span><span class="cx"> 
</span><span class="cx">     fullscreenStyle.get().setDisplay(FLEX);
</span><del>-    fullscreenStyle.get().setJustifyContent(JustifyCenter);
</del><ins>+    fullscreenStyle.get().setJustifyContentPosition(ContentPositionCenter);
</ins><span class="cx">     fullscreenStyle.get().setAlignItemsPosition(ItemPositionCenter);
</span><span class="cx">     fullscreenStyle.get().setFlexDirection(FlowColumn);
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLScriptscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -95,7 +95,12 @@
</span><span class="cx">     // (respectively superscript) with the bottom (respectively top) edge of
</span><span class="cx">     // the flex container. Note that for valid &lt;msub&gt; and &lt;msup&gt; elements, the
</span><span class="cx">     // subSupPair should actually have only one script.
</span><del>-    scriptsStyle.setJustifyContent(m_kind == Sub ? JustifyFlexStart : m_kind == Super ? JustifyFlexEnd : JustifySpaceBetween);
</del><ins>+    if (m_kind == Sub)
+        scriptsStyle.setJustifyContentPosition(ContentPositionFlexStart);
+    else if (m_kind == Super)
+        scriptsStyle.setJustifyContentPosition(ContentPositionFlexEnd);
+    else
+        scriptsStyle.setJustifyContentDistribution(ContentDistributionSpaceBetween);
</ins><span class="cx"> 
</span><span class="cx">     // The MathML specification does not specify vertical alignment of scripts.
</span><span class="cx">     // Let's right align prescripts and left align postscripts.
</span><span class="lines">@@ -133,7 +138,7 @@
</span><span class="cx">             ASSERT(subSupPair &amp;&amp; subSupPair-&gt;style().refCount() == 1);
</span><span class="cx">             RenderStyle&amp; scriptsStyle = subSupPair-&gt;style();
</span><span class="cx">             scriptsStyle.setFlexDirection(FlowRow);
</span><del>-            scriptsStyle.setJustifyContent(JustifyFlexStart);
</del><ins>+            scriptsStyle.setJustifyContentPosition(ContentPositionFlexStart);
</ins><span class="cx">             scriptsStyle.setAlignItemsPosition(ItemPositionCenter);
</span><span class="cx">             scriptsStyle.setOrder(0);
</span><span class="cx">             scriptsStyle.setFontSize(style().fontSize());
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -922,7 +922,10 @@
</span><span class="cx">     bool isColumnFlexDirection() const { return flexDirection() == FlowColumn || flexDirection() == FlowColumnReverse; }
</span><span class="cx">     bool isReverseFlexDirection() const { return flexDirection() == FlowRowReverse || flexDirection() == FlowColumnReverse; }
</span><span class="cx">     EFlexWrap flexWrap() const { return static_cast&lt;EFlexWrap&gt;(rareNonInheritedData-&gt;m_flexibleBox-&gt;m_flexWrap); }
</span><del>-    EJustifyContent justifyContent() const { return static_cast&lt;EJustifyContent&gt;(rareNonInheritedData-&gt;m_justifyContent); }
</del><ins>+    const StyleContentAlignmentData&amp; justifyContent() const { return rareNonInheritedData-&gt;m_justifyContent; }
+    ContentPosition justifyContentPosition() const { return rareNonInheritedData-&gt;m_justifyContent.position(); }
+    ContentDistributionType justifyContentDistribution() const { return rareNonInheritedData-&gt;m_justifyContent.distribution(); }
+    OverflowAlignment justifyContentOverflowAlignment() const { return rareNonInheritedData-&gt;m_justifyContent.overflow(); }
</ins><span class="cx">     const StyleSelfAlignmentData&amp; justifyItems() const { return rareNonInheritedData-&gt;m_justifyItems; }
</span><span class="cx">     ItemPosition justifyItemsPosition() const { return rareNonInheritedData-&gt;m_justifyItems.position(); }
</span><span class="cx">     OverflowAlignment justifyItemsOverflowAlignment() const { return rareNonInheritedData-&gt;m_justifyItems.overflow(); }
</span><span class="lines">@@ -1510,7 +1513,10 @@
</span><span class="cx">     void setAlignSelfOverflow(OverflowAlignment overflow) { rareNonInheritedData.access()-&gt;m_alignSelf.setOverflow(overflow); }
</span><span class="cx">     void setFlexDirection(EFlexDirection direction) { SET_VAR(rareNonInheritedData.access()-&gt;m_flexibleBox, m_flexDirection, direction); }
</span><span class="cx">     void setFlexWrap(EFlexWrap w) { SET_VAR(rareNonInheritedData.access()-&gt;m_flexibleBox, m_flexWrap, w); }
</span><del>-    void setJustifyContent(EJustifyContent p) { SET_VAR(rareNonInheritedData, m_justifyContent, p); }
</del><ins>+    void setJustifyContent(const StyleContentAlignmentData&amp; data) { SET_VAR(rareNonInheritedData, m_justifyContent, data); }
+    void setJustifyContentPosition(ContentPosition position) { rareNonInheritedData.access()-&gt;m_justifyContent.setPosition(position); }
+    void setJustifyContentOverflow(OverflowAlignment overflow) { rareNonInheritedData.access()-&gt;m_justifyContent.setOverflow(overflow); }
+    void setJustifyContentDistribution(ContentDistributionType distribution) { rareNonInheritedData.access()-&gt;m_justifyContent.setDistribution(distribution); }
</ins><span class="cx">     void setJustifyItems(const StyleSelfAlignmentData&amp; data) { SET_VAR(rareNonInheritedData, m_justifyItems, data); }
</span><span class="cx">     void setJustifyItemsPosition(ItemPosition position) { rareNonInheritedData.access()-&gt;m_justifyItems.setPosition(position); }
</span><span class="cx">     void setJustifyItemsOverflow(OverflowAlignment overflow) { rareNonInheritedData.access()-&gt;m_justifyItems.setOverflow(overflow); }
</span><span class="lines">@@ -1804,6 +1810,7 @@
</span><span class="cx">     bool isDisplayInlineType() const { return isDisplayInlineType(display()); }
</span><span class="cx">     bool isOriginalDisplayInlineType() const { return isDisplayInlineType(originalDisplay()); }
</span><span class="cx">     bool isDisplayFlexibleOrGridBox() const { return isDisplayFlexibleOrGridBox(display()); }
</span><ins>+    bool isDisplayFlexibleBox() const { return isDisplayFlexibleBox(display()); }
</ins><span class="cx">     bool isDisplayRegionType() const
</span><span class="cx">     {
</span><span class="cx">         return display() == BLOCK || display() == INLINE_BLOCK
</span><span class="lines">@@ -1928,9 +1935,9 @@
</span><span class="cx">     static int initialOrder() { return 0; }
</span><span class="cx">     static EAlignContent initialAlignContent() { return AlignContentStretch; }
</span><span class="cx">     static StyleSelfAlignmentData initialSelfAlignment() { return StyleSelfAlignmentData(ItemPositionAuto, OverflowAlignmentDefault); }
</span><ins>+    static StyleContentAlignmentData initialContentAlignment() { return StyleContentAlignmentData(ContentPositionAuto, ContentDistributionDefault, OverflowAlignmentDefault); }
</ins><span class="cx">     static EFlexDirection initialFlexDirection() { return FlowRow; }
</span><span class="cx">     static EFlexWrap initialFlexWrap() { return FlexNoWrap; }
</span><del>-    static EJustifyContent initialJustifyContent() { return JustifyFlexStart; }
</del><span class="cx">     static int initialMarqueeLoopCount() { return -1; }
</span><span class="cx">     static int initialMarqueeSpeed() { return 85; }
</span><span class="cx">     static Length initialMarqueeIncrement() { return Length(6, Fixed); }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleConstantsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -248,10 +248,11 @@
</span><span class="cx"> enum EAlignContent { AlignContentFlexStart, AlignContentFlexEnd, AlignContentCenter, AlignContentSpaceBetween, AlignContentSpaceAround, AlignContentStretch };
</span><span class="cx"> enum EFlexDirection { FlowRow, FlowRowReverse, FlowColumn, FlowColumnReverse };
</span><span class="cx"> enum EFlexWrap { FlexNoWrap, FlexWrap, FlexWrapReverse };
</span><del>-enum EJustifyContent { JustifyFlexStart, JustifyFlexEnd, JustifyCenter, JustifySpaceBetween, JustifySpaceAround };
</del><span class="cx"> enum ItemPosition {ItemPositionAuto, ItemPositionStretch, ItemPositionBaseline, ItemPositionLastBaseline, ItemPositionCenter, ItemPositionStart, ItemPositionEnd, ItemPositionSelfStart, ItemPositionSelfEnd, ItemPositionFlexStart, ItemPositionFlexEnd, ItemPositionLeft, ItemPositionRight};
</span><span class="cx"> enum OverflowAlignment {OverflowAlignmentDefault, OverflowAlignmentTrue, OverflowAlignmentSafe};
</span><span class="cx"> enum ItemPositionType {NonLegacyPosition, LegacyPosition};
</span><ins>+enum ContentPosition {ContentPositionAuto, ContentPositionBaseline, ContentPositionLastBaseline, ContentPositionCenter, ContentPositionStart, ContentPositionEnd, ContentPositionFlexStart, ContentPositionFlexEnd, ContentPositionLeft, ContentPositionRight};
+enum ContentDistributionType {ContentDistributionDefault, ContentDistributionSpaceBetween, ContentDistributionSpaceAround, ContentDistributionSpaceEvenly, ContentDistributionStretch};
</ins><span class="cx"> 
</span><span class="cx"> enum ETextSecurity {
</span><span class="cx">     TSNONE, TSDISC, TSCIRCLE, TSSQUARE
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleContentAlignmentDatah"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/rendering/style/StyleContentAlignmentData.h (0 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleContentAlignmentData.h                                (rev 0)
+++ trunk/Source/WebCore/rendering/style/StyleContentAlignmentData.h        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/*
+ * Copyright (C) 2015 Igalia S.L. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef StyleContentAlignmentData_h
+#define StyleContentAlignmentData_h
+
+#include &quot;RenderStyleConstants.h&quot;
+
+namespace WebCore {
+
+class StyleContentAlignmentData {
+public:
+    // Style data for Content-Distribution properties: align-content, justify-content.
+    // &lt;content-distribution&gt; || [ &lt;overflow-position&gt;? &amp;&amp; &lt;content-position&gt; ]
+    StyleContentAlignmentData(ContentPosition position, ContentDistributionType distribution, OverflowAlignment overflow = OverflowAlignmentDefault)
+        : m_position(position)
+        , m_distribution(distribution)
+        , m_overflow(overflow)
+    {
+    }
+
+    void setPosition(ContentPosition position) { m_position = position; }
+    void setDistribution(ContentDistributionType distribution) { m_distribution = distribution; }
+    void setOverflow(OverflowAlignment overflow) { m_overflow = overflow; }
+
+    ContentPosition position() const { return static_cast&lt;ContentPosition&gt;(m_position); }
+    ContentDistributionType distribution() const { return static_cast&lt;ContentDistributionType&gt;(m_distribution); }
+    OverflowAlignment overflow() const { return static_cast&lt;OverflowAlignment&gt;(m_overflow); }
+
+    bool operator==(const StyleContentAlignmentData&amp; o) const
+    {
+        return m_position == o.m_position &amp;&amp; m_distribution == o.m_distribution &amp;&amp; m_overflow == o.m_overflow;
+    }
+
+    bool operator!=(const StyleContentAlignmentData&amp; o) const
+    {
+        return !(*this == o);
+    }
+
+private:
+    unsigned m_position : 4; // ContentPosition
+    unsigned m_distribution : 3; // ContentDistributionType
+    unsigned m_overflow : 2; // OverflowAlignment
+};
+
+} // namespace WebCore
+
+#endif // StyleContentAlignmentData_h
</ins></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -73,6 +73,7 @@
</span><span class="cx">     , m_regionThread(RenderStyle::initialRegionThread())
</span><span class="cx">     , m_alignItems(RenderStyle::initialSelfAlignment())
</span><span class="cx">     , m_alignSelf(RenderStyle::initialSelfAlignment())
</span><ins>+    , m_justifyContent(RenderStyle::initialContentAlignment())
</ins><span class="cx">     , m_justifyItems(RenderStyle::initialSelfAlignment())
</span><span class="cx">     , m_justifySelf(RenderStyle::initialSelfAlignment())
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><span class="lines">@@ -86,7 +87,6 @@
</span><span class="cx">     , m_transformStyle3D(RenderStyle::initialTransformStyle3D())
</span><span class="cx">     , m_backfaceVisibility(RenderStyle::initialBackfaceVisibility())
</span><span class="cx">     , m_alignContent(RenderStyle::initialAlignContent())
</span><del>-    , m_justifyContent(RenderStyle::initialJustifyContent())
</del><span class="cx">     , userDrag(RenderStyle::initialUserDrag())
</span><span class="cx">     , textOverflow(RenderStyle::initialTextOverflow())
</span><span class="cx">     , marginBeforeCollapse(MCOLLAPSE)
</span><span class="lines">@@ -161,6 +161,7 @@
</span><span class="cx">     , m_regionThread(o.m_regionThread)
</span><span class="cx">     , m_alignItems(o.m_alignItems)
</span><span class="cx">     , m_alignSelf(o.m_alignSelf)
</span><ins>+    , m_justifyContent(o.m_justifyContent)
</ins><span class="cx">     , m_justifyItems(o.m_justifyItems)
</span><span class="cx">     , m_justifySelf(o.m_justifySelf)
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><span class="lines">@@ -174,7 +175,6 @@
</span><span class="cx">     , m_transformStyle3D(o.m_transformStyle3D)
</span><span class="cx">     , m_backfaceVisibility(o.m_backfaceVisibility)
</span><span class="cx">     , m_alignContent(o.m_alignContent)
</span><del>-    , m_justifyContent(o.m_justifyContent)
</del><span class="cx">     , userDrag(o.userDrag)
</span><span class="cx">     , textOverflow(o.textOverflow)
</span><span class="cx">     , marginBeforeCollapse(o.marginBeforeCollapse)
</span><span class="lines">@@ -258,6 +258,7 @@
</span><span class="cx">         &amp;&amp; m_flowThread == o.m_flowThread
</span><span class="cx">         &amp;&amp; m_alignItems == o.m_alignItems
</span><span class="cx">         &amp;&amp; m_alignSelf == o.m_alignSelf
</span><ins>+        &amp;&amp; m_justifyContent == o.m_justifyContent
</ins><span class="cx">         &amp;&amp; m_justifyItems == o.m_justifyItems
</span><span class="cx">         &amp;&amp; m_justifySelf == o.m_justifySelf
</span><span class="cx">         &amp;&amp; m_regionThread == o.m_regionThread
</span><span class="lines">@@ -269,7 +270,6 @@
</span><span class="cx">         &amp;&amp; m_transformStyle3D == o.m_transformStyle3D
</span><span class="cx">         &amp;&amp; m_backfaceVisibility == o.m_backfaceVisibility
</span><span class="cx">         &amp;&amp; m_alignContent == o.m_alignContent
</span><del>-        &amp;&amp; m_justifyContent == o.m_justifyContent
</del><span class="cx">         &amp;&amp; userDrag == o.userDrag
</span><span class="cx">         &amp;&amp; textOverflow == o.textOverflow
</span><span class="cx">         &amp;&amp; marginBeforeCollapse == o.marginBeforeCollapse
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h (183747 => 183748)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h        2015-05-04 16:22:23 UTC (rev 183747)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h        2015-05-04 17:25:21 UTC (rev 183748)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #include &quot;LineClampValue.h&quot;
</span><span class="cx"> #include &quot;NinePieceImage.h&quot;
</span><span class="cx"> #include &quot;ShapeValue.h&quot;
</span><ins>+#include &quot;StyleContentAlignmentData.h&quot;
</ins><span class="cx"> #include &quot;StyleSelfAlignmentData.h&quot;
</span><span class="cx"> #include &lt;memory&gt;
</span><span class="cx"> #include &lt;wtf/PassRefPtr.h&gt;
</span><span class="lines">@@ -178,6 +179,7 @@
</span><span class="cx"> 
</span><span class="cx">     StyleSelfAlignmentData m_alignItems;
</span><span class="cx">     StyleSelfAlignmentData m_alignSelf;
</span><ins>+    StyleContentAlignmentData m_justifyContent;
</ins><span class="cx">     StyleSelfAlignmentData m_justifyItems;
</span><span class="cx">     StyleSelfAlignmentData m_justifySelf;
</span><span class="cx"> 
</span><span class="lines">@@ -196,7 +198,6 @@
</span><span class="cx">     unsigned m_backfaceVisibility : 1; // EBackfaceVisibility
</span><span class="cx"> 
</span><span class="cx">     unsigned m_alignContent : 3; // EAlignContent
</span><del>-    unsigned m_justifyContent : 3; // EJustifyContent
</del><span class="cx"> 
</span><span class="cx">     unsigned userDrag : 2; // EUserDrag
</span><span class="cx">     unsigned textOverflow : 1; // Whether or not lines that spill out should be truncated with &quot;...&quot;
</span></span></pre>
</div>
</div>

</body>
</html>