No subject
Fri Mar 7 15:32:22 PST 2014
Broaden justify-self's parsing name and upgrade align-self and
align-items parsing to CSS 3.
* css3/flexbox/css-properties-expected.txt:
* css3/flexbox/css-properties.html:
* css3/parse-align-items-expected.txt: Added.
* css3/parse-align-items.html: Added.
* css3/parse-align-self-expected.txt: Added.
* css3/parse-align-self.html: Added.
* css3/resources/alignment-parsing-utils.js: Added.
(checkValues):
(checkBadValues):
(checkInitialValues):
(checkInheritValues):
(checkLegacyValues):
* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/getComputedStyle/resources/property-names.js:
* svg/css/getComputedStyle-basic-expected.txt:
* platform/gtk/TestExpectations: Report new failures and update expectations.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestscss3flexboxcsspropertiesexpectedtxt">trunk/LayoutTests/css3/flexbox/css-properties-expected.txt</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="#trunkLayoutTestsfastcssgetComputedStyleresourcespropertynamesjs">trunk/LayoutTests/fast/css/getComputedStyle/resources/property-names.js</a></li>
<li><a href="#trunkLayoutTestssvgcssgetComputedStylebasicexpectedtxt">trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#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="#trunkSourceWebCorecssCSSValueKeywordsin">trunk/Source/WebCore/css/CSSValueKeywords.in</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolvercpp">trunk/Source/WebCore/css/StyleResolver.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleResolverh">trunk/Source/WebCore/css/StyleResolver.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderFlexibleBoxcpp">trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderFlexibleBoxh">trunk/Source/WebCore/rendering/RenderFlexibleBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderFullScreencpp">trunk/Source/WebCore/rendering/RenderFullScreen.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMenuListcpp">trunk/Source/WebCore/rendering/RenderMenuList.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingmathmlRenderMathMLRootcpp">trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.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>
<li><a href="#trunkSourceWebCorestyleStyleResolveTreecpp">trunk/Source/WebCore/style/StyleResolveTree.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestscss3parsealignitemsexpectedtxt">trunk/LayoutTests/css3/parse-align-items-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3parsealignitemshtml">trunk/LayoutTests/css3/parse-align-items.html</a></li>
<li><a href="#trunkLayoutTestscss3parsealignselfexpectedtxt">trunk/LayoutTests/css3/parse-align-self-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3parsealignselfhtml">trunk/LayoutTests/css3/parse-align-self.html</a></li>
<li><a href="#trunkLayoutTestscss3resourcesalignmentparsingutilsjs">trunk/LayoutTests/css3/resources/alignment-parsing-utils.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/LayoutTests/ChangeLog 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2014-11-17 Javier Fernandez <jfernandez at igalia.com>
+
+ [CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3
+ https://bugs.webkit.org/show_bug.cgi?id=133359
+
+ Reviewed by David Hyatt.
+
+ From Blink r164817 and r165264 by <jchaffraix at chromium.org>
+
+ Broaden justify-self's parsing name and upgrade align-self and
+ align-items parsing to CSS 3.
+
+ * css3/flexbox/css-properties-expected.txt:
+ * css3/flexbox/css-properties.html:
+ * css3/parse-align-items-expected.txt: Added.
+ * css3/parse-align-items.html: Added.
+ * css3/parse-align-self-expected.txt: Added.
+ * css3/parse-align-self.html: Added.
+ * css3/resources/alignment-parsing-utils.js: Added.
+ (checkValues):
+ (checkBadValues):
+ (checkInitialValues):
+ (checkInheritValues):
+ (checkLegacyValues):
+ * fast/css/getComputedStyle/computed-style-expected.txt:
+ * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
+ * fast/css/getComputedStyle/resources/property-names.js:
+ * svg/css/getComputedStyle-basic-expected.txt:
+ * platform/gtk/TestExpectations: Report new failures and update expectations.
+
</ins><span class="cx"> 2014-11-17 Shivakumar JM <shiva.jm at samsung.com>
</span><span class="cx">
</span><span class="cx"> Attribute text in HTMLAnchorElement should behave as per specification.
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/LayoutTests/TestExpectations 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -67,6 +67,10 @@
</span><span class="cx"> # This test verifies dynamic manipulation of the mroot and msqrt elements.
</span><span class="cx"> mathml/roots-removeChild.html [ ImageOnlyFailure ]
</span><span class="cx">
</span><ins>+webkit.org/b/133359 mathml/presentation/style-changed.html [ ImageOnlyFailure ]
+webkit.org/b/136291 platform/mac/accessibility/webkit-alt-for-css-content.html [ Failure ]
+webkit.org/b/136291 platform/mac/accessibility/alt-for-css-content.html [ Failure ]
+
</ins><span class="cx"> # This test verifies that a mismatch reftest will fail as intended if both results are same. (introduced in r93187)
</span><span class="cx"> fast/harness/sample-fail-mismatch-reftest.html [ WontFix ImageOnlyFailure ]
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestscss3flexboxcsspropertiesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/flexbox/css-properties-expected.txt (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/flexbox/css-properties-expected.txt 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/LayoutTests/css3/flexbox/css-properties-expected.txt 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -29,11 +29,12 @@
</span><span class="cx"> PASS flexbox.style.webkitJustifyContent is ""
</span><span class="cx"> PASS window.getComputedStyle(flexbox, null).webkitJustifyContent is "flex-start"
</span><span class="cx"> PASS flexbox.style.webkitAlignSelf is ""
</span><del>-PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "stretch"
-PASS window.getComputedStyle(document.documentElement, null).webkitAlignSelf is "stretch"
</del><ins>+PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "start"
+PASS window.getComputedStyle(document.documentElement, null).webkitAlignSelf is "auto"
</ins><span class="cx"> PASS flexbox.style.webkitAlignSelf is ""
</span><ins>+PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "start"
</ins><span class="cx"> PASS flexbox.style.webkitAlignSelf is "auto"
</span><del>-PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "stretch"
</del><ins>+PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "start"
</ins><span class="cx"> PASS flexbox.style.webkitAlignSelf is "flex-start"
</span><span class="cx"> PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "flex-start"
</span><span class="cx"> PASS flexbox.style.webkitAlignSelf is "flex-end"
</span><span class="lines">@@ -45,15 +46,21 @@
</span><span class="cx"> PASS flexbox.style.webkitAlignSelf is "baseline"
</span><span class="cx"> PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "baseline"
</span><span class="cx"> PASS flexbox.style.webkitAlignSelf is ""
</span><del>-PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "stretch"
</del><ins>+PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "start"
</ins><span class="cx"> PASS flexbox.style.webkitAlignItems is ""
</span><ins>+PASS flexitem.style.webkitAlignSelf is ""
</ins><span class="cx"> PASS window.getComputedStyle(flexbox, null).webkitAlignItems is "stretch"
</span><span class="cx"> PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "stretch"
</span><span class="cx"> PASS flexbox.style.webkitAlignItems is ""
</span><del>-PASS flexbox.style.webkitAlignItems is ""
</del><ins>+PASS flexitem.style.webkitAlignSelf is ""
</ins><span class="cx"> PASS window.getComputedStyle(flexbox, null).webkitAlignItems is "stretch"
</span><span class="cx"> PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "stretch"
</span><ins>+PASS flexbox.style.webkitAlignItems is "auto"
+PASS flexitem.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(flexbox, null).webkitAlignItems is "stretch"
+PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "stretch"
</ins><span class="cx"> PASS flexbox.style.webkitAlignItems is "flex-start"
</span><ins>+PASS flexitem.style.webkitAlignSelf is ""
</ins><span class="cx"> PASS window.getComputedStyle(flexbox, null).webkitAlignItems is "flex-start"
</span><span class="cx"> PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "flex-start"
</span><span class="cx"> PASS flexbox.style.webkitAlignItems is "flex-end"
</span><span class="lines">@@ -72,8 +79,8 @@
</span><span class="cx"> PASS window.getComputedStyle(flexbox, null).webkitAlignItems is "stretch"
</span><span class="cx"> PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "stretch"
</span><span class="cx"> PASS flexbox.style.webkitAlignItems is ""
</span><del>-PASS window.getComputedStyle(flexbox, null).webkitAlignItems is "stretch"
-PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "stretch"
</del><ins>+PASS window.getComputedStyle(flexbox, null).webkitAlignItems is "start"
+PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "start"
</ins><span class="cx"> PASS window.getComputedStyle(detachedFlexbox, null).webkitAlignSelf is ""
</span><span class="cx"> PASS window.getComputedStyle(detachedFlexItem, null).webkitAlignSelf is ""
</span><span class="cx"> PASS flexbox.style.webkitFlexDirection is ""
</span></span></pre></div>
<a id="trunkLayoutTestscss3flexboxcsspropertieshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/flexbox/css-properties.html (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/flexbox/css-properties.html 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/LayoutTests/css3/flexbox/css-properties.html 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -78,18 +78,20 @@
</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><ins>+flexbox.style.display = '-webkit-flex';
</ins><span class="cx">
</span><span class="cx"> shouldBeEqualToString('flexbox.style.webkitAlignSelf', '');
</span><del>-// The initial value is 'stretch'.
-shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', 'stretch');
-shouldBeEqualToString('window.getComputedStyle(document.documentElement, null).webkitAlignSelf', 'stretch');
</del><ins>+// The initial value is 'auto', which will be resolved depending on parent's style (except for the 'document' element).
+shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', 'start');
+shouldBeEqualToString('window.getComputedStyle(document.documentElement, null).webkitAlignSelf', 'auto');
</ins><span class="cx">
</span><span class="cx"> flexbox.style.webkitAlignSelf = 'foo';
</span><span class="cx"> shouldBeEqualToString('flexbox.style.webkitAlignSelf', '');
</span><ins>+shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', 'start');
</ins><span class="cx">
</span><span class="cx"> flexbox.style.webkitAlignSelf = 'auto';
</span><span class="cx"> shouldBeEqualToString('flexbox.style.webkitAlignSelf', 'auto');
</span><del>-shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', 'stretch');
</del><ins>+shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', 'start');
</ins><span class="cx">
</span><span class="cx"> flexbox.style.webkitAlignSelf = 'flex-start';
</span><span class="cx"> shouldBeEqualToString('flexbox.style.webkitAlignSelf', 'flex-start');
</span><span class="lines">@@ -113,23 +115,29 @@
</span><span class="cx">
</span><span class="cx"> flexbox.style.webkitAlignSelf = '';
</span><span class="cx"> shouldBeEqualToString('flexbox.style.webkitAlignSelf', '');
</span><del>-shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', 'stretch');
</del><ins>+shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', 'start');
</ins><span class="cx">
</span><span class="cx"> shouldBeEqualToString('flexbox.style.webkitAlignItems', '');
</span><del>-// The initial value is 'stretch'.
</del><ins>+shouldBeEqualToString('flexitem.style.webkitAlignSelf', '');
+// The initial value is 'auto', which will be resolved to 'stretch' in case of flexbox containers.
</ins><span class="cx"> shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', 'stretch');
</span><span class="cx"> shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', 'stretch');
</span><span class="cx">
</span><span class="cx"> flexbox.style.webkitAlignItems = 'foo';
</span><span class="cx"> shouldBeEqualToString('flexbox.style.webkitAlignItems', '');
</span><ins>+shouldBeEqualToString('flexitem.style.webkitAlignSelf', '');
+shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', 'stretch');
+shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', 'stretch');
</ins><span class="cx">
</span><span class="cx"> flexbox.style.webkitAlignItems = 'auto';
</span><del>-shouldBeEqualToString('flexbox.style.webkitAlignItems', '');
</del><ins>+shouldBeEqualToString('flexbox.style.webkitAlignItems', 'auto');
+shouldBeEqualToString('flexitem.style.webkitAlignSelf', '');
</ins><span class="cx"> shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', 'stretch');
</span><span class="cx"> shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', 'stretch');
</span><span class="cx">
</span><span class="cx"> flexbox.style.webkitAlignItems = 'flex-start';
</span><span class="cx"> shouldBeEqualToString('flexbox.style.webkitAlignItems', 'flex-start');
</span><ins>+shouldBeEqualToString('flexitem.style.webkitAlignSelf', '');
</ins><span class="cx"> shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', 'flex-start');
</span><span class="cx"> shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', 'flex-start');
</span><span class="cx">
</span><span class="lines">@@ -160,8 +168,8 @@
</span><span class="cx">
</span><span class="cx"> flexbox.style.display = 'none';
</span><span class="cx"> shouldBeEqualToString('flexbox.style.webkitAlignItems', '');
</span><del>-shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', 'stretch');
-shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', 'stretch');
</del><ins>+shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', 'start');
+shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', 'start');
</ins><span class="cx"> flexbox.style.display = '';
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestscss3parsealignitemsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/parse-align-items-expected.txt (0 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/parse-align-items-expected.txt (rev 0)
+++ trunk/LayoutTests/css3/parse-align-items-expected.txt 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -0,0 +1,137 @@
</span><ins>+Test that setting and getting align-items works as expected
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Test getting align-items set through CSS
+PASS getComputedStyle(alignItemsBaseline, '').getPropertyValue('-webkit-align-items') is 'baseline'
+PASS getComputedStyle(alignItemsLastBaseline, '').getPropertyValue('-webkit-align-items') is 'last-baseline'
+PASS getComputedStyle(alignItemsStretch, '').getPropertyValue('-webkit-align-items') is 'stretch'
+PASS getComputedStyle(alignItemsStart, '').getPropertyValue('-webkit-align-items') is 'start'
+PASS getComputedStyle(alignItemsEnd, '').getPropertyValue('-webkit-align-items') is 'end'
+PASS getComputedStyle(alignItemsCenter, '').getPropertyValue('-webkit-align-items') is 'center'
+PASS getComputedStyle(alignItemsSelfEnd, '').getPropertyValue('-webkit-align-items') is 'self-end'
+PASS getComputedStyle(alignItemsSelfStart, '').getPropertyValue('-webkit-align-items') is 'self-start'
+PASS getComputedStyle(alignItemsLeft, '').getPropertyValue('-webkit-align-items') is 'left'
+PASS getComputedStyle(alignItemsRight, '').getPropertyValue('-webkit-align-items') is 'right'
+PASS getComputedStyle(alignItemsFlexStart, '').getPropertyValue('-webkit-align-items') is 'flex-start'
+PASS getComputedStyle(alignItemsFlexEnd, '').getPropertyValue('-webkit-align-items') is 'flex-end'
+PASS getComputedStyle(alignItemsEndTrue, '').getPropertyValue('-webkit-align-items') is 'end true'
+PASS getComputedStyle(alignItemsCenterTrue, '').getPropertyValue('-webkit-align-items') is 'center true'
+PASS getComputedStyle(alignItemsSelfEndSafe, '').getPropertyValue('-webkit-align-items') is 'self-end safe'
+PASS getComputedStyle(alignItemsSelfStartSafe, '').getPropertyValue('-webkit-align-items') is 'self-start safe'
+PASS getComputedStyle(alignItemsRightSafe, '').getPropertyValue('-webkit-align-items') is 'right safe'
+PASS getComputedStyle(alignItemsLeftTrue, '').getPropertyValue('-webkit-align-items') is 'left true'
+PASS getComputedStyle(alignItemsFlexStartTrue, '').getPropertyValue('-webkit-align-items') is 'flex-start true'
+PASS getComputedStyle(alignItemsFlexEndSafe, '').getPropertyValue('-webkit-align-items') is 'flex-end safe'
+
+Test initial value of align-items through JS
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is 'start'
+
+Test getting and setting align-items through JS
+PASS element.style.webkitAlignItems is "center"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "center"
+PASS element.style.webkitAlignItems is "start true"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start true"
+PASS element.style.webkitAlignItems is "flex-end safe"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "flex-end safe"
+PASS element.style.webkitAlignItems is "right"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "right"
+PASS element.style.webkitAlignItems is "center"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "center"
+PASS element.style.webkitAlignItems is "self-start"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "self-start"
+PASS element.style.webkitAlignItems is "auto"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is "auto"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "stretch"
+PASS element.style.webkitAlignItems is "auto"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "stretch"
+PASS element.style.webkitAlignItems is "self-end"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "self-end"
+
+Test bad combinations of align-items
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+PASS element.style.webkitAlignItems is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+
+Test the value 'initial'
+PASS element.style.webkitAlignItems is "center"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "center"
+PASS element.style.webkitAlignItems is "initial"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "start"
+
+Test the value 'initial' for grid containers
+PASS element.style.webkitAlignItems is "left safe"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "left safe"
+PASS element.style.webkitAlignItems is "initial"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "stretch"
+
+Test the value 'initial' for flex containers
+PASS element.style.webkitAlignItems is "right true"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "right true"
+PASS element.style.webkitAlignItems is "initial"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "stretch"
+
+Test the value 'inherit'
+PASS element.style.webkitAlignItems is "end"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "end"
+PASS element.style.webkitAlignItems is "inherit"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "end"
+PASS element.style.webkitAlignItems is "left safe"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "left safe"
+PASS element.style.webkitAlignItems is "inherit"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "left safe"
+PASS element.style.webkitAlignItems is "center true"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "center true"
+PASS element.style.webkitAlignItems is "inherit"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-items') is "center true"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscss3parsealignitemshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/parse-align-items.html (0 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/parse-align-items.html (rev 0)
+++ trunk/LayoutTests/css3/parse-align-items.html 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -0,0 +1,270 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<style>
+#alignItemsBaseline {
+ -webkit-align-items: baseline;
+}
+
+#alignItemsLastBaseline {
+ -webkit-align-items: last-baseline;
+}
+
+#alignItemsStretch {
+ -webkit-align-items: stretch;
+}
+
+#alignItemsStart {
+ -webkit-align-items: start;
+}
+
+#alignItemsEnd {
+ -webkit-align-items: end;
+}
+
+#alignItemsCenter {
+ -webkit-align-items: center;
+}
+
+#alignItemsSelfStart {
+ -webkit-align-items: self-start;
+}
+
+#alignItemsSelfEnd {
+ -webkit-align-items: self-end;
+}
+
+#alignItemsLeft {
+ -webkit-align-items: left;
+}
+
+#alignItemsRight {
+ -webkit-align-items: right;
+}
+
+#alignItemsFlexStart {
+ -webkit-align-items: flex-start;
+}
+
+#alignItemsFlexEnd {
+ -webkit-align-items: flex-end;
+}
+
+#alignItemsEndTrue {
+ -webkit-align-items: end true;
+}
+
+#alignItemsCenterTrue {
+ -webkit-align-items: center true;
+}
+
+#alignItemsSelfEndSafe {
+ -webkit-align-items: self-end safe;
+}
+
+#alignItemsSelfStartSafe {
+ -webkit-align-items: self-start safe;
+}
+
+#alignItemsRightSafe {
+ -webkit-align-items: right safe;
+}
+
+#alignItemsLeftTrue {
+ -webkit-align-items: left true;
+}
+
+#alignItemsFlexStartTrue {
+ -webkit-align-items: flex-start true;
+}
+
+#alignItemsFlexEndSafe {
+ -webkit-align-items: flex-end safe;
+}
+
+</style>
+<script src="../resources/js-test.js"></script>
+</head>
+<body>
+<div id="alignItemsBaseline"></div>
+<div id="alignItemsLastBaseline"></div>
+<div id="alignItemsStretch"></div>
+<div id="alignItemsStart"></div>
+<div id="alignItemsEnd"></div>
+<div id="alignItemsCenter"></div>
+<div id="alignItemsSelfStart"></div>
+<div id="alignItemsSelfEnd"></div>
+<div id="alignItemsLeft"></div>
+<div id="alignItemsRight"></div>
+<div id="alignItemsFlexStart"></div>
+<div id="alignItemsFlexEnd"></div>
+
+<div id="alignItemsEndTrue"></div>
+<div id="alignItemsCenterTrue"></div>
+<div id="alignItemsSelfEndSafe"></div>
+<div id="alignItemsSelfStartSafe"></div>
+<div id="alignItemsRightSafe"></div>
+<div id="alignItemsLeftTrue"></div>
+<div id="alignItemsFlexStartTrue"></div>
+<div id="alignItemsFlexEndSafe"></div>
+<script src="resources/alignment-parsing-utils.js"></script>
+<script>
+description('Test that setting and getting align-items works as expected');
+
+debug("Test getting align-items set through CSS");
+var alignItemsBaseline = document.getElementById("alignItemsBaseline");
+shouldBe("getComputedStyle(alignItemsBaseline, '').getPropertyValue('-webkit-align-items')", "'baseline'");
+
+var alignItemsLastBaseline = document.getElementById("alignItemsLastBaseline");
+shouldBe("getComputedStyle(alignItemsLastBaseline, '').getPropertyValue('-webkit-align-items')", "'last-baseline'");
+
+var alignItemsStretch = document.getElementById("alignItemsStretch");
+shouldBe("getComputedStyle(alignItemsStretch, '').getPropertyValue('-webkit-align-items')", "'stretch'");
+
+var alignItemsStart = document.getElementById("alignItemsStart");
+shouldBe("getComputedStyle(alignItemsStart, '').getPropertyValue('-webkit-align-items')", "'start'");
+
+var alignItemsEnd = document.getElementById("alignItemsEnd");
+shouldBe("getComputedStyle(alignItemsEnd, '').getPropertyValue('-webkit-align-items')", "'end'");
+
+var alignItemsCenter = document.getElementById("alignItemsCenter");
+shouldBe("getComputedStyle(alignItemsCenter, '').getPropertyValue('-webkit-align-items')", "'center'");
+
+var alignItemsSelfEnd = document.getElementById("alignItemsSelfEnd");
+shouldBe("getComputedStyle(alignItemsSelfEnd, '').getPropertyValue('-webkit-align-items')", "'self-end'");
+
+var alignItemsSelfStart = document.getElementById("alignItemsSelfStart");
+shouldBe("getComputedStyle(alignItemsSelfStart, '').getPropertyValue('-webkit-align-items')", "'self-start'");
+
+var alignItemsLeft = document.getElementById("alignItemsLeft");
+shouldBe("getComputedStyle(alignItemsLeft, '').getPropertyValue('-webkit-align-items')", "'left'");
+
+var alignItemsRight = document.getElementById("alignItemsRight");
+shouldBe("getComputedStyle(alignItemsRight, '').getPropertyValue('-webkit-align-items')", "'right'");
+
+var alignItemsFlexStart = document.getElementById("alignItemsFlexStart");
+shouldBe("getComputedStyle(alignItemsFlexStart, '').getPropertyValue('-webkit-align-items')", "'flex-start'");
+
+var alignItemsFlexEnd = document.getElementById("alignItemsFlexEnd");
+shouldBe("getComputedStyle(alignItemsFlexEnd, '').getPropertyValue('-webkit-align-items')", "'flex-end'");
+
+var alignItemsEndTrue = document.getElementById("alignItemsEndTrue");
+shouldBe("getComputedStyle(alignItemsEndTrue, '').getPropertyValue('-webkit-align-items')", "'end true'");
+
+var alignItemsCenterTrue = document.getElementById("alignItemsCenterTrue");
+shouldBe("getComputedStyle(alignItemsCenterTrue, '').getPropertyValue('-webkit-align-items')", "'center true'");
+
+var alignItemsSelfEndSafe = document.getElementById("alignItemsSelfEndSafe");
+shouldBe("getComputedStyle(alignItemsSelfEndSafe, '').getPropertyValue('-webkit-align-items')", "'self-end safe'");
+
+var alignItemsSelfStartSafe = document.getElementById("alignItemsSelfStartSafe");
+shouldBe("getComputedStyle(alignItemsSelfStartSafe, '').getPropertyValue('-webkit-align-items')", "'self-start safe'");
+
+var alignItemsRightSafe = document.getElementById("alignItemsRightSafe");
+shouldBe("getComputedStyle(alignItemsRightSafe, '').getPropertyValue('-webkit-align-items')", "'right safe'");
+
+var alignItemsLeftTrue = document.getElementById("alignItemsLeftTrue");
+shouldBe("getComputedStyle(alignItemsLeftTrue, '').getPropertyValue('-webkit-align-items')", "'left true'");
+
+var alignItemsFlexStartTrue = document.getElementById("alignItemsFlexStartTrue");
+shouldBe("getComputedStyle(alignItemsFlexStartTrue, '').getPropertyValue('-webkit-align-items')", "'flex-start true'");
+
+var alignItemsFlexEndSafe = document.getElementById("alignItemsFlexEndSafe");
+shouldBe("getComputedStyle(alignItemsFlexEndSafe, '').getPropertyValue('-webkit-align-items')", "'flex-end safe'");
+
+debug("");
+debug("Test initial value of align-items through JS");
+element = document.createElement("div");
+document.body.appendChild(element);
+shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-align-items')", "'start'");
+
+debug("");
+debug("Test getting and setting align-items through JS");
+element = document.createElement("div");
+document.body.appendChild(element);
+element.style.webkitAlignItems = "center";
+checkValues(element, "webkitAlignItems", "-webkit-align-items", "center", "center");
+
+element.style.webkitAlignItems = "true start";
+checkValues(element, "webkitAlignItems", "-webkit-align-items", "start true", "start true");
+
+element.style.webkitAlignItems = "flex-end safe";
+checkValues(element, "webkitAlignItems", "-webkit-align-items", "flex-end safe", "flex-end safe");
+
+element.style.webkitAlignItems = "right";
+checkValues(element, "webkitAlignItems", "-webkit-align-items", "right", "right");
+
+element.style.webkitAlignItems = "center";
+checkValues(element, "webkitAlignItems", "-webkit-align-items", "center", "center");
+
+element.style.webkitAlignItems = "self-start";
+checkValues(element, "webkitAlignItems", "-webkit-align-items", "self-start", "self-start");
+
+element.style.webkitAlignItems = "auto";
+checkValues(element, "webkitAlignItems", "-webkit-align-items", "auto", "start");
+
+element.style.display = "-webkit-flex";
+element.style.webkitAlignItems = "auto";
+checkValues(element, "webkitAlignItems", "-webkit-align-items", "auto", "stretch");
+
+element.style.display = "-webkit-grid";
+element.style.webkitAlignItems = "auto";
+checkValues(element, "webkitAlignItems", "-webkit-align-items", "auto", "stretch");
+
+element.style.webkitAlignItems = "self-end";
+checkValues(element, "webkitAlignItems", "-webkit-align-items", "self-end", "self-end");
+
+debug("");
+debug("Test bad combinations of align-items");
+element = document.createElement("div");
+document.body.appendChild(element);
+
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "true auto");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "auto safe");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "auto left");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "baseline safe");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "baseline center");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "stretch true");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "stretch right");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "true true");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "true safe");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "center start");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "stretch true");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "safe stretch");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "baseline safe");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "true baseline");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "true safe left");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "true left safe");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "left safe true safe");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "legacy start");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "legacy end");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "legacy right true");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "legacy auto");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "legacy stretch");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "legacy");
+checkBadValues(element, "webkitAlignItems", "-webkit-align-items", "legacy left right");
+
+debug("");
+debug("Test the value 'initial'");
+element.style.display = "";
+checkInitialValues(element, "webkitAlignItems", "-webkit-align-items", "center", "start");
+
+debug("");
+debug("Test the value 'initial' for grid containers");
+element.style.display = "-webkit-grid";
+checkInitialValues(element, "webkitAlignItems", "-webkit-align-items", "left safe", "stretch");
+
+debug("");
+debug("Test the value 'initial' for flex containers");
+element.style.display = "-webkit-flex";
+checkInitialValues(element, "webkitAlignItems", "-webkit-align-items", "right true", "stretch");
+
+debug("");
+debug("Test the value 'inherit'");
+checkInheritValues("webkitAlignItems", "-webkit-align-items", "end");
+checkInheritValues("webkitAlignItems", "-webkit-align-items", "left safe");
+checkInheritValues("webkitAlignItems", "-webkit-align-items", "center true");
+
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestscss3parsealignselfexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/parse-align-self-expected.txt (0 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/parse-align-self-expected.txt (rev 0)
+++ trunk/LayoutTests/css3/parse-align-self-expected.txt 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -0,0 +1,155 @@
</span><ins>+Test that setting and getting align-self works as expected
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Test getting align-self set through CSS
+PASS getComputedStyle(alignSelfBaseline, '').getPropertyValue('-webkit-align-self') is 'baseline'
+PASS getComputedStyle(alignSelfLastBaseline, '').getPropertyValue('-webkit-align-self') is 'last-baseline'
+PASS getComputedStyle(alignSelfStretch, '').getPropertyValue('-webkit-align-self') is 'stretch'
+PASS getComputedStyle(alignSelfStart, '').getPropertyValue('-webkit-align-self') is 'start'
+PASS getComputedStyle(alignSelfEnd, '').getPropertyValue('-webkit-align-self') is 'end'
+PASS getComputedStyle(alignSelfCenter, '').getPropertyValue('-webkit-align-self') is 'center'
+PASS getComputedStyle(alignSelfSelfEnd, '').getPropertyValue('-webkit-align-self') is 'self-end'
+PASS getComputedStyle(alignSelfSelfStart, '').getPropertyValue('-webkit-align-self') is 'self-start'
+PASS getComputedStyle(alignSelfLeft, '').getPropertyValue('-webkit-align-self') is 'left'
+PASS getComputedStyle(alignSelfRight, '').getPropertyValue('-webkit-align-self') is 'right'
+PASS getComputedStyle(alignSelfFlexStart, '').getPropertyValue('-webkit-align-self') is 'flex-start'
+PASS getComputedStyle(alignSelfFlexEnd, '').getPropertyValue('-webkit-align-self') is 'flex-end'
+PASS getComputedStyle(alignSelfEndTrue, '').getPropertyValue('-webkit-align-self') is 'end true'
+PASS getComputedStyle(alignSelfCenterTrue, '').getPropertyValue('-webkit-align-self') is 'center true'
+PASS getComputedStyle(alignSelfSelfEndSafe, '').getPropertyValue('-webkit-align-self') is 'self-end safe'
+PASS getComputedStyle(alignSelfSelfStartSafe, '').getPropertyValue('-webkit-align-self') is 'self-start safe'
+PASS getComputedStyle(alignSelfRightSafe, '').getPropertyValue('-webkit-align-self') is 'right safe'
+PASS getComputedStyle(alignSelfLeftTrue, '').getPropertyValue('-webkit-align-self') is 'left true'
+PASS getComputedStyle(alignSelfFlexStartTrue, '').getPropertyValue('-webkit-align-self') is 'flex-start true'
+PASS getComputedStyle(alignSelfFlexEndSafe, '').getPropertyValue('-webkit-align-self') is 'flex-end safe'
+
+Test initial value of align-self through JS
+PASS getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is 'start'
+
+Test getting and setting align-self through JS
+PASS element.style.webkitAlignSelf is "center"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "center"
+PASS element.style.webkitAlignSelf is "start true"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start true"
+PASS element.style.webkitAlignSelf is "flex-end safe"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "flex-end safe"
+PASS element.style.webkitAlignSelf is "right"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "right"
+PASS element.style.webkitAlignSelf is "center"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "center"
+PASS element.style.webkitAlignSelf is "self-start"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "self-start"
+PASS element.style.webkitAlignSelf is "auto"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is "auto"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "stretch"
+PASS element.style.webkitAlignSelf is "auto"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "stretch"
+PASS element.style.webkitAlignSelf is "self-end"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "self-end"
+
+Test bad combinations of align-self
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+PASS element.style.webkitAlignSelf is ""
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+
+Test the value 'initial'
+PASS element.style.webkitAlignSelf is "center"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "center"
+PASS element.style.webkitAlignSelf is "initial"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "start"
+
+Test the value 'initial' for grid containers
+PASS element.style.webkitAlignSelf is "left safe"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "left safe"
+PASS element.style.webkitAlignSelf is "initial"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "stretch"
+
+Test the value 'initial' for flex containers
+PASS element.style.webkitAlignSelf is "right true"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "right true"
+PASS element.style.webkitAlignSelf is "initial"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "stretch"
+
+Test the value 'initial' for positioned elements
+PASS element.style.webkitAlignSelf is "left"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "left"
+PASS element.style.webkitAlignSelf is "initial"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "stretch"
+
+Test the value 'initial' for positioned elements in grid containers
+PASS element.style.webkitAlignSelf is "right"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "right"
+PASS element.style.webkitAlignSelf is "initial"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "stretch"
+
+Test the value 'initial' for positioned elements in grid containers
+PASS element.style.webkitAlignSelf is "end"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "end"
+PASS element.style.webkitAlignSelf is "initial"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "stretch"
+
+Test the value 'inherit'
+PASS element.style.webkitAlignSelf is "end"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "end"
+PASS element.style.webkitAlignSelf is "inherit"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "end"
+PASS element.style.webkitAlignSelf is "left safe"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "left safe"
+PASS element.style.webkitAlignSelf is "inherit"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "left safe"
+PASS element.style.webkitAlignSelf is "center true"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "center true"
+PASS element.style.webkitAlignSelf is "inherit"
+PASS window.getComputedStyle(element, '').getPropertyValue('-webkit-align-self') is "center true"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestscss3parsealignselfhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/parse-align-self.html (0 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/parse-align-self.html (rev 0)
+++ trunk/LayoutTests/css3/parse-align-self.html 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -0,0 +1,291 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<style>
+#alignSelfBaseline {
+ -webkit-align-self: baseline;
+}
+
+#alignSelfLastBaseline {
+ -webkit-align-self: last-baseline;
+}
+
+#alignSelfStretch {
+ -webkit-align-self: stretch;
+}
+
+#alignSelfStart {
+ -webkit-align-self: start;
+}
+
+#alignSelfEnd {
+ -webkit-align-self: end;
+}
+
+#alignSelfCenter {
+ -webkit-align-self: center;
+}
+
+#alignSelfSelfStart {
+ -webkit-align-self: self-start;
+}
+
+#alignSelfSelfEnd {
+ -webkit-align-self: self-end;
+}
+
+#alignSelfLeft {
+ -webkit-align-self: left;
+}
+
+#alignSelfRight {
+ -webkit-align-self: right;
+}
+
+#alignSelfFlexStart {
+ -webkit-align-self: flex-start;
+}
+
+#alignSelfFlexEnd {
+ -webkit-align-self: flex-end;
+}
+
+#alignSelfEndTrue {
+ -webkit-align-self: end true;
+}
+
+#alignSelfCenterTrue {
+ -webkit-align-self: center true;
+}
+
+#alignSelfSelfEndSafe {
+ -webkit-align-self: self-end safe;
+}
+
+#alignSelfSelfStartSafe {
+ -webkit-align-self: self-start safe;
+}
+
+#alignSelfRightSafe {
+ -webkit-align-self: right safe;
+}
+
+#alignSelfLeftTrue {
+ -webkit-align-self: left true;
+}
+
+#alignSelfFlexStartTrue {
+ -webkit-align-self: flex-start true;
+}
+
+#alignSelfFlexEndSafe {
+ -webkit-align-self: flex-end safe;
+}
+</style>
+<script src="../resources/js-test.js"></script>
+</head>
+<body>
+<div id="alignSelfBaseline"></div>
+<div id="alignSelfLastBaseline"></div>
+<div id="alignSelfStretch"></div>
+<div id="alignSelfStart"></div>
+<div id="alignSelfEnd"></div>
+<div id="alignSelfCenter"></div>
+<div id="alignSelfSelfStart"></div>
+<div id="alignSelfSelfEnd"></div>
+<div id="alignSelfLeft"></div>
+<div id="alignSelfRight"></div>
+<div id="alignSelfFlexStart"></div>
+<div id="alignSelfFlexEnd"></div>
+
+<div id="alignSelfEndTrue"></div>
+<div id="alignSelfCenterTrue"></div>
+<div id="alignSelfSelfEndSafe"></div>
+<div id="alignSelfSelfStartSafe"></div>
+<div id="alignSelfRightSafe"></div>
+<div id="alignSelfLeftTrue"></div>
+<div id="alignSelfFlexStartTrue"></div>
+<div id="alignSelfFlexEndSafe"></div>
+<script src="resources/alignment-parsing-utils.js"></script>
+<script>
+description('Test that setting and getting align-self works as expected');
+
+debug("Test getting align-self set through CSS");
+var alignSelfBaseline = document.getElementById("alignSelfBaseline");
+shouldBe("getComputedStyle(alignSelfBaseline, '').getPropertyValue('-webkit-align-self')", "'baseline'");
+
+var alignSelfLastBaseline = document.getElementById("alignSelfLastBaseline");
+shouldBe("getComputedStyle(alignSelfLastBaseline, '').getPropertyValue('-webkit-align-self')", "'last-baseline'");
+
+var alignSelfStretch = document.getElementById("alignSelfStretch");
+shouldBe("getComputedStyle(alignSelfStretch, '').getPropertyValue('-webkit-align-self')", "'stretch'");
+
+var alignSelfStart = document.getElementById("alignSelfStart");
+shouldBe("getComputedStyle(alignSelfStart, '').getPropertyValue('-webkit-align-self')", "'start'");
+
+var alignSelfEnd = document.getElementById("alignSelfEnd");
+shouldBe("getComputedStyle(alignSelfEnd, '').getPropertyValue('-webkit-align-self')", "'end'");
+
+var alignSelfCenter = document.getElementById("alignSelfCenter");
+shouldBe("getComputedStyle(alignSelfCenter, '').getPropertyValue('-webkit-align-self')", "'center'");
+
+var alignSelfSelfEnd = document.getElementById("alignSelfSelfEnd");
+shouldBe("getComputedStyle(alignSelfSelfEnd, '').getPropertyValue('-webkit-align-self')", "'self-end'");
+
+var alignSelfSelfStart = document.getElementById("alignSelfSelfStart");
+shouldBe("getComputedStyle(alignSelfSelfStart, '').getPropertyValue('-webkit-align-self')", "'self-start'");
+
+var alignSelfLeft = document.getElementById("alignSelfLeft");
+shouldBe("getComputedStyle(alignSelfLeft, '').getPropertyValue('-webkit-align-self')", "'left'");
+
+var alignSelfRight = document.getElementById("alignSelfRight");
+shouldBe("getComputedStyle(alignSelfRight, '').getPropertyValue('-webkit-align-self')", "'right'");
+
+var alignSelfFlexStart = document.getElementById("alignSelfFlexStart");
+shouldBe("getComputedStyle(alignSelfFlexStart, '').getPropertyValue('-webkit-align-self')", "'flex-start'");
+
+var alignSelfFlexEnd = document.getElementById("alignSelfFlexEnd");
+shouldBe("getComputedStyle(alignSelfFlexEnd, '').getPropertyValue('-webkit-align-self')", "'flex-end'");
+
+var alignSelfEndTrue = document.getElementById("alignSelfEndTrue");
+shouldBe("getComputedStyle(alignSelfEndTrue, '').getPropertyValue('-webkit-align-self')", "'end true'");
+
+var alignSelfCenterTrue = document.getElementById("alignSelfCenterTrue");
+shouldBe("getComputedStyle(alignSelfCenterTrue, '').getPropertyValue('-webkit-align-self')", "'center true'");
+
+var alignSelfSelfEndSafe = document.getElementById("alignSelfSelfEndSafe");
+shouldBe("getComputedStyle(alignSelfSelfEndSafe, '').getPropertyValue('-webkit-align-self')", "'self-end safe'");
+
+var alignSelfSelfStartSafe = document.getElementById("alignSelfSelfStartSafe");
+shouldBe("getComputedStyle(alignSelfSelfStartSafe, '').getPropertyValue('-webkit-align-self')", "'self-start safe'");
+
+var alignSelfRightSafe = document.getElementById("alignSelfRightSafe");
+shouldBe("getComputedStyle(alignSelfRightSafe, '').getPropertyValue('-webkit-align-self')", "'right safe'");
+
+var alignSelfLeftTrue = document.getElementById("alignSelfLeftTrue");
+shouldBe("getComputedStyle(alignSelfLeftTrue, '').getPropertyValue('-webkit-align-self')", "'left true'");
+
+var alignSelfFlexStartTrue = document.getElementById("alignSelfFlexStartTrue");
+shouldBe("getComputedStyle(alignSelfFlexStartTrue, '').getPropertyValue('-webkit-align-self')", "'flex-start true'");
+
+var alignSelfFlexEndSafe = document.getElementById("alignSelfFlexEndSafe");
+shouldBe("getComputedStyle(alignSelfFlexEndSafe, '').getPropertyValue('-webkit-align-self')", "'flex-end safe'");
+
+debug("");
+debug("Test initial value of align-self through JS");
+element = document.createElement("div");
+document.body.appendChild(element);
+shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-align-self')", "'start'");
+
+debug("");
+debug("Test getting and setting align-self through JS");
+container = document.createElement("div");
+element = document.createElement("div");
+container.appendChild(element);
+document.body.appendChild(container);
+element.style.webkitAlignSelf = "center";
+checkValues(element, "webkitAlignSelf", "-webkit-align-self", "center", "center");
+
+element.style.webkitAlignSelf = "true start";
+checkValues(element, "webkitAlignSelf", "-webkit-align-self", "start true", "start true");
+
+element.style.webkitAlignSelf = "flex-end safe";
+checkValues(element, "webkitAlignSelf", "-webkit-align-self", "flex-end safe", "flex-end safe");
+
+element.style.webkitAlignSelf = "right";
+checkValues(element, "webkitAlignSelf", "-webkit-align-self", "right", "right");
+
+element.style.webkitAlignSelf = "center";
+checkValues(element, "webkitAlignSelf", "-webkit-align-self", "center", "center");
+
+element.style.webkitAlignSelf = "self-start";
+checkValues(element, "webkitAlignSelf", "-webkit-align-self", "self-start", "self-start");
+
+element.style.webkitAlignSelf = "auto";
+checkValues(element, "webkitAlignSelf", "-webkit-align-self", "auto", "start");
+
+container.style.display = "-webkit-flex";
+element.style.webkitAlignSelf = "auto";
+checkValues(element, "webkitAlignSelf", "-webkit-align-self", "auto", "stretch");
+
+container.style.display = "-webkit-grid";
+element.style.webkitAlignSelf = "auto";
+checkValues(element, "webkitAlignSelf", "-webkit-align-self", "auto", "stretch");
+
+element.style.webkitAlignSelf = "self-end";
+checkValues(element, "webkitAlignSelf", "-webkit-align-self", "self-end", "self-end");
+
+debug("");
+debug("Test bad combinations of align-self");
+container = document.createElement("div");
+element = document.createElement("div");
+container.appendChild(element);
+document.body.appendChild(container);
+
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "true auto");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "auto safe");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "auto left");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "baseline safe");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "baseline center");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "stretch true");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "stretch right");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "true true");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "true safe");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "center start");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "stretch true");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "safe stretch");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "baseline safe");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "true baseline");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "true safe left");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "true left safe");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "left safe true safe");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "legacy start");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "legacy end");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "legacy right true");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "legacy auto");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "legacy stretch");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "legacy");
+checkBadValues(element, "webkitAlignSelf", "-webkit-align-self", "legacy left right");
+
+debug("");
+debug("Test the value 'initial'");
+container.style.display = "";
+checkInitialValues(element, "webkitAlignSelf", "-webkit-align-self", "center", "start");
+
+debug("");
+debug("Test the value 'initial' for grid containers");
+container.style.display = "-webkit-grid";
+checkInitialValues(element, "webkitAlignSelf", "-webkit-align-self", "left safe", "stretch");
+
+debug("");
+debug("Test the value 'initial' for flex containers");
+container.style.display = "-webkit-flex";
+checkInitialValues(element, "webkitAlignSelf", "-webkit-align-self", "right true", "stretch");
+
+debug("");
+debug("Test the value 'initial' for positioned elements");
+container.style.display = "";
+element.style.position = "absolute";
+checkInitialValues(element, "webkitAlignSelf", "-webkit-align-self", "left", "stretch");
+
+debug("");
+debug("Test the value 'initial' for positioned elements in grid containers");
+container.style.display = "-webkit-grid";
+element.style.position = "absolute";
+checkInitialValues(element, "webkitAlignSelf", "-webkit-align-self", "right", "stretch");
+
+debug("");
+debug("Test the value 'initial' for positioned elements in grid containers");
+container.style.display = "-webkit-flex";
+element.style.position = "absolute";
+checkInitialValues(element, "webkitAlignSelf", "-webkit-align-self", "end", "stretch");
+
+debug("");
+debug("Test the value 'inherit'");
+checkInheritValues("webkitAlignSelf", "-webkit-align-self", "end");
+checkInheritValues("webkitAlignSelf", "-webkit-align-self", "left safe");
+checkInheritValues("webkitAlignSelf", "-webkit-align-self", "center true");
+
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestscss3resourcesalignmentparsingutilsjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/resources/alignment-parsing-utils.js (0 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/css3/resources/alignment-parsing-utils.js (rev 0)
+++ trunk/LayoutTests/css3/resources/alignment-parsing-utils.js 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+function checkValues(element, property, propertyID, value, computedValue)
+{
+ window.element = element;
+ var elementID = element.id || "element";
+ shouldBeEqualToString("element.style." + property, value);
+ shouldBeEqualToString("window.getComputedStyle(" + elementID + ", '').getPropertyValue('" + propertyID + "')", computedValue);
+}
+
+function checkBadValues(element, property, propertyID, value)
+{
+ element.style[property] = value;
+ checkValues(element, property, propertyID, "", "start");
+}
+
+function checkInitialValues(element, property, propertyID, value, initial)
+{
+ element.style[property] = value;
+ checkValues(element, property, propertyID, value, value);
+ element.style[property] = "initial";
+ checkValues(element, property, propertyID, "initial", initial);
+}
+
+function checkInheritValues(property, propertyID, value)
+{
+ var parentElement = document.createElement("div");
+ document.body.appendChild(parentElement);
+ parentElement.style[property] = value;
+ checkValues(parentElement, property, propertyID, value, value);
+
+ var element = document.createElement("div");
+ parentElement.appendChild(element);
+ element.style[property] = "inherit";
+ checkValues(element, property, propertyID, "inherit", value);
+}
+
+function checkLegacyValues(property, propertyID, value)
+{
+ var parentElement = document.createElement("div");
+ document.body.appendChild(parentElement);
+ parentElement.style[property] = value;
+ checkValues(parentElement, property, propertyID, value, value);
+
+ var element = document.createElement("div");
+ parentElement.appendChild(element);
+ checkValues(element, property, propertyID, "", value);
+}
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssgetComputedStylecomputedstyleexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -144,11 +144,12 @@
</span><span class="cx"> column-span: none;
</span><span class="cx"> column-width: auto;
</span><span class="cx"> align-content: stretch;
</span><del>-align-items: stretch;
-align-self: stretch;
</del><ins>+align-items: start;
+align-self: start;
</ins><span class="cx"> flex-direction: row;
</span><span class="cx"> flex-wrap: nowrap;
</span><span class="cx"> justify-content: flex-start;
</span><ins>+justify-self: auto;
</ins><span class="cx"> -webkit-font-kerning: auto;
</span><span class="cx"> -webkit-font-smoothing: auto;
</span><span class="cx"> -webkit-font-variant-ligatures: normal;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgetComputedStylecomputedstylewithoutrendererexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -143,11 +143,12 @@
</span><span class="cx"> column-span: none
</span><span class="cx"> column-width: auto
</span><span class="cx"> align-content: stretch
</span><del>-align-items: stretch
-align-self: stretch
</del><ins>+align-items: start
+align-self: start
</ins><span class="cx"> flex-direction: row
</span><span class="cx"> flex-wrap: nowrap
</span><span class="cx"> justify-content: flex-start
</span><ins>+justify-self: auto
</ins><span class="cx"> -webkit-font-kerning: auto
</span><span class="cx"> -webkit-font-smoothing: auto
</span><span class="cx"> -webkit-font-variant-ligatures: normal
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgetComputedStyleresourcespropertynamesjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/getComputedStyle/resources/property-names.js (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/getComputedStyle/resources/property-names.js 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/LayoutTests/fast/css/getComputedStyle/resources/property-names.js 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -65,6 +65,7 @@
</span><span class="cx"> "-webkit-hyphenate-limit-lines": true,
</span><span class="cx"> "-webkit-hyphens": true,
</span><span class="cx"> "justify-content": true,
</span><ins>+ "justify-self": true,
</ins><span class="cx"> "-webkit-line-align": true,
</span><span class="cx"> "-webkit-line-box-contain": true,
</span><span class="cx"> "-webkit-line-break": true,
</span></span></pre></div>
<a id="trunkLayoutTestssvgcssgetComputedStylebasicexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -286,16 +286,18 @@
</span><span class="cx"> rect: style.getPropertyCSSValue(column-width) : [object CSSPrimitiveValue]
</span><span class="cx"> rect: style.getPropertyValue(align-content) : stretch
</span><span class="cx"> rect: style.getPropertyCSSValue(align-content) : [object CSSPrimitiveValue]
</span><del>-rect: style.getPropertyValue(align-items) : stretch
-rect: style.getPropertyCSSValue(align-items) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(align-self) : stretch
-rect: style.getPropertyCSSValue(align-self) : [object CSSPrimitiveValue]
</del><ins>+rect: style.getPropertyValue(align-items) : start
+rect: style.getPropertyCSSValue(align-items) : [object CSSValueList]
+rect: style.getPropertyValue(align-self) : start
+rect: style.getPropertyCSSValue(align-self) : [object CSSValueList]
</ins><span class="cx"> rect: style.getPropertyValue(flex-direction) : row
</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><span class="cx"> rect: style.getPropertyValue(justify-content) : flex-start
</span><span class="cx"> rect: style.getPropertyCSSValue(justify-content) : [object CSSPrimitiveValue]
</span><ins>+rect: style.getPropertyValue(justify-self) : auto
+rect: style.getPropertyCSSValue(justify-self) : [object CSSValueList]
</ins><span class="cx"> rect: style.getPropertyValue(-webkit-font-kerning) : auto
</span><span class="cx"> rect: style.getPropertyCSSValue(-webkit-font-kerning) : [object CSSPrimitiveValue]
</span><span class="cx"> rect: style.getPropertyValue(-webkit-font-smoothing) : auto
</span><span class="lines">@@ -798,16 +800,18 @@
</span><span class="cx"> g: style.getPropertyCSSValue(column-width) : [object CSSPrimitiveValue]
</span><span class="cx"> g: style.getPropertyValue(align-content) : stretch
</span><span class="cx"> g: style.getPropertyCSSValue(align-content) : [object CSSPrimitiveValue]
</span><del>-g: style.getPropertyValue(align-items) : stretch
-g: style.getPropertyCSSValue(align-items) : [object CSSPrimitiveValue]
-g: style.getPropertyValue(align-self) : stretch
-g: style.getPropertyCSSValue(align-self) : [object CSSPrimitiveValue]
</del><ins>+g: style.getPropertyValue(align-items) : start
+g: style.getPropertyCSSValue(align-items) : [object CSSValueList]
+g: style.getPropertyValue(align-self) : start
+g: style.getPropertyCSSValue(align-self) : [object CSSValueList]
</ins><span class="cx"> g: style.getPropertyValue(flex-direction) : row
</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><span class="cx"> g: style.getPropertyValue(justify-content) : flex-start
</span><span class="cx"> g: style.getPropertyCSSValue(justify-content) : [object CSSPrimitiveValue]
</span><ins>+g: style.getPropertyValue(justify-self) : auto
+g: style.getPropertyCSSValue(justify-self) : [object CSSValueList]
</ins><span class="cx"> g: style.getPropertyValue(-webkit-font-kerning) : auto
</span><span class="cx"> g: style.getPropertyCSSValue(-webkit-font-kerning) : [object CSSPrimitiveValue]
</span><span class="cx"> g: style.getPropertyValue(-webkit-font-smoothing) : auto
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/ChangeLog 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -1,3 +1,86 @@
</span><ins>+2014-11-17 Javier Fernandez <jfernandez at igalia.com>
+
+ [CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3
+ https://bugs.webkit.org/show_bug.cgi?id=133359
+
+ Reviewed by David Hyatt.
+
+ Broaden justify-self's parsing name as a preparation of migrating
+ align-self, align-items and justify-items to the CSS 3 Alignment syntax.
+
+ The current naming was too tied to justify-self and needs to
+ be broadened. This will reduce the follow-up implementations'
+ patches.
+
+ Upgrade align-self and align-items parsing to CSS 3
+
+ This change migrates the 2 properties to the CSS 3 Alignment
+ parsing. The new parsing is identical to how we parse
+ 'justify-self'. The 2 properties need to be migrated together
+ as they are used in tandem in CSSComputedStyleDeclaration.
+
+ This change also removes EAlignItems as it is now unused.
+
+ Tests: css3/parse-align-items.html
+ css3/parse-align-self.html
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties.
+ (WebCore::ComputedStyleExtractor::propertyValue):
+ * css/CSSParser.cpp:
+ (WebCore::isKeywordPropertyID): Removed align-items and align-self from the list.
+ (WebCore::isValidKeywordPropertyAndValue): Removed align-items and align-self from the list.
+ (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties.
+ (WebCore::isBaselinePositionKeyword): Utility function added to identify Baseline keyword values.
+ (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties.
+ (WebCore::CSSParser::parseJustifySelf): Deleted.
+ * css/CSSParser.h:
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Refactoring some mapping functions.
+ (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration.
+ (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added.
+ (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted.
+ (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted.
+ (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted.
+ * css/CSSPropertyNames.in:
+ * css/CSSValueKeywords.in:
+ * css/StyleResolver.cpp:
+ (WebCore::StyleResolver::adjustRenderStyle): Added a new adjustment to resolve the "auto" vale on the alignment properties.
+ (WebCore::StyleResolver::adjustStyleForAlignment): Added. Function to resolve the "auto" vale on the alignment properties.
+ (WebCore::StyleResolver::applyProperty):
+ (WebCore::isDisplayFlexibleBox): Deleted. Moved to the RenderStyle.
+ (WebCore::isDisplayGridBox): Deleted. Moved to the RenderStyle.
+ (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to the RenderStyle.
+ * css/StyleResolver.h:
+ * rendering/RenderBox.cpp:
+ (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPosition enum.
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPosition enum.
+ (WebCore::resolveAlignment): Consider also that align-items could be "auto", since it's the default now.
+ (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPosition enum.
+ (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPosition enum.
+ (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPosition enum.
+ (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPosition enum.
+ (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPosition enum.
+ * rendering/RenderFlexibleBox.h:
+ * rendering/RenderFullScreen.cpp:
+ (WebCore::createFullScreenStyle): Adapted to the new ItemPosition enum.
+ * rendering/RenderMenuList.cpp:
+ (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPosition enum.
+ * rendering/mathml/RenderMathMLRoot.cpp:
+ (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPosition enum.
+ * rendering/mathml/RenderMathMLScripts.cpp:
+ (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPosition enum.
+ (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPosition enum.
+ * rendering/style/RenderStyle.h: Adapted to the new ItemPosition enum.
+ * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPosition enum.
+ * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPosition enum.
+ (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPosition enum.
+ (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPosition enum.
+ * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPosition enum.
+ * style/StyleResolveTree.cpp:
+ (WebCore::Style::determineChange): Changes in the alignItems property will cause a Detach.
+
</ins><span class="cx"> 2014-11-17 Shivakumar JM <shiva.jm at samsung.com>
</span><span class="cx">
</span><span class="cx"> Attribute text in HTMLAnchorElement should behave as per specification.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -296,7 +296,7 @@
</span><span class="cx"> CSSPropertyFlexDirection,
</span><span class="cx"> CSSPropertyFlexWrap,
</span><span class="cx"> CSSPropertyJustifyContent,
</span><del>- CSSPropertyWebkitJustifySelf,
</del><ins>+ CSSPropertyJustifySelf,
</ins><span class="cx"> CSSPropertyWebkitFilter,
</span><span class="cx"> #if ENABLE(FILTERS_LEVEL_2)
</span><span class="cx"> CSSPropertyWebkitBackdropFilter,
</span><span class="lines">@@ -1713,6 +1713,15 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+static PassRefPtr<CSSValueList> valueForItemPositionWithOverflowAlignment(ItemPosition itemPosition, OverflowAlignment overflowAlignment)
+{
+ RefPtr<CSSValueList> result = CSSValueList::createSpaceSeparated();
+ result->append(cssValuePool().createValue(itemPosition));
+ if (itemPosition >= ItemPositionCenter && overflowAlignment != OverflowAlignmentDefault)
+ result->append(cssValuePool().createValue(overflowAlignment));
+ return result.release();
+}
+
</ins><span class="cx"> PassRefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propertyID, EUpdateLayout updateLayout) const
</span><span class="cx"> {
</span><span class="cx"> Node* styledNode = this->styledNode();
</span><span class="lines">@@ -2056,15 +2065,19 @@
</span><span class="cx"> case CSSPropertyAlignContent:
</span><span class="cx"> return cssValuePool().createValue(style->alignContent());
</span><span class="cx"> case CSSPropertyAlignItems:
</span><del>- return cssValuePool().createValue(style->alignItems());
- case CSSPropertyAlignSelf:
- if (style->alignSelf() == AlignAuto) {
</del><ins>+ return valueForItemPositionWithOverflowAlignment(style->alignItems(), style->alignItemsOverflowAlignment());
+ case CSSPropertyAlignSelf: {
+ ItemPosition alignSelf = style->alignSelf();
+ OverflowAlignment overflow = style->alignSelfOverflowAlignment();
+ if (alignSelf == ItemPositionAuto) {
</ins><span class="cx"> Node* parent = styledNode->parentNode();
</span><del>- if (parent && parent->computedStyle())
- return cssValuePool().createValue(parent->computedStyle()->alignItems());
- return cssValuePool().createValue(AlignStretch);
</del><ins>+ if (parent && parent->computedStyle()) {
+ alignSelf = parent->computedStyle()->alignItems();
+ overflow = parent->computedStyle()->alignItemsOverflowAlignment();
+ }
</ins><span class="cx"> }
</span><del>- return cssValuePool().createValue(style->alignSelf());
</del><ins>+ return valueForItemPositionWithOverflowAlignment(alignSelf, overflow);
+ }
</ins><span class="cx"> case CSSPropertyFlex:
</span><span class="cx"> return getCSSPropertyValuesForShorthandProperties(flexShorthand());
</span><span class="cx"> case CSSPropertyFlexBasis:
</span><span class="lines">@@ -2081,13 +2094,8 @@
</span><span class="cx"> return cssValuePool().createValue(style->flexWrap());
</span><span class="cx"> case CSSPropertyJustifyContent:
</span><span class="cx"> return cssValuePool().createValue(style->justifyContent());
</span><del>- case CSSPropertyWebkitJustifySelf: {
- RefPtr<CSSValueList> result = CSSValueList::createSpaceSeparated();
- result->append(CSSPrimitiveValue::create(style->justifySelf()));
- if (style->justifySelf() >= JustifySelfCenter && style->justifySelfOverflowAlignment() != JustifySelfOverflowAlignmentDefault)
- result->append(CSSPrimitiveValue::create(style->justifySelfOverflowAlignment()));
- return result.release();
- }
</del><ins>+ case CSSPropertyJustifySelf:
+ return valueForItemPositionWithOverflowAlignment(style->justifySelf(), style->justifySelfOverflowAlignment());
</ins><span class="cx"> case CSSPropertyOrder:
</span><span class="cx"> return cssValuePool().createValue(style->order(), CSSPrimitiveValue::CSS_NUMBER);
</span><span class="cx"> case CSSPropertyFloat:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/css/CSSParser.cpp 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -865,6 +865,7 @@
</span><span class="cx"> if (valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || valueID == CSSValueCenter || valueID == CSSValueSpaceBetween || valueID == CSSValueSpaceAround || valueID == CSSValueStretch)
</span><span class="cx"> return true;
</span><span class="cx"> break;
</span><ins>+#if !ENABLE(CSS_GRID_LAYOUT)
</ins><span class="cx"> case CSSPropertyAlignItems:
</span><span class="cx"> // FIXME: Per CSS alignment, this property should accept the same arguments as 'justify-self' so we should share its parsing code.
</span><span class="cx"> if (valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || valueID == CSSValueCenter || valueID == CSSValueBaseline || valueID == CSSValueStretch)
</span><span class="lines">@@ -875,6 +876,7 @@
</span><span class="cx"> if (valueID == CSSValueAuto || valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || valueID == CSSValueCenter || valueID == CSSValueBaseline || valueID == CSSValueStretch)
</span><span class="cx"> return true;
</span><span class="cx"> break;
</span><ins>+#endif
</ins><span class="cx"> case CSSPropertyFlexDirection:
</span><span class="cx"> if (valueID == CSSValueRow || valueID == CSSValueRowReverse || valueID == CSSValueColumn || valueID == CSSValueColumnReverse)
</span><span class="cx"> return true;
</span><span class="lines">@@ -888,10 +890,12 @@
</span><span class="cx"> if (valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || valueID == CSSValueCenter || valueID == CSSValueSpaceBetween || valueID == CSSValueSpaceAround)
</span><span class="cx"> return true;
</span><span class="cx"> break;
</span><del>- case CSSPropertyWebkitJustifySelf:
</del><ins>+#if !ENABLE(CSS_GRID_LAYOUT)
+ case CSSPropertyJustifySelf:
</ins><span class="cx"> if (valueID == CSSValueAuto || valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || valueID == CSSValueCenter || valueID == CSSValueBaseline || valueID == CSSValueStretch)
</span><span class="cx"> return true;
</span><span class="cx"> break;
</span><ins>+#endif
</ins><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">@@ -1106,8 +1110,10 @@
</span><span class="cx"> case CSSPropertyColumnFill:
</span><span class="cx"> case CSSPropertyColumnRuleStyle:
</span><span class="cx"> case CSSPropertyAlignContent:
</span><ins>+#if !ENABLE(CSS_GRID_LAYOUT)
</ins><span class="cx"> case CSSPropertyAlignItems:
</span><span class="cx"> case CSSPropertyAlignSelf:
</span><ins>+#endif
</ins><span class="cx"> case CSSPropertyFlexDirection:
</span><span class="cx"> case CSSPropertyFlexWrap:
</span><span class="cx"> case CSSPropertyJustifyContent:
</span><span class="lines">@@ -2630,9 +2636,9 @@
</span><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><del>- case CSSPropertyWebkitJustifySelf:
- return parseJustifySelf(propId, important);
</del><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><ins>+ case CSSPropertyJustifySelf:
+ return parseItemPositionOverflowPosition(propId, important);
</ins><span class="cx"> case CSSPropertyWebkitGridAutoColumns:
</span><span class="cx"> case CSSPropertyWebkitGridAutoRows:
</span><span class="cx"> parsedValue = parseGridTrackSize(*m_valueList);
</span><span class="lines">@@ -2967,6 +2973,13 @@
</span><span class="cx"> parsedValue = parseImageResolution();
</span><span class="cx"> break;
</span><span class="cx"> #endif
</span><ins>+#if ENABLE(CSS_GRID_LAYOUT)
+ case CSSPropertyAlignSelf:
+ return parseItemPositionOverflowPosition(propId, important);
+
+ case CSSPropertyAlignItems:
+ return parseItemPositionOverflowPosition(propId, important);
+#endif
</ins><span class="cx"> case CSSPropertyBorderBottomStyle:
</span><span class="cx"> case CSSPropertyBorderCollapse:
</span><span class="cx"> case CSSPropertyBorderLeftStyle:
</span><span class="lines">@@ -3028,8 +3041,11 @@
</span><span class="cx"> case CSSPropertyColumnFill:
</span><span class="cx"> case CSSPropertyColumnRuleStyle:
</span><span class="cx"> case CSSPropertyAlignContent:
</span><ins>+#if !ENABLE(CSS_GRID_LAYOUT)
</ins><span class="cx"> case CSSPropertyAlignItems:
</span><span class="cx"> case CSSPropertyAlignSelf:
</span><ins>+ case CSSPropertyJustifySelf:
+#endif
</ins><span class="cx"> case CSSPropertyFlexDirection:
</span><span class="cx"> case CSSPropertyFlexWrap:
</span><span class="cx"> case CSSPropertyJustifyContent:
</span><span class="lines">@@ -3140,6 +3156,11 @@
</span><span class="cx"> lval = WTF::move(list);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static inline bool isBaselinePositionKeyword(CSSValueID id)
+{
+ return id == CSSValueBaseline || id == CSSValueLastBaseline;
+}
+
</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">@@ -3147,7 +3168,7 @@
</span><span class="cx"> || id == CSSValueFlexEnd || id == CSSValueLeft || id == CSSValueRight;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool CSSParser::parseJustifySelf(CSSPropertyID propId, bool important)
</del><ins>+bool CSSParser::parseItemPositionOverflowPosition(CSSPropertyID propId, bool important)
</ins><span class="cx"> {
</span><span class="cx"> // auto | baseline | stretch | [<item-position> && <overflow-position>? ]
</span><span class="cx"> // <item-position> = center | start | end | self-start | self-end | flex-start | flex-end | left | right;
</span><span class="lines">@@ -3155,7 +3176,7 @@
</span><span class="cx">
</span><span class="cx"> CSSParserValue* value = m_valueList->current();
</span><span class="cx">
</span><del>- if (value->id == CSSValueAuto || value->id == CSSValueBaseline || value->id == CSSValueStretch) {
</del><ins>+ if (value->id == CSSValueAuto || value->id == CSSValueStretch || isBaselinePositionKeyword(value->id)) {
</ins><span class="cx"> if (m_valueList->next())
</span><span class="cx"> return false;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/css/CSSParser.h 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -177,7 +177,7 @@
</span><span class="cx">
</span><span class="cx"> bool parseClipShape(CSSPropertyID, bool important);
</span><span class="cx">
</span><del>- bool parseJustifySelf(CSSPropertyID, bool important);
</del><ins>+ bool parseItemPositionOverflowPosition(CSSPropertyID, bool important);
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><span class="cx"> PassRefPtr<CSSValue> parseShapeProperty(CSSPropertyID);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValueMappingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -1428,57 +1428,6 @@
</span><span class="cx"> return SHOW;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EAlignItems e)
- : CSSValue(PrimitiveClass)
-{
- m_primitiveUnitType = CSS_VALUE_ID;
- switch (e) {
- case AlignAuto:
- m_value.valueID = CSSValueAuto;
- break;
- case AlignFlexStart:
- m_value.valueID = CSSValueFlexStart;
- break;
- case AlignFlexEnd:
- m_value.valueID = CSSValueFlexEnd;
- break;
- case AlignCenter:
- m_value.valueID = CSSValueCenter;
- break;
- case AlignStretch:
- m_value.valueID = CSSValueStretch;
- break;
- case AlignBaseline:
- m_value.valueID = CSSValueBaseline;
- break;
- }
-}
-
-template<> inline CSSPrimitiveValue::operator EAlignItems() const
-{
- ASSERT(isValueID());
-
- switch (m_value.valueID) {
- case CSSValueAuto:
- return AlignAuto;
- case CSSValueFlexStart:
- return AlignFlexStart;
- case CSSValueFlexEnd:
- return AlignFlexEnd;
- case CSSValueCenter:
- return AlignCenter;
- case CSSValueStretch:
- return AlignStretch;
- case CSSValueBaseline:
- return AlignBaseline;
- default:
- break;
- }
-
- ASSERT_NOT_REACHED();
- return AlignFlexStart;
-}
-
</del><span class="cx"> template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EJustifyContent e)
</span><span class="cx"> : CSSValue(PrimitiveClass)
</span><span class="cx"> {
</span><span class="lines">@@ -5082,116 +5031,118 @@
</span><span class="cx"> return BoxMissing;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EJustifySelf justifySelf)
</del><ins>+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ItemPosition itemPosition)
</ins><span class="cx"> : CSSValue(PrimitiveClass)
</span><span class="cx"> {
</span><span class="cx"> m_primitiveUnitType = CSS_VALUE_ID;
</span><del>- switch (justifySelf) {
- case JustifySelfAuto:
</del><ins>+ switch (itemPosition) {
+ case ItemPositionAuto:
</ins><span class="cx"> m_value.valueID = CSSValueAuto;
</span><span class="cx"> break;
</span><del>- case JustifySelfStretch:
</del><ins>+ case ItemPositionStretch:
</ins><span class="cx"> m_value.valueID = CSSValueStretch;
</span><span class="cx"> break;
</span><del>- case JustifySelfBaseline:
</del><ins>+ case ItemPositionBaseline:
</ins><span class="cx"> m_value.valueID = CSSValueBaseline;
</span><span class="cx"> break;
</span><del>- case JustifySelfCenter:
</del><ins>+ case ItemPositionLastBaseline:
+ m_value.valueID = CSSValueLastBaseline;
+ break;
+ case ItemPositionCenter:
</ins><span class="cx"> m_value.valueID = CSSValueCenter;
</span><span class="cx"> break;
</span><del>- case JustifySelfStart:
</del><ins>+ case ItemPositionStart:
</ins><span class="cx"> m_value.valueID = CSSValueStart;
</span><span class="cx"> break;
</span><del>- case JustifySelfEnd:
</del><ins>+ case ItemPositionEnd:
</ins><span class="cx"> m_value.valueID = CSSValueEnd;
</span><span class="cx"> break;
</span><del>- case JustifySelfSelfStart:
</del><ins>+ case ItemPositionSelfStart:
</ins><span class="cx"> m_value.valueID = CSSValueSelfStart;
</span><span class="cx"> break;
</span><del>- case JustifySelfSelfEnd:
</del><ins>+ case ItemPositionSelfEnd:
</ins><span class="cx"> m_value.valueID = CSSValueSelfEnd;
</span><span class="cx"> break;
</span><del>- case JustifySelfFlexStart:
</del><ins>+ case ItemPositionFlexStart:
</ins><span class="cx"> m_value.valueID = CSSValueFlexStart;
</span><span class="cx"> break;
</span><del>- case JustifySelfFlexEnd:
</del><ins>+ case ItemPositionFlexEnd:
</ins><span class="cx"> m_value.valueID = CSSValueFlexEnd;
</span><span class="cx"> break;
</span><del>- case JustifySelfLeft:
</del><ins>+ case ItemPositionLeft:
</ins><span class="cx"> m_value.valueID = CSSValueLeft;
</span><span class="cx"> break;
</span><del>- case JustifySelfRight:
</del><ins>+ case ItemPositionRight:
</ins><span class="cx"> m_value.valueID = CSSValueRight;
</span><span class="cx"> break;
</span><del>- default:
- m_value.valueID = CSSValueAuto;
- break;
</del><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-template<> inline CSSPrimitiveValue::operator EJustifySelf() const
</del><ins>+template<> inline CSSPrimitiveValue::operator ItemPosition() const
</ins><span class="cx"> {
</span><span class="cx"> switch (m_value.valueID) {
</span><span class="cx"> case CSSValueAuto:
</span><del>- return JustifySelfAuto;
</del><ins>+ return ItemPositionAuto;
</ins><span class="cx"> case CSSValueStretch:
</span><del>- return JustifySelfStretch;
</del><ins>+ return ItemPositionStretch;
</ins><span class="cx"> case CSSValueBaseline:
</span><del>- return JustifySelfBaseline;
</del><ins>+ return ItemPositionBaseline;
+ case CSSValueLastBaseline:
+ return ItemPositionLastBaseline;
</ins><span class="cx"> case CSSValueCenter:
</span><del>- return JustifySelfCenter;
</del><ins>+ return ItemPositionCenter;
</ins><span class="cx"> case CSSValueStart:
</span><del>- return JustifySelfStart;
</del><ins>+ return ItemPositionStart;
</ins><span class="cx"> case CSSValueEnd:
</span><del>- return JustifySelfEnd;
</del><ins>+ return ItemPositionEnd;
</ins><span class="cx"> case CSSValueSelfStart:
</span><del>- return JustifySelfSelfStart;
</del><ins>+ return ItemPositionSelfStart;
</ins><span class="cx"> case CSSValueSelfEnd:
</span><del>- return JustifySelfSelfEnd;
</del><ins>+ return ItemPositionSelfEnd;
</ins><span class="cx"> case CSSValueFlexStart:
</span><del>- return JustifySelfFlexStart;
</del><ins>+ return ItemPositionFlexStart;
</ins><span class="cx"> case CSSValueFlexEnd:
</span><del>- return JustifySelfFlexEnd;
</del><ins>+ return ItemPositionFlexEnd;
</ins><span class="cx"> case CSSValueLeft:
</span><del>- return JustifySelfLeft;
</del><ins>+ return ItemPositionLeft;
</ins><span class="cx"> case CSSValueRight:
</span><del>- return JustifySelfRight;
</del><ins>+ return ItemPositionRight;
</ins><span class="cx"> default:
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><del>- return JustifySelfAuto;
</del><ins>+ return ItemPositionAuto;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EJustifySelfOverflowAlignment overflowAlignment)
</del><ins>+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(OverflowAlignment overflowAlignment)
</ins><span class="cx"> : CSSValue(PrimitiveClass)
</span><span class="cx"> {
</span><span class="cx"> m_primitiveUnitType = CSS_VALUE_ID;
</span><span class="cx"> switch (overflowAlignment) {
</span><del>- case JustifySelfOverflowAlignmentDefault:
</del><ins>+ case OverflowAlignmentDefault:
</ins><span class="cx"> m_value.valueID = CSSValueDefault;
</span><span class="cx"> break;
</span><del>- case JustifySelfOverflowAlignmentTrue:
</del><ins>+ case OverflowAlignmentTrue:
</ins><span class="cx"> m_value.valueID = CSSValueTrue;
</span><span class="cx"> break;
</span><del>- case JustifySelfOverflowAlignmentSafe:
</del><ins>+ case OverflowAlignmentSafe:
</ins><span class="cx"> m_value.valueID = CSSValueSafe;
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-template<> inline CSSPrimitiveValue::operator EJustifySelfOverflowAlignment() const
</del><ins>+template<> inline CSSPrimitiveValue::operator OverflowAlignment() const
</ins><span class="cx"> {
</span><span class="cx"> switch (m_value.valueID) {
</span><span class="cx"> case CSSValueTrue:
</span><del>- return JustifySelfOverflowAlignmentTrue;
</del><ins>+ return OverflowAlignmentTrue;
</ins><span class="cx"> case CSSValueSafe:
</span><del>- return JustifySelfOverflowAlignmentSafe;
</del><ins>+ return OverflowAlignmentSafe;
</ins><span class="cx"> default:
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><del>- return JustifySelfOverflowAlignmentTrue;
</del><ins>+ return OverflowAlignmentTrue;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertyNames.in 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -364,9 +364,9 @@
</span><span class="cx"> -webkit-filter
</span><span class="cx"> align-content [NewStyleBuilder]
</span><span class="cx"> -webkit-align-content = align-content
</span><del>-align-items [NewStyleBuilder]
</del><ins>+align-items
</ins><span class="cx"> -webkit-align-items = align-items
</span><del>-align-self [NewStyleBuilder, TypeName=EAlignItems]
</del><ins>+align-self
</ins><span class="cx"> -webkit-align-self = align-self
</span><span class="cx"> flex
</span><span class="cx"> -webkit-flex = flex
</span><span class="lines">@@ -387,7 +387,8 @@
</span><span class="cx"> #if defined(ENABLE_FILTERS_LEVEL_2) && ENABLE_FILTERS_LEVEL_2
</span><span class="cx"> -webkit-backdrop-filter
</span><span class="cx"> #endif
</span><del>--webkit-justify-self
</del><ins>+justify-self
+-webkit-justify-self = justify-self
</ins><span class="cx"> -webkit-font-size-delta
</span><span class="cx"> #if defined(ENABLE_CSS_GRID_LAYOUT) && ENABLE_CSS_GRID_LAYOUT
</span><span class="cx"> -webkit-grid
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueKeywordsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueKeywords.in 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -540,6 +540,7 @@
</span><span class="cx"> // flex-end
</span><span class="cx"> // center
</span><span class="cx"> // baseline
</span><ins>+last-baseline
</ins><span class="cx"> // stretch
</span><span class="cx">
</span><span class="cx"> // CSS_PROP_JUSTIFY_CONTENT
</span><span class="lines">@@ -553,6 +554,7 @@
</span><span class="cx"> // auto
</span><span class="cx"> // stretch
</span><span class="cx"> // baseline
</span><ins>+// last-baseline
</ins><span class="cx"> // center
</span><span class="cx"> // start
</span><span class="cx"> // end
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolvercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.cpp (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.cpp 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/css/StyleResolver.cpp 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -1113,26 +1113,6 @@
</span><span class="cx"> || style.isFloating() || style.hasOutOfFlowPosition();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static bool isDisplayFlexibleBox(EDisplay display)
-{
- return display == FLEX || display == INLINE_FLEX;
-}
-
-static inline bool isDisplayGridBox(EDisplay display)
-{
-#if ENABLE(CSS_GRID_LAYOUT)
- return display == GRID || display == INLINE_GRID;
-#else
- UNUSED_PARAM(display);
- return false;
-#endif
-}
-
-static bool isDisplayFlexibleOrGridBox(EDisplay display)
-{
- return isDisplayFlexibleBox(display) || isDisplayGridBox(display);
-}
-
</del><span class="cx"> #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
</span><span class="cx"> static bool isScrollableOverflow(EOverflow overflow)
</span><span class="cx"> {
</span><span class="lines">@@ -1235,14 +1215,14 @@
</span><span class="cx"> if (style.writingMode() != TopToBottomWritingMode && (style.display() == BOX || style.display() == INLINE_BOX))
</span><span class="cx"> style.setWritingMode(TopToBottomWritingMode);
</span><span class="cx">
</span><del>- if (isDisplayFlexibleOrGridBox(parentStyle.display())) {
</del><ins>+ if (parentStyle.isDisplayFlexibleOrGridBox()) {
</ins><span class="cx"> style.setFloating(NoFloat);
</span><span class="cx"> style.setDisplay(equivalentBlockDisplay(style.display(), style.isFloating(), !document().inQuirksMode()));
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Make sure our z-index value is only applied if the object is positioned.
</span><del>- if (style.position() == StaticPosition && !isDisplayFlexibleOrGridBox(parentStyle.display()))
</del><ins>+ if (style.position() == StaticPosition && !parentStyle.isDisplayFlexibleOrGridBox())
</ins><span class="cx"> style.setHasAutoZIndex();
</span><span class="cx">
</span><span class="cx"> // Auto z-index becomes 0 for the root element and transparent objects. This prevents
</span><span class="lines">@@ -1371,8 +1351,32 @@
</span><span class="cx"> if ((e->hasTagName(SVGNames::foreignObjectTag) || e->hasTagName(SVGNames::textTag)) && style.isDisplayInlineType())
</span><span class="cx"> style.setDisplay(BLOCK);
</span><span class="cx"> }
</span><ins>+
+ // CSS Box Alignment specification requires to resolve "auto" (inital/default) values.
+ adjustStyleForAlignment(style);
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+void StyleResolver::adjustStyleForAlignment(RenderStyle& style)
+{
+ // The 'auto' keyword computes to:
+ // - 'stretch' for flex containers and grid containers,
+ // - 'start' for everything else. (to be resolved later, during the layout)
+ if (style.alignItems() == ItemPositionAuto) {
+ if (style.isDisplayFlexibleOrGridBox())
+ style.setAlignItems(ItemPositionStretch);
+ else
+ style.setAlignItems(ItemPositionStart);
+ }
+
+ // The 'auto' keyword computes to 'stretch' on absolutely-positioned elements,
+ // and to the computed value of align-items on the parent (minus
+ // any 'legacy' keywords) on all other boxes (to be resolved during the layout).
+ if (style.alignSelf() == ItemPositionAuto) {
+ if ((style.position() == AbsolutePosition))
+ style.setAlignSelf(ItemPositionStretch);
+ }
+}
+
</ins><span class="cx"> bool StyleResolver::checkRegionStyle(Element* regionElement)
</span><span class="cx"> {
</span><span class="cx"> unsigned rulesSize = m_ruleSets.authorStyle()->regionSelectorsAndRuleSets().size();
</span><span class="lines">@@ -2900,16 +2904,61 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> #endif /* ENABLE(CSS_GRID_LAYOUT) */
</span><ins>+ case CSSPropertyAlignSelf: {
+ if (isInherit) {
+ state.style()->setAlignSelf(state.parentStyle()->alignSelf());
+ state.style()->setAlignSelfOverflowAlignment(state.parentStyle()->alignSelfOverflowAlignment());
+ return;
+ }
+ if (isInitial) {
+ state.style()->setAlignSelf(RenderStyle::initialAlignSelf());
+ state.style()->setAlignSelfOverflowAlignment(RenderStyle::initialAlignSelfOverflowAlignment());
+ return;
+ }
+ if (Pair* pairValue = primitiveValue->getPairValue()) {
+ state.style()->setAlignSelf(*pairValue->first());
+ state.style()->setAlignSelfOverflowAlignment(*pairValue->second());
+ } else
+ state.style()->setAlignSelf(*primitiveValue);
+ return;
+ }
</ins><span class="cx">
</span><del>- case CSSPropertyWebkitJustifySelf:
- HANDLE_INHERIT_AND_INITIAL(justifySelf, JustifySelf);
</del><ins>+ case CSSPropertyAlignItems: {
+ if (isInherit) {
+ state.style()->setAlignItems(state.parentStyle()->alignItems());
+ state.style()->setAlignItemsOverflowAlignment(state.parentStyle()->alignItemsOverflowAlignment());
+ return;
+ }
+ if (isInitial) {
+ state.style()->setAlignItems(RenderStyle::initialAlignItems());
+ state.style()->setAlignItemsOverflowAlignment(RenderStyle::initialAlignItemsOverflowAlignment());
+ return;
+ }
</ins><span class="cx"> if (Pair* pairValue = primitiveValue->getPairValue()) {
</span><ins>+ state.style()->setAlignItems(*pairValue->first());
+ state.style()->setAlignItemsOverflowAlignment(*pairValue->second());
+ } else
+ state.style()->setAlignItems(*primitiveValue);
+ return;
+ }
+ case CSSPropertyJustifySelf: {
+ if (isInherit) {
+ state.style()->setJustifySelf(state.parentStyle()->justifySelf());
+ state.style()->setJustifySelfOverflowAlignment(state.parentStyle()->justifySelfOverflowAlignment());
+ return;
+ }
+ if (isInitial) {
+ state.style()->setJustifySelf(RenderStyle::initialJustifySelf());
+ state.style()->setJustifySelfOverflowAlignment(RenderStyle::initialJustifySelfOverflowAlignment());
+ return;
+ }
+ if (Pair* pairValue = primitiveValue->getPairValue()) {
</ins><span class="cx"> state.style()->setJustifySelf(*pairValue->first());
</span><span class="cx"> state.style()->setJustifySelfOverflowAlignment(*pairValue->second());
</span><span class="cx"> } else
</span><span class="cx"> state.style()->setJustifySelf(*primitiveValue);
</span><span class="cx"> return;
</span><del>-
</del><ins>+ }
</ins><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><span class="cx"> case CSSPropertyWebkitScrollSnapType:
</span><span class="cx"> HANDLE_INHERIT_AND_INITIAL(scrollSnapType, ScrollSnapType);
</span><span class="lines">@@ -3128,8 +3177,6 @@
</span><span class="cx"> case CSSPropertyWebkitCursorVisibility:
</span><span class="cx"> #endif
</span><span class="cx"> case CSSPropertyAlignContent:
</span><del>- case CSSPropertyAlignItems:
- case CSSPropertyAlignSelf:
</del><span class="cx"> case CSSPropertyFlexBasis:
</span><span class="cx"> case CSSPropertyFlexDirection:
</span><span class="cx"> case CSSPropertyFlexGrow:
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleResolverh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleResolver.h (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleResolver.h 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/css/StyleResolver.h 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -296,6 +296,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> void adjustRenderStyle(RenderStyle& styleToAdjust, const RenderStyle& parentStyle, Element*);
</span><ins>+ void adjustStyleForAlignment(RenderStyle& styleToAdjust);
</ins><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><span class="cx"> std::unique_ptr<GridPosition> adjustNamedGridItemPosition(const NamedGridAreaMap&, const NamedGridLinesMap&, const GridPosition&, GridPositionSide) const;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -2418,7 +2418,7 @@
</span><span class="cx"> static bool flexItemHasStretchAlignment(const RenderBox& flexitem)
</span><span class="cx"> {
</span><span class="cx"> auto parent = flexitem.parent();
</span><del>- return flexitem.style().alignSelf() == AlignStretch || (flexitem.style().alignSelf() == AlignAuto && parent->style().alignItems() == AlignStretch);
</del><ins>+ return flexitem.style().alignSelf() == ItemPositionStretch || (flexitem.style().alignSelf() == ItemPositionAuto && parent->style().alignItems() == ItemPositionStretch);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool isStretchingColumnFlexItem(const RenderBox& flexitem)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderFlexibleBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include "RenderFlexibleBox.h"
</span><span class="cx">
</span><span class="cx"> #include "LayoutRepainter.h"
</span><ins>+#include "NotImplemented.h"
</ins><span class="cx"> #include "RenderLayer.h"
</span><span class="cx"> #include "RenderView.h"
</span><span class="cx"> #include <limits>
</span><span class="lines">@@ -186,7 +187,7 @@
</span><span class="cx"> for (RenderBox* child = m_orderIterator.first(); child; child = m_orderIterator.next()) {
</span><span class="cx"> if (child->isOutOfFlowPositioned())
</span><span class="cx"> continue;
</span><del>- if (alignmentForChild(*child) == AlignBaseline && !hasAutoMarginsInCrossAxis(*child)) {
</del><ins>+ if (alignmentForChild(*child) == ItemPositionBaseline && !hasAutoMarginsInCrossAxis(*child)) {
</ins><span class="cx"> baselineChild = child;
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -227,11 +228,11 @@
</span><span class="cx"> return synthesizedBaselineFromContentBox(*this, direction) + marginAscent;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static EAlignItems resolveAlignment(const RenderStyle* parentStyle, const RenderStyle* childStyle)
</del><ins>+static ItemPosition resolveAlignment(const RenderStyle* parentStyle, const RenderStyle* childStyle)
</ins><span class="cx"> {
</span><del>- EAlignItems align = childStyle->alignSelf();
- if (align == AlignAuto)
- align = parentStyle->alignItems();
</del><ins>+ ItemPosition align = childStyle->alignSelf();
+ if (align == ItemPositionAuto)
+ align = (parentStyle->alignItems() == ItemPositionAuto) ? ItemPositionStretch : parentStyle->alignItems();
</ins><span class="cx"> return align;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -239,12 +240,12 @@
</span><span class="cx"> {
</span><span class="cx"> RenderBlock::styleDidChange(diff, oldStyle);
</span><span class="cx">
</span><del>- if (oldStyle && oldStyle->alignItems() == AlignStretch && diff == StyleDifferenceLayout) {
</del><ins>+ if (oldStyle && oldStyle->alignItems() == ItemPositionStretch && diff == StyleDifferenceLayout) {
</ins><span class="cx"> // Flex items that were previously stretching need to be relayed out so we can compute new available cross axis space.
</span><span class="cx"> // This is only necessary for stretching since other alignment values don't change the size of the box.
</span><span class="cx"> for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
</span><del>- EAlignItems previousAlignment = resolveAlignment(oldStyle, &child->style());
- if (previousAlignment == AlignStretch && previousAlignment != resolveAlignment(&style(), &child->style()))
</del><ins>+ ItemPosition previousAlignment = resolveAlignment(oldStyle, &child->style());
+ if (previousAlignment == ItemPositionStretch && previousAlignment != resolveAlignment(&style(), &child->style()))
</ins><span class="cx"> child->setChildNeedsLayout(MarkOnlyThis);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -1023,18 +1024,18 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-EAlignItems RenderFlexibleBox::alignmentForChild(RenderBox& child) const
</del><ins>+ItemPosition RenderFlexibleBox::alignmentForChild(RenderBox& child) const
</ins><span class="cx"> {
</span><del>- EAlignItems align = resolveAlignment(&style(), &child.style());
</del><ins>+ ItemPosition align = resolveAlignment(&style(), &child.style());
</ins><span class="cx">
</span><del>- if (align == AlignBaseline && hasOrthogonalFlow(child))
- align = AlignFlexStart;
</del><ins>+ if (align == ItemPositionBaseline && hasOrthogonalFlow(child))
+ align = ItemPositionFlexStart;
</ins><span class="cx">
</span><span class="cx"> if (style().flexWrap() == FlexWrapReverse) {
</span><del>- if (align == AlignFlexStart)
- align = AlignFlexEnd;
- else if (align == AlignFlexEnd)
- align = AlignFlexStart;
</del><ins>+ if (align == ItemPositionFlexStart)
+ align = ItemPositionFlexEnd;
+ else if (align == ItemPositionFlexEnd)
+ align = ItemPositionFlexStart;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return align;
</span><span class="lines">@@ -1053,7 +1054,7 @@
</span><span class="cx">
</span><span class="cx"> bool RenderFlexibleBox::needToStretchChild(RenderBox& child)
</span><span class="cx"> {
</span><del>- if (alignmentForChild(child) != AlignStretch)
</del><ins>+ if (alignmentForChild(child) != ItemPositionStretch)
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> Length crossAxisLength = isHorizontalFlow() ? child.style().height() : child.style().width();
</span><span class="lines">@@ -1104,7 +1105,7 @@
</span><span class="cx"> updateAutoMarginsInMainAxis(child, autoMarginOffset);
</span><span class="cx">
</span><span class="cx"> LayoutUnit childCrossAxisMarginBoxExtent;
</span><del>- if (alignmentForChild(child) == AlignBaseline && !hasAutoMarginsInCrossAxis(child)) {
</del><ins>+ if (alignmentForChild(child) == ItemPositionBaseline && !hasAutoMarginsInCrossAxis(child)) {
</ins><span class="cx"> LayoutUnit ascent = marginBoxAscentForChild(child);
</span><span class="cx"> LayoutUnit descent = (crossAxisMarginExtentForChild(child) + crossAxisExtentForChild(child)) - ascent;
</span><span class="cx">
</span><span class="lines">@@ -1265,25 +1266,32 @@
</span><span class="cx"> continue;
</span><span class="cx">
</span><span class="cx"> switch (alignmentForChild(*child)) {
</span><del>- case AlignAuto:
</del><ins>+ case ItemPositionAuto:
</ins><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> break;
</span><del>- case AlignStretch: {
</del><ins>+ case ItemPositionStart:
+ // FIXME: https://webkit.org/b/135460 - The extended grammar is not supported
+ // yet for FlexibleBox.
+ // Defaulting to Stretch for now, as it what most of FlexBox based renders
+ // expect as default.
+ notImplemented();
+ FALLTHROUGH;
+ case ItemPositionStretch: {
</ins><span class="cx"> applyStretchAlignmentToChild(*child, lineCrossAxisExtent);
</span><span class="cx"> // Since wrap-reverse flips cross start and cross end, strech children should be aligned with the cross end.
</span><span class="cx"> if (style().flexWrap() == FlexWrapReverse)
</span><span class="cx"> adjustAlignmentForChild(*child, availableAlignmentSpaceForChild(lineCrossAxisExtent, *child));
</span><span class="cx"> break;
</span><span class="cx"> }
</span><del>- case AlignFlexStart:
</del><ins>+ case ItemPositionFlexStart:
</ins><span class="cx"> break;
</span><del>- case AlignFlexEnd:
</del><ins>+ case ItemPositionFlexEnd:
</ins><span class="cx"> adjustAlignmentForChild(*child, availableAlignmentSpaceForChild(lineCrossAxisExtent, *child));
</span><span class="cx"> break;
</span><del>- case AlignCenter:
</del><ins>+ case ItemPositionCenter:
</ins><span class="cx"> adjustAlignmentForChild(*child, availableAlignmentSpaceForChild(lineCrossAxisExtent, *child) / 2);
</span><span class="cx"> break;
</span><del>- case AlignBaseline: {
</del><ins>+ case ItemPositionBaseline: {
</ins><span class="cx"> // FIXME: If we get here in columns, we want the use the descent, except we currently can't get the ascent/descent of orthogonal children.
</span><span class="cx"> // https://bugs.webkit.org/show_bug.cgi?id=98076
</span><span class="cx"> LayoutUnit ascent = marginBoxAscentForChild(*child);
</span><span class="lines">@@ -1294,6 +1302,19 @@
</span><span class="cx"> minMarginAfterBaseline = std::min(minMarginAfterBaseline, availableAlignmentSpaceForChild(lineCrossAxisExtent, *child) - startOffset);
</span><span class="cx"> break;
</span><span class="cx"> }
</span><ins>+ case ItemPositionLastBaseline:
+ case ItemPositionSelfStart:
+ case ItemPositionSelfEnd:
+ case ItemPositionEnd:
+ case ItemPositionLeft:
+ case ItemPositionRight:
+ // FIXME: https://webkit.org/b/135460 - The extended grammar is not supported
+ // yet for FlexibleBox.
+ notImplemented();
+ FALLTHROUGH;
+ default:
+ ASSERT_NOT_REACHED();
+ break;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> minMarginAfterBaselines.append(minMarginAfterBaseline);
</span><span class="lines">@@ -1309,7 +1330,7 @@
</span><span class="cx"> LayoutUnit minMarginAfterBaseline = minMarginAfterBaselines[lineNumber];
</span><span class="cx"> for (size_t childNumber = 0; childNumber < lineContexts[lineNumber].numberOfChildren; ++childNumber, child = m_orderIterator.next()) {
</span><span class="cx"> ASSERT(child);
</span><del>- if (alignmentForChild(*child) == AlignBaseline && !hasAutoMarginsInCrossAxis(*child) && minMarginAfterBaseline)
</del><ins>+ if (alignmentForChild(*child) == ItemPositionBaseline && !hasAutoMarginsInCrossAxis(*child) && minMarginAfterBaseline)
</ins><span class="cx"> adjustAlignmentForChild(*child, minMarginAfterBaseline);
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderFlexibleBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.h (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderFlexibleBox.h 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.h 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -118,7 +118,7 @@
</span><span class="cx"> // FIXME: Supporting layout deltas.
</span><span class="cx"> void setFlowAwareLocationForChild(RenderBox& child, const LayoutPoint&);
</span><span class="cx"> void adjustAlignmentForChild(RenderBox& child, LayoutUnit);
</span><del>- EAlignItems alignmentForChild(RenderBox& child) const;
</del><ins>+ ItemPosition alignmentForChild(RenderBox& child) const;
</ins><span class="cx"> LayoutUnit mainAxisBorderAndPaddingExtentForChild(RenderBox& child) const;
</span><span class="cx"> LayoutUnit mainAxisScrollbarExtentForChild(RenderBox& child) const;
</span><span class="cx"> LayoutUnit preferredMainAxisContentExtentForChild(RenderBox& child, bool hasInfiniteLineLength);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderFullScreencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderFullScreen.cpp (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderFullScreen.cpp 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/rendering/RenderFullScreen.cpp 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx">
</span><span class="cx"> fullscreenStyle.get().setDisplay(FLEX);
</span><span class="cx"> fullscreenStyle.get().setJustifyContent(JustifyCenter);
</span><del>- fullscreenStyle.get().setAlignItems(AlignCenter);
</del><ins>+ fullscreenStyle.get().setAlignItems(ItemPositionCenter);
</ins><span class="cx"> fullscreenStyle.get().setFlexDirection(FlowColumn);
</span><span class="cx">
</span><span class="cx"> fullscreenStyle.get().setPosition(FixedPosition);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMenuListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMenuList.cpp (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMenuList.cpp 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/rendering/RenderMenuList.cpp 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -119,10 +119,10 @@
</span><span class="cx"> // Use margin:auto instead of align-items:center to get safe centering, i.e.
</span><span class="cx"> // when the content overflows, treat it the same as align-items: flex-start.
</span><span class="cx"> // But we only do that for the cases where html.css would otherwise use center.
</span><del>- if (style().alignItems() == AlignCenter) {
</del><ins>+ if (style().alignItems() == ItemPositionCenter) {
</ins><span class="cx"> innerStyle.setMarginTop(Length());
</span><span class="cx"> innerStyle.setMarginBottom(Length());
</span><del>- innerStyle.setAlignSelf(AlignFlexStart);
</del><ins>+ innerStyle.setAlignSelf(ItemPositionFlexStart);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> innerStyle.setPaddingLeft(Length(theme().popupInternalPaddingLeft(style()), Fixed));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLRootcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -233,7 +233,7 @@
</span><span class="cx"> auto base = baseWrapper();
</span><span class="cx"> auto baseStyle = RenderStyle::createAnonymousStyleWithDisplay(&style(), FLEX);
</span><span class="cx"> baseStyle.get().setMarginTop(Length(0, Fixed)); // This will be updated in RenderMathMLRoot::layout().
</span><del>- baseStyle.get().setAlignItems(AlignBaseline);
</del><ins>+ baseStyle.get().setAlignItems(ItemPositionBaseline);
</ins><span class="cx"> base->setStyle(WTF::move(baseStyle));
</span><span class="cx"> base->setNeedsLayoutAndPrefWidthsRecalc();
</span><span class="cx">
</span><span class="lines">@@ -244,7 +244,7 @@
</span><span class="cx"> indexStyle.get().setMarginTop(Length(0, Fixed)); // This will be updated in RenderMathMLRoot::layout().
</span><span class="cx"> indexStyle.get().setMarginStart(Length(kernBeforeDegree, Fixed));
</span><span class="cx"> indexStyle.get().setMarginEnd(Length(kernAfterDegree, Fixed));
</span><del>- indexStyle.get().setAlignItems(AlignBaseline);
</del><ins>+ indexStyle.get().setAlignItems(ItemPositionBaseline);
</ins><span class="cx"> index->setStyle(WTF::move(indexStyle));
</span><span class="cx"> index->setNeedsLayoutAndPrefWidthsRecalc();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingmathmlRenderMathMLScriptscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -101,7 +101,7 @@
</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="cx"> // See http://lists.w3.org/Archives/Public/www-math/2012Aug/0006.html
</span><del>- scriptsStyle.setAlignItems(isPostScript ? AlignFlexStart : AlignFlexEnd);
</del><ins>+ scriptsStyle.setAlignItems(isPostScript ? ItemPositionFlexStart : ItemPositionFlexEnd);
</ins><span class="cx">
</span><span class="cx"> // We set the order property so that the prescripts are drawn before the base.
</span><span class="cx"> scriptsStyle.setOrder(isPostScript ? 0 : -1);
</span><span class="lines">@@ -115,7 +115,7 @@
</span><span class="cx"> {
</span><span class="cx"> // We set the base wrapper's style so that baseHeight in layout() will be an unstretched height.
</span><span class="cx"> ASSERT(m_baseWrapper && m_baseWrapper->style().hasOneRef());
</span><del>- m_baseWrapper->style().setAlignSelf(AlignFlexStart);
</del><ins>+ m_baseWrapper->style().setAlignSelf(ItemPositionFlexStart);
</ins><span class="cx">
</span><span class="cx"> // This sets the style for postscript pairs.
</span><span class="cx"> RenderObject* subSupPair = m_baseWrapper;
</span><span class="lines">@@ -135,7 +135,7 @@
</span><span class="cx"> RenderStyle& scriptsStyle = subSupPair->style();
</span><span class="cx"> scriptsStyle.setFlexDirection(FlowRow);
</span><span class="cx"> scriptsStyle.setJustifyContent(JustifyFlexStart);
</span><del>- scriptsStyle.setAlignItems(AlignCenter);
</del><ins>+ scriptsStyle.setAlignItems(ItemPositionCenter);
</ins><span class="cx"> scriptsStyle.setOrder(0);
</span><span class="cx"> scriptsStyle.setFontSize(style().fontSize());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -903,15 +903,17 @@
</span><span class="cx"> float flexShrink() const { return rareNonInheritedData->m_flexibleBox->m_flexShrink; }
</span><span class="cx"> const Length& flexBasis() const { return rareNonInheritedData->m_flexibleBox->m_flexBasis; }
</span><span class="cx"> EAlignContent alignContent() const { return static_cast<EAlignContent>(rareNonInheritedData->m_alignContent); }
</span><del>- EAlignItems alignItems() const { return static_cast<EAlignItems>(rareNonInheritedData->m_alignItems); }
- EAlignItems alignSelf() const { return static_cast<EAlignItems>(rareNonInheritedData->m_alignSelf); }
</del><ins>+ ItemPosition alignItems() const { return static_cast<ItemPosition>(rareNonInheritedData->m_alignItems); }
+ OverflowAlignment alignItemsOverflowAlignment() const { return static_cast<OverflowAlignment>(rareNonInheritedData->m_alignItemsOverflowAlignment); }
+ ItemPosition alignSelf() const { return static_cast<ItemPosition>(rareNonInheritedData->m_alignSelf); }
+ OverflowAlignment alignSelfOverflowAlignment() const { return static_cast<OverflowAlignment>(rareNonInheritedData->m_alignSelfOverflowAlignment); }
</ins><span class="cx"> EFlexDirection flexDirection() const { return static_cast<EFlexDirection>(rareNonInheritedData->m_flexibleBox->m_flexDirection); }
</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<EFlexWrap>(rareNonInheritedData->m_flexibleBox->m_flexWrap); }
</span><span class="cx"> EJustifyContent justifyContent() const { return static_cast<EJustifyContent>(rareNonInheritedData->m_justifyContent); }
</span><del>- EJustifySelf justifySelf() const { return static_cast<EJustifySelf>(rareNonInheritedData->m_justifySelf); }
- EJustifySelfOverflowAlignment justifySelfOverflowAlignment() const { return static_cast<EJustifySelfOverflowAlignment>(rareNonInheritedData->m_justifySelfOverflowAlignment); }
</del><ins>+ ItemPosition justifySelf() const { return static_cast<ItemPosition>(rareNonInheritedData->m_justifySelf); }
+ OverflowAlignment justifySelfOverflowAlignment() const { return static_cast<OverflowAlignment>(rareNonInheritedData->m_justifySelfOverflowAlignment); }
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><span class="cx"> const Vector<GridTrackSize>& gridColumns() const { return rareNonInheritedData->m_grid->m_gridColumns; }
</span><span class="lines">@@ -1475,13 +1477,15 @@
</span><span class="cx"> void setFlexBasis(Length length) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexBasis, WTF::move(length)); }
</span><span class="cx"> void setOrder(int o) { SET_VAR(rareNonInheritedData, m_order, o); }
</span><span class="cx"> void setAlignContent(EAlignContent p) { SET_VAR(rareNonInheritedData, m_alignContent, p); }
</span><del>- void setAlignItems(EAlignItems a) { SET_VAR(rareNonInheritedData, m_alignItems, a); }
- void setAlignSelf(EAlignItems a) { SET_VAR(rareNonInheritedData, m_alignSelf, a); }
</del><ins>+ void setAlignItems(ItemPosition a) { SET_VAR(rareNonInheritedData, m_alignItems, a); }
+ void setAlignItemsOverflowAlignment(OverflowAlignment overflowAlignment) { SET_VAR(rareNonInheritedData, m_alignItemsOverflowAlignment, overflowAlignment); }
+ void setAlignSelf(ItemPosition a) { SET_VAR(rareNonInheritedData, m_alignSelf, a); }
+ void setAlignSelfOverflowAlignment(OverflowAlignment overflowAlignment) { SET_VAR(rareNonInheritedData, m_alignSelfOverflowAlignment, overflowAlignment); }
</ins><span class="cx"> void setFlexDirection(EFlexDirection direction) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexDirection, direction); }
</span><span class="cx"> void setFlexWrap(EFlexWrap w) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexWrap, w); }
</span><span class="cx"> void setJustifyContent(EJustifyContent p) { SET_VAR(rareNonInheritedData, m_justifyContent, p); }
</span><del>- void setJustifySelf(EJustifySelf p) { SET_VAR(rareNonInheritedData, m_justifySelf, p); }
- void setJustifySelfOverflowAlignment(EJustifySelfOverflowAlignment overflowAlignment) { SET_VAR(rareNonInheritedData, m_justifySelfOverflowAlignment, overflowAlignment); }
</del><ins>+ void setJustifySelf(ItemPosition p) { SET_VAR(rareNonInheritedData, m_justifySelf, p); }
+ void setJustifySelfOverflowAlignment(OverflowAlignment overflowAlignment) { SET_VAR(rareNonInheritedData, m_justifySelfOverflowAlignment, overflowAlignment); }
</ins><span class="cx"> #if ENABLE(CSS_GRID_LAYOUT)
</span><span class="cx"> void setGridAutoColumns(const GridTrackSize& length) { SET_VAR(rareNonInheritedData.access()->m_grid, m_gridAutoColumns, length); }
</span><span class="cx"> void setGridAutoRows(const GridTrackSize& length) { SET_VAR(rareNonInheritedData.access()->m_grid, m_gridAutoRows, length); }
</span><span class="lines">@@ -1760,6 +1764,7 @@
</span><span class="cx"> bool isDisplayReplacedType() const { return isDisplayReplacedType(display()); }
</span><span class="cx"> bool isDisplayInlineType() const { return isDisplayInlineType(display()); }
</span><span class="cx"> bool isOriginalDisplayInlineType() const { return isDisplayInlineType(originalDisplay()); }
</span><ins>+ bool isDisplayFlexibleOrGridBox() const { return isDisplayFlexibleOrGridBox(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">@@ -1883,13 +1888,15 @@
</span><span class="cx"> static Length initialFlexBasis() { return Length(Auto); }
</span><span class="cx"> static int initialOrder() { return 0; }
</span><span class="cx"> static EAlignContent initialAlignContent() { return AlignContentStretch; }
</span><del>- static EAlignItems initialAlignItems() { return AlignStretch; }
- static EAlignItems initialAlignSelf() { return AlignAuto; }
</del><ins>+ static ItemPosition initialAlignItems() { return ItemPositionAuto; }
+ static OverflowAlignment initialAlignItemsOverflowAlignment() { return OverflowAlignmentDefault; }
+ static ItemPosition initialAlignSelf() { return ItemPositionAuto; }
+ static OverflowAlignment initialAlignSelfOverflowAlignment() { return OverflowAlignmentDefault; }
</ins><span class="cx"> static EFlexDirection initialFlexDirection() { return FlowRow; }
</span><span class="cx"> static EFlexWrap initialFlexWrap() { return FlexNoWrap; }
</span><span class="cx"> static EJustifyContent initialJustifyContent() { return JustifyFlexStart; }
</span><del>- static EJustifySelf initialJustifySelf() { return JustifySelfAuto; }
- static EJustifySelfOverflowAlignment initialJustifySelfOverflowAlignment() { return JustifySelfOverflowAlignmentDefault; }
</del><ins>+ static ItemPosition initialJustifySelf() { return ItemPositionAuto; }
+ static OverflowAlignment initialJustifySelfOverflowAlignment() { return OverflowAlignmentDefault; }
</ins><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 class="lines">@@ -2075,6 +2082,26 @@
</span><span class="cx"> return display == INLINE || isDisplayReplacedType(display);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ bool isDisplayFlexibleBox(EDisplay display) const
+ {
+ return display == FLEX || display == INLINE_FLEX;
+ }
+
+ bool isDisplayGridBox(EDisplay display) const
+ {
+#if ENABLE(CSS_GRID_LAYOUT)
+ return display == GRID || display == INLINE_GRID;
+#else
+ UNUSED_PARAM(display);
+ return false;
+#endif
+ }
+
+ bool isDisplayFlexibleOrGridBox(EDisplay display) const
+ {
+ return isDisplayFlexibleBox(display) || isDisplayGridBox(display);
+ }
+
</ins><span class="cx"> // Color accessors are all private to make sure callers use visitedDependentColor instead to access them.
</span><span class="cx"> Color invalidColor() const { static Color invalid; return invalid; }
</span><span class="cx"> Color borderLeftColor() const { return surround->border.left().color(); }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleConstantsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -244,12 +244,11 @@
</span><span class="cx"> // CSS3 Flexbox Properties
</span><span class="cx">
</span><span class="cx"> enum EAlignContent { AlignContentFlexStart, AlignContentFlexEnd, AlignContentCenter, AlignContentSpaceBetween, AlignContentSpaceAround, AlignContentStretch };
</span><del>-enum EAlignItems { AlignAuto, AlignFlexStart, AlignFlexEnd, AlignCenter, AlignStretch, AlignBaseline };
</del><span class="cx"> enum EFlexDirection { FlowRow, FlowRowReverse, FlowColumn, FlowColumnReverse };
</span><span class="cx"> enum EFlexWrap { FlexNoWrap, FlexWrap, FlexWrapReverse };
</span><span class="cx"> enum EJustifyContent { JustifyFlexStart, JustifyFlexEnd, JustifyCenter, JustifySpaceBetween, JustifySpaceAround };
</span><del>-enum EJustifySelf {JustifySelfAuto, JustifySelfStretch, JustifySelfBaseline, JustifySelfCenter, JustifySelfStart, JustifySelfEnd, JustifySelfSelfStart, JustifySelfSelfEnd, JustifySelfFlexStart, JustifySelfFlexEnd, JustifySelfLeft, JustifySelfRight};
-enum EJustifySelfOverflowAlignment {JustifySelfOverflowAlignmentDefault, JustifySelfOverflowAlignmentTrue, JustifySelfOverflowAlignmentSafe};
</del><ins>+enum ItemPosition {ItemPositionAuto, ItemPositionStretch, ItemPositionBaseline, ItemPositionLastBaseline, ItemPositionCenter, ItemPositionStart, ItemPositionEnd, ItemPositionSelfStart, ItemPositionSelfEnd, ItemPositionFlexStart, ItemPositionFlexEnd, ItemPositionLeft, ItemPositionRight};
+enum OverflowAlignment {OverflowAlignmentDefault, OverflowAlignmentTrue, OverflowAlignmentSafe};
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> enum ETextSecurity {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -83,7 +83,9 @@
</span><span class="cx"> , m_backfaceVisibility(RenderStyle::initialBackfaceVisibility())
</span><span class="cx"> , m_alignContent(RenderStyle::initialAlignContent())
</span><span class="cx"> , m_alignItems(RenderStyle::initialAlignItems())
</span><ins>+ , m_alignItemsOverflowAlignment(RenderStyle::initialAlignItemsOverflowAlignment())
</ins><span class="cx"> , m_alignSelf(RenderStyle::initialAlignSelf())
</span><ins>+ , m_alignSelfOverflowAlignment(RenderStyle::initialAlignSelfOverflowAlignment())
</ins><span class="cx"> , m_justifyContent(RenderStyle::initialJustifyContent())
</span><span class="cx"> , m_justifySelf(RenderStyle::initialJustifySelf())
</span><span class="cx"> , m_justifySelfOverflowAlignment(RenderStyle::initialJustifySelfOverflowAlignment())
</span><span class="lines">@@ -170,7 +172,9 @@
</span><span class="cx"> , m_backfaceVisibility(o.m_backfaceVisibility)
</span><span class="cx"> , m_alignContent(o.m_alignContent)
</span><span class="cx"> , m_alignItems(o.m_alignItems)
</span><ins>+ , m_alignItemsOverflowAlignment(o.m_alignItemsOverflowAlignment)
</ins><span class="cx"> , m_alignSelf(o.m_alignSelf)
</span><ins>+ , m_alignSelfOverflowAlignment(o.m_alignSelfOverflowAlignment)
</ins><span class="cx"> , m_justifyContent(o.m_justifyContent)
</span><span class="cx"> , m_justifySelf(o.m_justifySelf)
</span><span class="cx"> , m_justifySelfOverflowAlignment(o.m_justifySelfOverflowAlignment)
</span><span class="lines">@@ -265,7 +269,9 @@
</span><span class="cx"> && m_backfaceVisibility == o.m_backfaceVisibility
</span><span class="cx"> && m_alignContent == o.m_alignContent
</span><span class="cx"> && m_alignItems == o.m_alignItems
</span><ins>+ && m_alignItemsOverflowAlignment == o.m_alignItemsOverflowAlignment
</ins><span class="cx"> && m_alignSelf == o.m_alignSelf
</span><ins>+ && m_alignSelfOverflowAlignment == o.m_alignSelfOverflowAlignment
</ins><span class="cx"> && m_justifyContent == o.m_justifyContent
</span><span class="cx"> && userDrag == o.userDrag
</span><span class="cx"> && textOverflow == o.textOverflow
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareNonInheritedDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -188,12 +188,14 @@
</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_alignItems : 3; // EAlignItems
- unsigned m_alignSelf : 3; // EAlignItems
</del><ins>+ unsigned m_alignItems : 4; // ItemPosition
+ unsigned m_alignItemsOverflowAlignment : 2; // OverflowAlignment
+ unsigned m_alignSelf : 4; // ItemPosition
+ unsigned m_alignSelfOverflowAlignment : 2; // OverflowAlignment
</ins><span class="cx"> unsigned m_justifyContent : 3; // EJustifyContent
</span><span class="cx">
</span><del>- unsigned m_justifySelf : 4; // EJustifySelf
- unsigned m_justifySelfOverflowAlignment : 2; // EJustifySelfOverflowAlignment
</del><ins>+ unsigned m_justifySelf : 4; // ItemPosition
+ unsigned m_justifySelfOverflowAlignment : 2; // OverflowAlignment
</ins><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 "..."
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleResolveTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleResolveTree.cpp (176217 => 176218)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/style/StyleResolveTree.cpp 2014-11-17 19:48:47 UTC (rev 176217)
+++ trunk/Source/WebCore/style/StyleResolveTree.cpp 2014-11-17 19:52:42 UTC (rev 176218)
</span><span class="lines">@@ -121,6 +121,8 @@
</span><span class="cx"> // a separate render region object.
</span><span class="cx"> if (s1.hasFlowFrom() && (s1.specifiesColumns() != s2.specifiesColumns()))
</span><span class="cx"> return Detach;
</span><ins>+ if (s1.alignItems() != s2.alignItems())
+ return Detach;
</ins><span class="cx">
</span><span class="cx"> if (s1 != s2) {
</span><span class="cx"> if (s1.inheritedNotEqual(&s2))
</span></span></pre>
</div>
</div>
</body>
</html>
More information about the webkit-changes
mailing list