Changeset 228319 in webkit


Ignore:
Timestamp:
Feb 9, 2018 6:57:12 AM (6 years ago)
Author:
jfernandez@igalia.com
Message:

[css-align] Implement the new behavior of 'legacy' for justify-items
https://bugs.webkit.org/show_bug.cgi?id=172712

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Rebaselined Default Alignment related tests because of the new 'legacy' value.

  • web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004-expected.txt:
  • web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html:
  • web-platform-tests/css/css-align/default-alignment/parse-justify-items-002-expected.txt:
  • web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html:
  • web-platform-tests/css/css-align/default-alignment/parse-justify-items-004-expected.txt:
  • web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004-expected.txt:
  • web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html:

Source/WebCore:

The syntax of the 'justify-items' property accepts a new 'legacy' value,
replacing the 'auto' value which is now parsed as invalid.

https://github.com/w3c/csswg-drafts/issues/1318

This change affects also to the 'place-items' shorthand, which doesn't
accept 'auto' and, for the time being, neither 'legacy'.

Since the new value 'legacy' is also the default value, I don't expect
this change to break content of sites currently using the 'justify-items'
property.

No new tests, rebaselined existing test.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::valueForItemPositionWithOverflowAlignment):
(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ItemPosition const):

  • css/CSSProperties.json:
  • css/StyleResolver.cpp:

(WebCore::StyleResolver::adjustRenderStyle):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::isAuto):
(WebCore::isNormalOrStretch):
(WebCore::consumeSelfPositionOverflowPosition):
(WebCore::consumeJustifyItems):
(WebCore::consumeSimplifiedDefaultPosition):
(WebCore::consumeSimplifiedSelfPosition):
(WebCore::CSSPropertyParser::consumePlaceItemsShorthand):
(WebCore::CSSPropertyParser::consumePlaceSelfShorthand):

  • rendering/RenderFlexibleBox.cpp:

(WebCore::alignmentOffset):

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::columnAxisPositionForChild const):
(WebCore::RenderGrid::rowAxisPositionForChild const):

  • rendering/style/RenderStyle.cpp:

(WebCore::resolvedSelfAlignment):
(WebCore::RenderStyle::resolvedJustifyItems const):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::initialJustifyItems):

  • rendering/style/RenderStyleConstants.h:
  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):

LayoutTests:

Rebaselined Default Alignment related tests because of the new 'legacy' value.

  • css3/parse-alignment-of-root-elements.html:
  • css3/parse-place-items.html:
  • fast/css/parse-justify-items.html:
Location:
trunk
Files:
1 added
27 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r228300 r228319  
     12018-02-09  Javier Fernandez  <jfernandez@igalia.com>
     2
     3        [css-align] Implement the new behavior of 'legacy' for justify-items
     4        https://bugs.webkit.org/show_bug.cgi?id=172712
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Rebaselined Default Alignment related tests because of the new 'legacy' value.
     9
     10        * css3/parse-alignment-of-root-elements.html:
     11        * css3/parse-place-items.html:
     12        * fast/css/parse-justify-items.html:
     13
    1142018-02-08  Matt Lewis  <jlewis3@apple.com>
    215
  • trunk/LayoutTests/css3/parse-alignment-of-root-elements-expected.txt

    r227432 r228319  
    1717PASS Check out how the DOM's root element justify-items's value with 'legacy' keyword is used to resolve any descendant's justify-items 'auto' values.
    1818PASS Check out how the DOM's root element recomputes its descendant's style when 'legacy' keyword is removed from its justify-items value.
    19 FAIL Shadow Node inherits from ShadowHost to resolve the 'auto' values for align-self. assert_equals: alignItems specified value is not what it should. expected "right" but got ""
     19PASS Shadow Node inherits from ShadowHost to resolve the 'auto' values for align-self.
    2020PASS Shadow Node inherits from ShadowHost to resolve the 'auto' values for justify-self.
    2121PASS Check out how the 'legacy' keyword in justify-items propagates from the DOM Tree to the Shadow Node.
    22 FAIL Check out how align-self uses the 'shadowHost' as 'slotted' element's parent while 'slot' is not assigned. assert_equals: alignItems specified value is not what it should. expected "left" but got ""
    23 FAIL Check out how justify-self uses the 'shadowHost' as 'slotted' element's parent while 'slot' is not assigned. assert_equals: justifyItems is not what is should. expected "normal" but got "left"
    24 FAIL Check out how the 'legacy' keyword in justify-items affects the 'slotted' elements while 'slot' is not assigned. assert_equals: justifyItems is not what is should. expected "normal" but got "left"
    25 FAIL Check out how align-self uses the 'slot' element's parent (Shadow Node) as 'slotted' element' s parent after the 'slot' is assigned. assert_equals: alignItems specified value is not what it should. expected "left" but got ""
     22FAIL Check out how align-self uses the 'shadowHost' as 'slotted' element's parent while 'slot' is not assigned. assert_equals: alignItems is not what is should. expected "normal" but got "end"
     23FAIL Check out how justify-self uses the 'shadowHost' as 'slotted' element's parent while 'slot' is not assigned. assert_equals: justifyItems is not what is should. expected "left" but got "normal"
     24PASS Check out how the 'legacy' keyword in justify-items affects the 'slotted' elements while 'slot' is not assigned.
     25PASS Check out how align-self uses the 'slot' element's parent (Shadow Node) as 'slotted' element' s parent after the 'slot' is assigned.
    2626PASS Check out how justify-self uses the 'slot' element's parent (Shadow Node) as 'slotted' element' s parent after the 'slot' is assigned.
    27 FAIL Check out how the 'legacy' keyword affects the 'slotted' elements after the 'slot' is assigned. assert_equals: justifyItems is not what is should. expected "normal" but got "legacy center"
    28 FAIL The 'slot' element should not use its parent inside the ShadowDOM tree to resolve the align-self 'auto' values because Blink does not support slots in the flat tree. assert_equals: alignItems specified value is not what it should. expected "left" but got ""
     27PASS Check out how the 'legacy' keyword affects the 'slotted' elements after the 'slot' is assigned.
     28PASS The 'slot' element should not use its parent inside the ShadowDOM tree to resolve the align-self 'auto' values because Blink does not support slots in the flat tree.
    2929PASS The 'slot' element should not use its parent inside the ShadowDOM tree to resolve the justify-self 'auto' values because Blink does not support slots in the flat tree.
    3030
  • trunk/LayoutTests/css3/parse-alignment-of-root-elements.html

    r219315 r228319  
    5656    document.documentElement.style.justifyItems = "center";
    5757    checkValues(document.documentElement, "justifyItems", "justify-items", "center", "center");
    58     document.body.style.justifyItems = "auto";
     58    document.body.style.justifyItems = "legacy";
    5959    document.body.style.justifySelf = "auto";
    60     checkValues(document.body, "justifyItems", "justify-items", "auto", "normal");
     60    checkValues(document.body, "justifyItems", "justify-items", "legacy", "normal");
    6161    checkValues(document.body, "justifySelf", "justify-self", "auto", "auto");
    62     block.style.justifyItems = "auto";
     62    block.style.justifyItems = "legacy";
    6363    block.style.justifySelf = "auto";
    64     checkValues(block, "justifyItems", "justify-items",  "auto", "normal");
     64    checkValues(block, "justifyItems", "justify-items",  "legacy", "normal");
    6565    checkValues(block, "justifySelf", "justify-self",  "auto", "auto");
    6666}, "Check out how the DOM's root element justify-items's value is used to resolve its children's justify-self 'auto' values.");
    6767
    6868test(function() {
    69     document.documentElement.style.justifyItems = "auto";
    70     checkValues(document.documentElement, "justifyItems", "justify-items", "auto", "normal");
     69    document.documentElement.style.justifyItems = "legacy";
     70    checkValues(document.documentElement, "justifyItems", "justify-items", "legacy", "normal");
    7171    checkValues(document.body, "justifySelf", "justify-self",  "auto", "auto");
    7272    checkValues(block, "justifySelf", "justify-self",  "auto", "auto");
     
    7676    document.documentElement.style.justifyItems = "legacy center";
    7777    checkValues(document.documentElement, "justifyItems", "justify-items",  "legacy center", "legacy center");
    78     document.body.style.justifyItems = "auto";
     78    document.body.style.justifyItems = "legacy";
    7979    document.body.style.justifySelf = "auto";
    80     checkValues(document.body, "justifyItems", "justify-items",  "auto", "legacy center");
     80    checkValues(document.body, "justifyItems", "justify-items",  "legacy", "legacy center");
    8181    checkValues(document.body, "justifySelf", "justify-self",  "auto", "auto");
    82     block.style.justifyItems = "auto";
     82    block.style.justifyItems = "legacy";
    8383    block.style.justifySelf = "auto";
    84     checkValues(block, "justifyItems", "justify-items",  "auto", "legacy center");
     84    checkValues(block, "justifyItems", "justify-items",  "legacy", "legacy center");
    8585    checkValues(block, "justifySelf", "justify-self",  "auto", "auto");
    8686}, "Check out how the DOM's root element justify-items's value with 'legacy' keyword is used to resolve any descendant's justify-items 'auto' values.");
    8787
    8888test(function() {
    89     document.documentElement.style.justifyItems = "auto";
    90     checkValues(document.body, "justifyItems", "justify-items",  "auto", "normal");
     89    document.documentElement.style.justifyItems = "legacy";
     90    checkValues(document.body, "justifyItems", "justify-items",  "legacy", "normal");
    9191    checkValues(document.body, "justifySelf", "justify-self",  "auto", "auto");
    92     checkValues(block, "justifyItems", "justify-items",  "auto", "normal");
     92    checkValues(block, "justifyItems", "justify-items",  "legacy", "normal");
    9393    checkValues(block, "justifySelf", "justify-self",  "auto", "auto");
    9494}, "Check out how the DOM's root element recomputes its descendant's style when 'legacy' keyword is removed from its justify-items value.");
     
    107107test(function() {
    108108    shadowHost.style.alignItems = "center";
    109     shadowNode.style.alignItems = "right";
     109    shadowNode.style.alignItems = "end";
    110110    checkValues(shadowHost, "alignItems", "align-items", "center", "center");
    111     checkValues(shadowNode, "alignItems", "align-items", "right", "right");
     111    checkValues(shadowNode, "alignItems", "align-items", "end", "end");
    112112    shadowNode.style.alignItems = "";
    113113    checkValues(shadowNode, "alignItems", "align-items", "", "normal");
     
    128128
    129129test(function() {
    130     shadowHost.style.justifyItems = "auto";
     130    shadowHost.style.justifyItems = "legacy";
    131131    shadowNode.style.justifyItems = "right";
    132132    shadowNode.style.justifySelf = "auto";
    133     checkValues(shadowHost, "justifyItems", "justify-items", "auto", "normal");
     133    checkValues(shadowHost, "justifyItems", "justify-items", "legacy", "normal");
    134134    checkValues(shadowNode, "justifyItems", "justify-items", "right", "right");
    135135    checkValues(shadowNode, "justifySelf", "justify-self", "auto", "auto");
    136136
    137     checkValues(shadowHost, "justifyItems", "justify-items", "auto", "normal");
    138     document.documentElement.style.justifyItems = "legacy center";
    139     checkValues(document.documentElement, "justifyItems", "justify-items",  "legacy center", "legacy center");
    140     checkValues(shadowHost, "justifyItems", "justify-items",  "auto", "legacy center");
     137    checkValues(shadowHost, "justifyItems", "justify-items", "legacy", "normal");
     138    document.documentElement.style.justifyItems = "legacy center";
     139    checkValues(document.documentElement, "justifyItems", "justify-items",  "legacy center", "legacy center");
     140    checkValues(shadowHost, "justifyItems", "justify-items",  "legacy", "legacy center");
    141141    checkValues(shadowNode, "justifyItems", "justify-items", "right", "right");
    142142    checkValues(shadowNode, "justifySelf", "justify-self", "auto", "auto");
    143     shadowNode.style.justifyItems = "auto";
    144     checkValues(shadowNode, "justifyItems", "justify-items", "auto", "legacy center");
    145     document.documentElement.style.justifyItems = "auto";
     143    shadowNode.style.justifyItems = "legacy";
     144    checkValues(shadowNode, "justifyItems", "justify-items", "legacy", "legacy center");
     145    document.documentElement.style.justifyItems = "legacy";
    146146}, "Check out how the 'legacy' keyword in justify-items propagates from the DOM Tree to the Shadow Node.");
    147147
     
    154154test(function() {
    155155    shadowHost.style.alignItems = "center";
    156     shadowNode.style.alignItems = "right";
    157     slotted.style.alignItems = "left";
    158     checkValues(slotted, "alignItems", "align-items", "left", "left");
    159     slotted.style.alignItems = "normal";
    160     checkValues(slotted, "alignItems", "align-items", "normal", "normal");
     156    shadowNode.style.alignItems = "start";
     157    slotted.style.alignItems = "end";
     158    checkValues(slotted, "alignItems", "align-items", "end", "end");
     159    slotted.style.alignItems = "";
     160    checkValues(slotted, "alignItems", "align-items", "", "normal");
    161161    slotted.style.alignSelf = "start";
    162162    checkValues(slotted, "alignSelf", "align-self", "start", "start");
     
    179179
    180180test(function() {
    181     shadowHost.style.justifyItems = "auto";
    182     shadowNode.style.justifyItems = "right";
    183     checkValues(shadowHost, "justifyItems", "justify-items", "auto", "normal");
    184     checkValues(shadowNode, "justifyItems", "justify-items", "right", "right");
    185     document.documentElement.style.justifyItems = "legacy center";
    186     checkValues(document.documentElement, "justifyItems", "justify-items",  "legacy center", "legacy center");
    187     checkValues(shadowHost, "justifyItems", "justify-items",  "auto", "legacy center");
    188     slotted.style.justifyItems = "auto";
    189     checkValues(slotted, "justifyItems", "justify-items",  "auto", "normal");
     181    shadowHost.style.justifyItems = "legacy";
     182    shadowNode.style.justifyItems = "right";
     183    checkValues(shadowHost, "justifyItems", "justify-items", "legacy", "normal");
     184    checkValues(shadowNode, "justifyItems", "justify-items", "right", "right");
     185    document.documentElement.style.justifyItems = "legacy center";
     186    checkValues(document.documentElement, "justifyItems", "justify-items",  "legacy center", "legacy center");
     187    checkValues(shadowHost, "justifyItems", "justify-items",  "legacy", "legacy center");
     188    slotted.style.justifyItems = "legacy";
     189    checkValues(slotted, "justifyItems", "justify-items",  "legacy", "normal");
    190190    slotted.style.justifySelf = "auto";
    191191    checkValues(slotted, "justifySelf", "justify-self",  "auto", "auto");
    192     shadowNode.style.justifyItems = "auto";
    193     checkValues(shadowNode, "justifyItems", "justify-items", "auto", "legacy center");
    194     checkValues(slotted, "justifyItems", "justify-items", "auto", "normal");
     192    shadowNode.style.justifyItems = "legacy";
     193    checkValues(shadowNode, "justifyItems", "justify-items", "legacy", "legacy center");
     194    checkValues(slotted, "justifyItems", "justify-items", "legacy", "normal");
    195195    checkValues(slotted, "justifySelf", "justify-self", "auto", "auto");
    196     document.documentElement.style.justifyItems = "auto";
     196    document.documentElement.style.justifyItems = "legacy";
    197197}, "Check out how the 'legacy' keyword in justify-items affects the 'slotted' elements while 'slot' is not assigned.");
    198198
     
    204204test(function() {
    205205    shadowHost.style.alignItems = "center";
    206     shadowNode.style.alignItems = "right";
    207     slotted.style.alignItems = "left";
    208     checkValues(slotted, "alignItems", "align-items", "left", "left");
     206    shadowNode.style.alignItems = "end";
     207    slotted.style.alignItems = "start";
     208    checkValues(slotted, "alignItems", "align-items", "start", "start");
    209209    slotted.style.alignItems = "";
    210210    checkValues(slotted, "alignItems", "align-items", "", "normal");
     
    229229
    230230test(function() {
    231     shadowHost.style.justifyItems = "auto";
    232     shadowNode.style.justifyItems = "right";
    233     checkValues(shadowHost, "justifyItems", "justify-items", "auto", "normal");
    234     checkValues(shadowNode, "justifyItems", "justify-items", "right", "right");
    235     document.documentElement.style.justifyItems = "legacy center";
    236     checkValues(document.documentElement, "justifyItems", "justify-items",  "legacy center", "legacy center");
    237     checkValues(shadowHost, "justifyItems", "justify-items", "auto", "legacy center");
    238     slotted.style.justifyItems = "auto";
    239     checkValues(slotted, "justifyItems", "justify-items", "auto", "normal"); // Shadow host is not the parent now, but ShadowNode.
     231    shadowHost.style.justifyItems = "legacy";
     232    shadowNode.style.justifyItems = "right";
     233    checkValues(shadowHost, "justifyItems", "justify-items", "legacy", "normal");
     234    checkValues(shadowNode, "justifyItems", "justify-items", "right", "right");
     235    document.documentElement.style.justifyItems = "legacy center";
     236    checkValues(document.documentElement, "justifyItems", "justify-items",  "legacy center", "legacy center");
     237    checkValues(shadowHost, "justifyItems", "justify-items", "legacy", "legacy center");
     238    slotted.style.justifyItems = "legacy";
     239    checkValues(slotted, "justifyItems", "justify-items", "legacy", "normal"); // Shadow host is not the parent now, but ShadowNode.
    240240    slotted.style.justifySelf = "auto";
    241241    checkValues(slotted, "justifySelf", "justify-self", "auto", "auto"); // Shadow host is not the parent now, but ShadowNode.
    242     shadowNode.style.justifyItems = "auto";
    243     checkValues(shadowNode, "justifyItems", "justify-items", "auto", "legacy center");
    244     checkValues(slotted, "justifyItems", "justify-items", "auto", "legacy center"); // Now that shadowNode is auto, 'legacy' applies.
     242    shadowNode.style.justifyItems = "legacy";
     243    checkValues(shadowNode, "justifyItems", "justify-items", "legacy", "legacy center");
     244    checkValues(slotted, "justifyItems", "justify-items", "legacy", "legacy center"); // Now that shadowNode is auto, 'legacy' applies.
    245245    checkValues(slotted, "justifySelf", "justify-self", "auto", "auto"); // Now that shadowNode is auto, 'legacy' applies.
    246     document.documentElement.style.justifyItems = "auto";
     246    document.documentElement.style.justifyItems = "legacy";
    247247}, "Check out how the 'legacy' keyword affects the 'slotted' elements after the 'slot' is assigned.");
    248248
    249249test(function() {
    250250    shadowHost.style.alignItems = "center";
    251     shadowNode.style.alignItems = "right";
    252     slot.style.alignItems = "left";
    253     checkValues(slot, "alignItems", "align-items",  "left", "left");
     251    shadowNode.style.alignItems = "end";
     252    slot.style.alignItems = "start";
     253    checkValues(slot, "alignItems", "align-items",  "start", "start");
    254254    slot.style.alignItems = "";
    255255    checkValues(slot, "alignItems", "align-items", "", "normal");
    256     slot.style.alignSelf = "left";
    257     checkValues(slot, "alignSelf", "align-self",  "left", "left");
     256    slot.style.alignSelf = "start";
     257    checkValues(slot, "alignSelf", "align-self",  "start", "start");
    258258    slot.style.alignSelf = "auto";
    259259    checkValues(slot, "alignSelf", "align-self",  "auto", "auto");
     
    266266    slot.style.justifyItems = "left";
    267267    checkValues(slot, "justifyItems", "justify-items",  "left", "left");
    268     slot.style.justifyItems = "auto";
    269     checkValues(slot, "justifyItems", "justify-items", "auto", "normal");
     268    slot.style.justifyItems = "legacy";
     269    checkValues(slot, "justifyItems", "justify-items", "legacy", "normal");
    270270    slot.style.justifySelf = "left";
    271271    checkValues(slot, "justifySelf", "justify-self",  "left", "left");
  • trunk/LayoutTests/css3/parse-place-items-expected.txt

    r214966 r228319  
    33
    44PASS Test getting the Computed Value of place-items's longhand properties when setting 'normal' value through CSS.
    5 PASS Test getting the Computed Value of place-items's longhand properties when setting 'center auto' value through CSS.
    65PASS Test getting the Computed Value of place-items's longhand properties when setting 'baseline' value through CSS.
    76PASS Test getting the Computed Value of place-items's longhand properties when setting 'first baseline' value through CSS.
     
    1514PASS Test getting the Computed Value of place-items's longhand properties when setting 'start self-end' value through CSS.
    1615PASS Test getting the Computed Value of place-items's longhand properties when setting 'start baseline' value through CSS.
    17 PASS Test setting '' as incorrect value through CSS.
    1816PASS Test setting 'auto' as incorrect value through CSS.
     17PASS Test setting 'center auto' as incorrect value through CSS.
    1918PASS Test setting 'none' as incorrect value through CSS.
    2019PASS Test setting 'safe' as incorrect value through CSS.
  • trunk/LayoutTests/css3/parse-place-items.html

    r219315 r228319  
    66  place-items: normal;
    77}
    8 #placeItemsCenterAuto {
    9   place-items: center auto;
    10 }
    118#placeItemsBaseline {
    129  place-items: baseline;
     
    4946#placeItemsAuto {
    5047  place-items: auto;
     48}
     49#placeItemsCenterAuto {
     50  place-items: center auto;
    5151}
    5252#placeItemsNone {
     
    7575
    7676  <div id="placeItemsNormal"></div>
    77   <div id="placeItemsCenterAuto"></div>
    7877  <div id="placeItemsBaseline"></div>
    7978  <div id="placeItemsFirstBaseline"></div>
     
    9089  <div id="placeItemsEmpty"></div>
    9190  <div id="placeItemsAuto"></div>
     91  <div id="placeItemsCenterAuto"></div>
    9292  <div id="placeItemsNone"></div>
    9393  <div id="placeItemsSafe"></div>
     
    126126
    127127test(function() {
    128   checkValues(placeItemsCenterAuto, "placeItems", "place-items", "", "center normal");
    129   checkPlaceItemsValues(placeItemsCenterAuto, "", "center", "normal");
    130 }, "Test getting the Computed Value of place-items's longhand properties when setting 'center auto' value through CSS.");
    131 
    132 test(function() {
    133128  checkValues(placeItemsBaseline, "placeItems", "place-items", "", "baseline baseline");
    134129  checkPlaceItemsValues(placeItemsBaseline, "", "baseline", "baseline");
     
    188183  checkValues(placeItemsAuto, "placeItems", "place-items", "", "normal normal");
    189184  checkPlaceItemsValues(placeItemsAuto, "", "normal", "normal");
    190 }, "Test setting '' as incorrect value through CSS.");
    191 
    192 test(function() {
    193   checkValues(placeItemsAuto, "placeItems", "place-items", "", "normal normal");
    194   checkPlaceItemsValues(placeItemsAuto, "", "normal", "normal");
    195185}, "Test setting 'auto' as incorrect value through CSS.");
     186
     187test(function() {
     188  checkValues(placeItemsCenterAuto, "placeItems", "place-items", "", "normal normal");
     189  checkPlaceItemsValues(placeItemsCenterAuto, "", "normal", "normal");
     190}, "Test setting 'center auto' as incorrect value through CSS.");
    196191
    197192test(function() {
     
    228223
    229224test(function() {
     225  checkPlaceItemsValuesBadJS("auto");
    230226  checkPlaceItemsValuesBadJS("auto normal");
     227  checkPlaceItemsValuesBadJS("center auto");
     228  checkPlaceItemsValuesBadJS("legacy");
     229  checkPlaceItemsValuesBadJS("left legacy");
    231230  checkPlaceItemsValuesBadJS("space-between");
    232231  checkPlaceItemsValuesBadJS("center safe");
  • trunk/LayoutTests/fast/css/parse-justify-items-expected.txt

    r214564 r228319  
    55PASS Test initial value of justify-items through JS
    66PASS Test getting and setting justify-items through JS
    7 PASS Test 'auto' value resolution for the root node
     7PASS Test 'legacy' value resolution for the root node
    88PASS Test bad combinations of justify-items
    99PASS Test the value 'initial'
     
    1111PASS Test the value 'initial' for flex containers
    1212PASS Test the value 'inherit'
    13 PASS Test the value 'legacy'
     13PASS Test the legacy alignment
    1414
  • trunk/LayoutTests/fast/css/parse-justify-items.html

    r227297 r228319  
    246246    checkValues(element, "justifyItems", "justify-items",  "normal", "normal");
    247247
    248     element.style.justifyItems = "auto";
    249     checkValues(element, "justifyItems", "justify-items",  "auto", "normal");
     248    element.style.justifyItems = "legacy";
     249    checkValues(element, "justifyItems", "justify-items",  "legacy", "normal");
    250250
    251251    element.style.display = "flex";
    252     element.style.justifyItems = "auto";
    253     checkValues(element, "justifyItems", "justify-items",  "auto", "normal");
     252    element.style.justifyItems = "legacy";
     253    checkValues(element, "justifyItems", "justify-items",  "legacy", "normal");
    254254
    255255    element.style.display = "grid";
    256     element.style.justifyItems = "auto";
    257     checkValues(element, "justifyItems", "justify-items",  "auto", "normal");
     256    element.style.justifyItems = "legacy";
     257    checkValues(element, "justifyItems", "justify-items",  "legacy", "normal");
    258258
    259259    element.style.justifyItems = "self-end";
     
    262262
    263263test(function() {
    264     document.documentElement.style.justifyItems = "auto";
    265     checkValues(document.documentElement, "justifyItems", "justify-items",  "auto", "normal");
    266 }, "Test 'auto' value resolution for the root node");
    267 
    268 test(function() {
    269     container = document.createElement("div");
     264    document.documentElement.style.justifyItems = "legacy";
     265    checkValues(document.documentElement, "justifyItems", "justify-items",  "legacy", "normal");
     266}, "Test 'legacy' value resolution for the root node");
     267
     268test(function() {
    270269    element = document.createElement("div");
    271     container.appendChild(element);
    272     document.body.appendChild(container);
    273 
     270    document.body.appendChild(element);
     271
     272    checkBadValues(element, "justifyItems", "justify-items",  "auto");
    274273    checkBadValues(element, "justifyItems", "justify-items",  "unsafe auto");
    275274    checkBadValues(element, "justifyItems", "justify-items",  "auto safe");
     
    301300    checkBadValues(element, "justifyItems", "justify-items",  "legacy auto");
    302301    checkBadValues(element, "justifyItems", "justify-items",  "legacy stretch");
    303     checkBadValues(element, "justifyItems", "justify-items",  "legacy");
     302    checkBadValues(element, "justifyItems", "justify-items",  "safe legacy");
    304303    checkBadValues(element, "justifyItems", "justify-items",  "legacy left right");
    305304    checkBadValues(element, "justifyItems", "justify-items",  "start safe");
     
    332331    checkLegacyValues("justifyItems", "justify-items", "legacy center");
    333332    checkLegacyValues("justifyItems", "justify-items", "legacy right");
    334 }, "Test the value 'legacy'");
     333}, "Test the legacy alignment");
    335334</script>
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r228312 r228319  
     12018-02-09  Javier Fernandez  <jfernandez@igalia.com>
     2
     3        [css-align] Implement the new behavior of 'legacy' for justify-items
     4        https://bugs.webkit.org/show_bug.cgi?id=172712
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Rebaselined Default Alignment related tests because of the new 'legacy' value.
     9
     10        * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004-expected.txt:
     11        * web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html:
     12        * web-platform-tests/css/css-align/default-alignment/parse-justify-items-002-expected.txt:
     13        * web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html:
     14        * web-platform-tests/css/css-align/default-alignment/parse-justify-items-004-expected.txt:
     15        * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004-expected.txt:
     16        * web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html:
     17
    1182018-02-08  Antoine Quint  <graouts@apple.com>
    219
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004-expected.txt

    r227786 r228319  
    66PASS Verify numeric values are invalid
    77PASS Verify 'auto' values are invalid
     8PASS Verify self-position values are invalid
    89PASS Verify empty declaration is invalid
    910
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html

    r227786 r228319  
    4949
    5050    test(function() {
     51        checkInvalidValues("self-start")
     52        checkInvalidValues("center self-end")
     53        checkInvalidValues("self-end start")
     54    }, "Verify self-position values are invalid");
     55
     56    test(function() {
    5157        checkInvalidValues("")
    5258    }, "Verify empty declaration is invalid");
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-002-expected.txt

    r227432 r228319  
    11
    2 FAIL Test 'initial' value when nothing is specified assert_equals: justify-items computed style is not what is should. expected "legacy" but got "normal"
    3 FAIL Test justify-items: 'initial' assert_equals: justify-items computed style is not what is should. expected "legacy" but got "normal"
    4 FAIL Test grid items justify-items: 'initial' assert_equals: justify-items computed style is not what is should. expected "legacy" but got "normal"
    5 FAIL Test flex items justify-items: 'initial' assert_equals: justify-items computed style is not what is should. expected "legacy" but got "normal"
    6 FAIL Test absolute positioned elements justify-items: 'initial' assert_equals: justify-items computed style is not what is should. expected "legacy" but got "normal"
    7 FAIL Test absolute positioned grid items justify-items: 'initial' assert_equals: justify-items computed style is not what is should. expected "legacy" but got "normal"
    8 FAIL Test absolute positioned flex items justify-items: 'initial' assert_equals: justify-items computed style is not what is should. expected "legacy" but got "normal"
     2PASS Test 'initial' value when nothing is specified
     3PASS Test justify-items: 'initial'
     4PASS Test grid items justify-items: 'initial'
     5PASS Test flex items justify-items: 'initial'
     6PASS Test absolute positioned elements justify-items: 'initial'
     7PASS Test absolute positioned grid items justify-items: 'initial'
     8PASS Test absolute positioned flex items justify-items: 'initial'
    99
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html

    r227432 r228319  
    2020    element = document.createElement("div");
    2121    document.body.appendChild(element);
    22     checkValues(element, "justifyItems", "justify-items", "", "legacy");
     22    checkValues(element, "justifyItems", "justify-items", "", "normal");
    2323}, "Test 'initial' value when nothing is specified");
    2424
    2525test(function() {
    2626    container.style.display = "";
    27     checkInitialValues(element, "justifyItems", "justify-items", "center", "legacy");
     27    checkInitialValues(element, "justifyItems", "justify-items", "center", "normal");
    2828}, "Test justify-items: 'initial'");
    2929
    3030test(function() {
    3131    container.style.display = "grid";
    32     checkInitialValues(element, "justifyItems", "justify-items", "safe start", "legacy");
     32    checkInitialValues(element, "justifyItems", "justify-items", "safe start", "normal");
    3333}, "Test grid items justify-items: 'initial'");
    3434
    3535test(function() {
    3636    container.style.display = "flex";
    37     checkInitialValues(element, "justifyItems", "justify-items", "unsafe end", "legacy");
     37    checkInitialValues(element, "justifyItems", "justify-items", "unsafe end", "normal");
    3838}, "Test flex items justify-items: 'initial'");
    3939
     
    4141    container.style.display = "";
    4242    element.style.position = "absolute";
    43     checkInitialValues(element, "justifyItems", "justify-items", "start", "legacy");
     43    checkInitialValues(element, "justifyItems", "justify-items", "start", "normal");
    4444}, "Test absolute positioned elements justify-items: 'initial'");
    4545
     
    4747    container.style.display = "grid";
    4848    element.style.position = "absolute";
    49     checkInitialValues(element, "justifyItems", "justify-items", "end", "legacy");
     49    checkInitialValues(element, "justifyItems", "justify-items", "end", "normal");
    5050}, "Test absolute positioned grid items justify-items: 'initial'");
    5151
     
    5353    container.style.display = "flex";
    5454    element.style.position = "absolute";
    55     checkInitialValues(element, "justifyItems", "justify-items", "end", "legacy");
     55    checkInitialValues(element, "justifyItems", "justify-items", "end", "normal");
    5656}, "Test absolute positioned flex items justify-items: 'initial'");
    5757</script>
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-004-expected.txt

    r227432 r228319  
    11
    2 FAIL Checking invalid combination - justify-items: auto assert_equals: justify-items specified value is not what it should. expected "" but got "auto"
     2PASS Checking invalid combination - justify-items: auto
    33PASS Checking invalid combination - justify-items: space-around
    44PASS Checking invalid combination - justify-items: auto safe
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004-expected.txt

    r227432 r228319  
    44PASS Verify 'left' and 'right' values are invalid for block/cross axis alignment
    55PASS Verify numeric values are invalid
    6 PASS Verify 'auto' value is invalid as first longhand value.
     6PASS Verify 'auto' value is invalid.
     7PASS Verify 'legacy' value is invalid.
    78PASS Verify empty declaration is invalid
    89
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html

    r227786 r228319  
    3838       checkInvalidValues("auto right")
    3939       checkInvalidValues("auto auto")
    40     }, "Verify 'auto' value is invalid as first longhand value.");
     40       checkInvalidValues("center auto")
     41    }, "Verify 'auto' value is invalid.");
     42
     43    test(function() {
     44       checkInvalidValues("legacy")
     45       checkInvalidValues("legacy start")
     46       checkInvalidValues("end legacy")
     47       checkInvalidValues("legacy left")
     48       checkInvalidValues("center legacy")
     49       checkInvalidValues("start legacy center")
     50    }, "Verify 'legacy' value is invalid.");
     51
    4152
    4253    test(function() {
  • trunk/Source/WebCore/ChangeLog

    r228316 r228319  
     12018-02-09  Javier Fernandez  <jfernandez@igalia.com>
     2
     3        [css-align] Implement the new behavior of 'legacy' for justify-items
     4        https://bugs.webkit.org/show_bug.cgi?id=172712
     5
     6        Reviewed by Antti Koivisto.
     7
     8        The syntax of the 'justify-items' property accepts a new 'legacy' value,
     9        replacing the 'auto' value which is now parsed as invalid.
     10
     11        https://github.com/w3c/csswg-drafts/issues/1318
     12
     13        This change affects also to the 'place-items' shorthand, which doesn't
     14        accept 'auto' and, for the time being, neither 'legacy'.
     15
     16        Since the new value 'legacy' is also the default value, I don't expect
     17        this change to break content of sites currently using the 'justify-items'
     18        property.
     19
     20        No new tests, rebaselined existing test.
     21
     22        * css/CSSComputedStyleDeclaration.cpp:
     23        (WebCore::valueForItemPositionWithOverflowAlignment):
     24        (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
     25        * css/CSSPrimitiveValueMappings.h:
     26        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
     27        (WebCore::CSSPrimitiveValue::operator ItemPosition const):
     28        * css/CSSProperties.json:
     29        * css/StyleResolver.cpp:
     30        (WebCore::StyleResolver::adjustRenderStyle):
     31        * css/parser/CSSPropertyParser.cpp:
     32        (WebCore::isAuto):
     33        (WebCore::isNormalOrStretch):
     34        (WebCore::consumeSelfPositionOverflowPosition):
     35        (WebCore::consumeJustifyItems):
     36        (WebCore::consumeSimplifiedDefaultPosition):
     37        (WebCore::consumeSimplifiedSelfPosition):
     38        (WebCore::CSSPropertyParser::consumePlaceItemsShorthand):
     39        (WebCore::CSSPropertyParser::consumePlaceSelfShorthand):
     40        * rendering/RenderFlexibleBox.cpp:
     41        (WebCore::alignmentOffset):
     42        * rendering/RenderGrid.cpp:
     43        (WebCore::RenderGrid::columnAxisPositionForChild const):
     44        (WebCore::RenderGrid::rowAxisPositionForChild const):
     45        * rendering/style/RenderStyle.cpp:
     46        (WebCore::resolvedSelfAlignment):
     47        (WebCore::RenderStyle::resolvedJustifyItems const):
     48        * rendering/style/RenderStyle.h:
     49        (WebCore::RenderStyle::initialJustifyItems):
     50        * rendering/style/RenderStyleConstants.h:
     51        * rendering/style/StyleRareNonInheritedData.cpp:
     52        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
     53
    1542018-02-09  Yacine Bandou  <yacine.bandou_ext@softathome.com>
    255
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r228095 r228319  
    25252525        if (data.position() >= ItemPositionCenter && data.overflow() != OverflowAlignmentDefault)
    25262526            result->append(cssValuePool.createValue(data.overflow()));
    2527         result->append(cssValuePool.createValue(data.position()));
     2527        if (data.position() == ItemPositionLegacy)
     2528            result->append(cssValuePool.createIdentifierValue(CSSValueNormal));
     2529        else
     2530            result->append(cssValuePool.createValue(data.position()));
    25282531    }
    25292532    ASSERT(result->length() <= 2);
     
    30043007            return valueForContentPositionAndDistributionWithOverflowAlignment(style.justifyContent(), CSSValueFlexStart);
    30053008        case CSSPropertyJustifyItems:
    3006             return valueForItemPositionWithOverflowAlignment(style.justifyItems().position() == ItemPositionAuto ? RenderStyle::initialDefaultAlignment() : style.justifyItems());
     3009            return valueForItemPositionWithOverflowAlignment(style.justifyItems());
    30073010        case CSSPropertyJustifySelf:
    30083011            return valueForItemPositionWithOverflowAlignment(style.justifySelf());
  • trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h

    r226666 r228319  
    49634963    m_primitiveUnitType = CSS_VALUE_ID;
    49644964    switch (itemPosition) {
     4965    case ItemPositionLegacy:
     4966        m_value.valueID = CSSValueLegacy;
     4967        break;
    49654968    case ItemPositionAuto:
    49664969        m_value.valueID = CSSValueAuto;
     
    50115014{
    50125015    switch (m_value.valueID) {
     5016    case CSSValueLegacy:
     5017        return ItemPositionLegacy;
    50135018    case CSSValueAuto:
    50145019        return ItemPositionAuto;
  • trunk/Source/WebCore/css/CSSProperties.json

    r228095 r228319  
    47394739                    "-webkit-justify-items"
    47404740                ],
    4741                 "initial": "initialSelfAlignment",
    47424741                "converter": "SelfOrDefaultAlignmentData"
    47434742            },
  • trunk/Source/WebCore/css/StyleResolver.cpp

    r227141 r228319  
    10641064    }
    10651065
    1066     // If the inherited value of justify-items includes the 'legacy' keyword,
    1067     // 'auto' computes to the inherited value. Otherwise, 'auto' computes to
    1068     // 'normal'.
    1069     if (style.justifyItems().position() == ItemPositionAuto) {
    1070         if (parentBoxStyle->justifyItems().positionType() == LegacyPosition)
    1071             style.setJustifyItems(parentBoxStyle->justifyItems());
    1072     }
     1066    // If the inherited value of justify-items includes the 'legacy' keyword (plus 'left', 'right' or
     1067    // 'center'), 'legacy' computes to the the inherited value. Otherwise, 'auto' computes to 'normal'.
     1068    if (parentBoxStyle->justifyItems().positionType() == LegacyPosition && style.justifyItems().position() == ItemPositionLegacy)
     1069        style.setJustifyItems(parentBoxStyle->justifyItems());
    10731070}
    10741071
  • trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp

    r228095 r228319  
    26622662}
    26632663
    2664 static bool isAutoOrNormalOrStretch(CSSValueID id)
    2665 {
    2666     return identMatches<CSSValueAuto, CSSValueNormal, CSSValueStretch>(id);
     2664static bool isAuto(CSSValueID id)
     2665{
     2666    return identMatches<CSSValueAuto>(id);
     2667}
     2668
     2669static bool isNormalOrStretch(CSSValueID id)
     2670{
     2671    return identMatches<CSSValueNormal, CSSValueStretch>(id);
    26672672}
    26682673
     
    31143119    ASSERT(isPositionKeyword);
    31153120    CSSValueID id = range.peek().id();
    3116     if (isAutoOrNormalOrStretch(id))
     3121    if (isAuto(id) || isNormalOrStretch(id))
    31173122        return consumeIdent(range);
    31183123
     
    31393144static RefPtr<CSSValue> consumeJustifyItems(CSSParserTokenRange& range)
    31403145{
     3146    // justify-items property does not allow the 'auto' value.
     3147    if (identMatches<CSSValueAuto>(range.peek().id()))
     3148        return nullptr;
    31413149    CSSParserTokenRange rangeCopy = range;
    31423150    RefPtr<CSSPrimitiveValue> legacy = consumeIdent<CSSValueLegacy>(rangeCopy);
     
    31443152    if (!legacy)
    31453153        legacy = consumeIdent<CSSValueLegacy>(rangeCopy);
    3146     if (legacy && positionKeyword) {
     3154    if (legacy) {
    31473155        range = rangeCopy;
    3148         return createPrimitiveValuePair(legacy.releaseNonNull(), positionKeyword.releaseNonNull(), Pair::IdenticalValueEncoding::Coalesce);
     3156        if (positionKeyword)
     3157            return createPrimitiveValuePair(legacy.releaseNonNull(), positionKeyword.releaseNonNull(), Pair::IdenticalValueEncoding::Coalesce);
     3158        return legacy;
    31493159    }
    31503160    return consumeSelfPositionOverflowPosition(range, isSelfPositionOrLeftOrRightKeyword);
     
    55695579}
    55705580
    5571 static RefPtr<CSSValue> consumeSimplifiedItemPosition(CSSParserTokenRange& range, IsPositionKeyword isPositionKeyword)
     5581static RefPtr<CSSValue> consumeSimplifiedDefaultPosition(CSSParserTokenRange& range, IsPositionKeyword isPositionKeyword)
    55725582{
    55735583    ASSERT(isPositionKeyword);
    55745584    CSSValueID id = range.peek().id();
    5575     if (isAutoOrNormalOrStretch(id) || isPositionKeyword(id))
     5585    if (isNormalOrStretch(id) || isPositionKeyword(id))
    55765586        return consumeIdent(range);
    55775587
     
    55825592}
    55835593
     5594static RefPtr<CSSValue> consumeSimplifiedSelfPosition(CSSParserTokenRange& range, IsPositionKeyword isPositionKeyword)
     5595{
     5596    ASSERT(isPositionKeyword);
     5597    if (isAuto(range.peek().id()))
     5598        return consumeIdent(range);
     5599    return consumeSimplifiedDefaultPosition(range, isPositionKeyword);
     5600}
     5601
    55845602bool CSSPropertyParser::consumePlaceItemsShorthand(bool important)
    55855603{
    55865604    ASSERT(shorthandForProperty(CSSPropertyPlaceItems).length() == 2);
    55875605
    5588     // align-items property does not allow the 'auto' value.
    5589     if (identMatches<CSSValueAuto>(m_range.peek().id()))
    5590         return false;
    5591 
    5592     RefPtr<CSSValue> alignItemsValue = consumeSimplifiedItemPosition(m_range, isSelfPositionKeyword);
     5606    RefPtr<CSSValue> alignItemsValue = consumeSimplifiedDefaultPosition(m_range, isSelfPositionKeyword);
    55935607    if (!alignItemsValue)
    55945608        return false;
    5595     RefPtr<CSSValue> justifyItemsValue = m_range.atEnd() ? alignItemsValue : consumeSimplifiedItemPosition(m_range, isSelfPositionOrLeftOrRightKeyword);
     5609    RefPtr<CSSValue> justifyItemsValue = m_range.atEnd() ? alignItemsValue : consumeSimplifiedDefaultPosition(m_range, isSelfPositionOrLeftOrRightKeyword);
    55965610    if (!justifyItemsValue)
    55975611        return false;
     
    56095623    ASSERT(shorthandForProperty(CSSPropertyPlaceSelf).length() == 2);
    56105624
    5611     RefPtr<CSSValue> alignSelfValue = consumeSimplifiedItemPosition(m_range, isSelfPositionKeyword);
     5625    RefPtr<CSSValue> alignSelfValue = consumeSimplifiedSelfPosition(m_range, isSelfPositionKeyword);
    56125626    if (!alignSelfValue)
    56135627        return false;
    5614     RefPtr<CSSValue> justifySelfValue = m_range.atEnd() ? alignSelfValue : consumeSimplifiedItemPosition(m_range, isSelfPositionOrLeftOrRightKeyword);
     5628    RefPtr<CSSValue> justifySelfValue = m_range.atEnd() ? alignSelfValue : consumeSimplifiedSelfPosition(m_range, isSelfPositionOrLeftOrRightKeyword);
    56155629    if (!justifySelfValue)
    56165630        return false;
  • trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp

    r224546 r228319  
    13371337{
    13381338    switch (position) {
     1339    case ItemPositionLegacy:
    13391340    case ItemPositionAuto:
    13401341    case ItemPositionNormal:
  • trunk/Source/WebCore/rendering/RenderGrid.cpp

    r228095 r228319  
    12971297        // FIXME: Implement the previous values. For now, we always 'start' align the child.
    12981298        return GridAxisStart;
     1299    case ItemPositionLegacy:
    12991300    case ItemPositionAuto:
    13001301    case ItemPositionNormal:
     
    13641365        // FIXME: Implement the previous values. For now, we always 'start' align the child.
    13651366        return GridAxisStart;
     1367    case ItemPositionLegacy:
    13661368    case ItemPositionAuto:
    13671369    case ItemPositionNormal:
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r226675 r228319  
    243243static StyleSelfAlignmentData resolvedSelfAlignment(const StyleSelfAlignmentData& value, ItemPosition normalValueBehavior)
    244244{
    245     if (value.position() == ItemPositionNormal || value.position() == ItemPositionAuto)
     245    if (value.position() == ItemPositionLegacy || value.position() == ItemPositionNormal || value.position() == ItemPositionAuto)
    246246        return { normalValueBehavior, OverflowAlignmentDefault };
    247247    return value;
     
    264264StyleSelfAlignmentData RenderStyle::resolvedJustifyItems(ItemPosition normalValueBehaviour) const
    265265{
    266     // FIXME: justify-items 'auto' value is allowed only to provide the 'legacy' keyword's behavior, which it's still not implemented for layout.
    267     // "If the inherited value of justify-items includes the legacy keyword, auto computes to the inherited value."
    268     // https://drafts.csswg.org/css-align/#justify-items-property
    269     if (justifyItems().position() == ItemPositionAuto)
    270         return { normalValueBehaviour, OverflowAlignmentDefault };
    271266    return resolvedSelfAlignment(justifyItems(), normalValueBehaviour);
    272267}
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r228095 r228319  
    14941494    static Length initialFlexBasis() { return Length(Auto); }
    14951495    static int initialOrder() { return 0; }
     1496    static StyleSelfAlignmentData initialJustifyItems() { return StyleSelfAlignmentData(ItemPositionLegacy, OverflowAlignmentDefault); }
    14961497    static StyleSelfAlignmentData initialSelfAlignment() { return StyleSelfAlignmentData(ItemPositionAuto, OverflowAlignmentDefault); }
    14971498    static StyleSelfAlignmentData initialDefaultAlignment() { return StyleSelfAlignmentData(isCSSGridLayoutEnabled() ? ItemPositionNormal : ItemPositionStretch, OverflowAlignmentDefault); }
  • trunk/Source/WebCore/rendering/style/RenderStyleConstants.h

    r226666 r228319  
    267267enum EFlexDirection { FlowRow, FlowRowReverse, FlowColumn, FlowColumnReverse };
    268268enum EFlexWrap { FlexNoWrap, FlexWrap, FlexWrapReverse };
    269 enum ItemPosition { ItemPositionAuto, ItemPositionNormal, ItemPositionStretch, ItemPositionBaseline, ItemPositionLastBaseline, ItemPositionCenter, ItemPositionStart, ItemPositionEnd, ItemPositionSelfStart, ItemPositionSelfEnd, ItemPositionFlexStart, ItemPositionFlexEnd, ItemPositionLeft, ItemPositionRight };
     269enum ItemPosition { ItemPositionLegacy, ItemPositionAuto, ItemPositionNormal, ItemPositionStretch, ItemPositionBaseline, ItemPositionLastBaseline, ItemPositionCenter, ItemPositionStart, ItemPositionEnd, ItemPositionSelfStart, ItemPositionSelfEnd, ItemPositionFlexStart, ItemPositionFlexEnd, ItemPositionLeft, ItemPositionRight };
    270270enum OverflowAlignment { OverflowAlignmentDefault, OverflowAlignmentUnsafe, OverflowAlignmentSafe };
    271271enum ItemPositionType { NonLegacyPosition, LegacyPosition };
  • trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp

    r228095 r228319  
    7575    , alignSelf(RenderStyle::initialSelfAlignment())
    7676    , justifyContent(RenderStyle::initialContentAlignment())
    77     , justifyItems(RenderStyle::initialSelfAlignment())
     77    , justifyItems(RenderStyle::initialJustifyItems())
    7878    , justifySelf(RenderStyle::initialSelfAlignment())
    7979#if ENABLE(TOUCH_EVENTS)
Note: See TracChangeset for help on using the changeset viewer.