Changeset 176218 in webkit


Ignore:
Timestamp:
Nov 17, 2014 11:52:42 AM (9 years ago)
Author:
jfernandez@igalia.com
Message:

[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.

Source/WebCore:

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.

LayoutTests:

From Blink r164817 and r165264 by <jchaffraix@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.
Location:
trunk
Files:
5 added
29 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r176213 r176218  
     12014-11-17  Javier Fernandez  <jfernandez@igalia.com>
     2
     3        [CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3
     4        https://bugs.webkit.org/show_bug.cgi?id=133359
     5
     6        Reviewed by David Hyatt.
     7
     8        From Blink r164817 and r165264 by <jchaffraix@chromium.org>
     9
     10        Broaden justify-self's parsing name and upgrade align-self and
     11        align-items parsing to CSS 3.
     12
     13        * css3/flexbox/css-properties-expected.txt:
     14        * css3/flexbox/css-properties.html:
     15        * css3/parse-align-items-expected.txt: Added.
     16        * css3/parse-align-items.html: Added.
     17        * css3/parse-align-self-expected.txt: Added.
     18        * css3/parse-align-self.html: Added.
     19        * css3/resources/alignment-parsing-utils.js: Added.
     20        (checkValues):
     21        (checkBadValues):
     22        (checkInitialValues):
     23        (checkInheritValues):
     24        (checkLegacyValues):
     25        * fast/css/getComputedStyle/computed-style-expected.txt:
     26        * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
     27        * fast/css/getComputedStyle/resources/property-names.js:
     28        * svg/css/getComputedStyle-basic-expected.txt:
     29        * platform/gtk/TestExpectations: Report new failures and update expectations.
     30
    1312014-11-17  Shivakumar JM  <shiva.jm@samsung.com>
    232
  • trunk/LayoutTests/TestExpectations

    r176144 r176218  
    6767# This test verifies dynamic manipulation of the mroot and msqrt elements.
    6868mathml/roots-removeChild.html [ ImageOnlyFailure ]
     69
     70webkit.org/b/133359 mathml/presentation/style-changed.html [ ImageOnlyFailure ]
     71webkit.org/b/136291 platform/mac/accessibility/webkit-alt-for-css-content.html [ Failure ]
     72webkit.org/b/136291 platform/mac/accessibility/alt-for-css-content.html [ Failure ]
    6973
    7074# This test verifies that a mismatch reftest will fail as intended if both results are same. (introduced in r93187)
  • trunk/LayoutTests/css3/flexbox/css-properties-expected.txt

    r132136 r176218  
    3030PASS window.getComputedStyle(flexbox, null).webkitJustifyContent is "flex-start"
    3131PASS flexbox.style.webkitAlignSelf is ""
    32 PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "stretch"
    33 PASS window.getComputedStyle(document.documentElement, null).webkitAlignSelf is "stretch"
     32PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "start"
     33PASS window.getComputedStyle(document.documentElement, null).webkitAlignSelf is "auto"
    3434PASS flexbox.style.webkitAlignSelf is ""
     35PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "start"
    3536PASS flexbox.style.webkitAlignSelf is "auto"
    36 PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "stretch"
     37PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "start"
    3738PASS flexbox.style.webkitAlignSelf is "flex-start"
    3839PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "flex-start"
     
    4647PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "baseline"
    4748PASS flexbox.style.webkitAlignSelf is ""
    48 PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "stretch"
    49 PASS flexbox.style.webkitAlignItems is ""
    50 PASS window.getComputedStyle(flexbox, null).webkitAlignItems is "stretch"
    51 PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "stretch"
    52 PASS flexbox.style.webkitAlignItems is ""
    53 PASS flexbox.style.webkitAlignItems is ""
     49PASS window.getComputedStyle(flexbox, null).webkitAlignSelf is "start"
     50PASS flexbox.style.webkitAlignItems is ""
     51PASS flexitem.style.webkitAlignSelf is ""
     52PASS window.getComputedStyle(flexbox, null).webkitAlignItems is "stretch"
     53PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "stretch"
     54PASS flexbox.style.webkitAlignItems is ""
     55PASS flexitem.style.webkitAlignSelf is ""
     56PASS window.getComputedStyle(flexbox, null).webkitAlignItems is "stretch"
     57PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "stretch"
     58PASS flexbox.style.webkitAlignItems is "auto"
     59PASS flexitem.style.webkitAlignSelf is ""
    5460PASS window.getComputedStyle(flexbox, null).webkitAlignItems is "stretch"
    5561PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "stretch"
    5662PASS flexbox.style.webkitAlignItems is "flex-start"
     63PASS flexitem.style.webkitAlignSelf is ""
    5764PASS window.getComputedStyle(flexbox, null).webkitAlignItems is "flex-start"
    5865PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "flex-start"
     
    7380PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "stretch"
    7481PASS flexbox.style.webkitAlignItems is ""
    75 PASS window.getComputedStyle(flexbox, null).webkitAlignItems is "stretch"
    76 PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "stretch"
     82PASS window.getComputedStyle(flexbox, null).webkitAlignItems is "start"
     83PASS window.getComputedStyle(flexitem, null).webkitAlignSelf is "start"
    7784PASS window.getComputedStyle(detachedFlexbox, null).webkitAlignSelf is ""
    7885PASS window.getComputedStyle(detachedFlexItem, null).webkitAlignSelf is ""
  • trunk/LayoutTests/css3/flexbox/css-properties.html

    r155275 r176218  
    7979shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitJustifyContent', 'flex-start');
    8080
     81flexbox.style.display = '-webkit-flex';
    8182
    8283shouldBeEqualToString('flexbox.style.webkitAlignSelf', '');
    83 // The initial value is 'stretch'.
    84 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', 'stretch');
    85 shouldBeEqualToString('window.getComputedStyle(document.documentElement, null).webkitAlignSelf', 'stretch');
     84// The initial value is 'auto', which will be resolved depending on parent's style (except for the 'document' element).
     85shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', 'start');
     86shouldBeEqualToString('window.getComputedStyle(document.documentElement, null).webkitAlignSelf', 'auto');
    8687
    8788flexbox.style.webkitAlignSelf = 'foo';
    8889shouldBeEqualToString('flexbox.style.webkitAlignSelf', '');
     90shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', 'start');
    8991
    9092flexbox.style.webkitAlignSelf = 'auto';
    9193shouldBeEqualToString('flexbox.style.webkitAlignSelf', 'auto');
    92 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', 'stretch');
     94shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', 'start');
    9395
    9496flexbox.style.webkitAlignSelf = 'flex-start';
     
    114116flexbox.style.webkitAlignSelf = '';
    115117shouldBeEqualToString('flexbox.style.webkitAlignSelf', '');
    116 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', 'stretch');
     118shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignSelf', 'start');
    117119
    118120shouldBeEqualToString('flexbox.style.webkitAlignItems', '');
    119 // The initial value is 'stretch'.
     121shouldBeEqualToString('flexitem.style.webkitAlignSelf', '');
     122// The initial value is 'auto', which will be resolved to 'stretch' in case of flexbox containers.
    120123shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', 'stretch');
    121124shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', 'stretch');
     
    123126flexbox.style.webkitAlignItems = 'foo';
    124127shouldBeEqualToString('flexbox.style.webkitAlignItems', '');
     128shouldBeEqualToString('flexitem.style.webkitAlignSelf', '');
     129shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', 'stretch');
     130shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', 'stretch');
    125131
    126132flexbox.style.webkitAlignItems = 'auto';
    127 shouldBeEqualToString('flexbox.style.webkitAlignItems', '');
     133shouldBeEqualToString('flexbox.style.webkitAlignItems', 'auto');
     134shouldBeEqualToString('flexitem.style.webkitAlignSelf', '');
    128135shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', 'stretch');
    129136shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', 'stretch');
     
    131138flexbox.style.webkitAlignItems = 'flex-start';
    132139shouldBeEqualToString('flexbox.style.webkitAlignItems', 'flex-start');
     140shouldBeEqualToString('flexitem.style.webkitAlignSelf', '');
    133141shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', 'flex-start');
    134142shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', 'flex-start');
     
    161169flexbox.style.display = 'none';
    162170shouldBeEqualToString('flexbox.style.webkitAlignItems', '');
    163 shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', 'stretch');
    164 shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', 'stretch');
     171shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitAlignItems', 'start');
     172shouldBeEqualToString('window.getComputedStyle(flexitem, null).webkitAlignSelf', 'start');
    165173flexbox.style.display = '';
    166174
  • trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt

    r175421 r176218  
    145145column-width: auto;
    146146align-content: stretch;
    147 align-items: stretch;
    148 align-self: stretch;
     147align-items: start;
     148align-self: start;
    149149flex-direction: row;
    150150flex-wrap: nowrap;
    151151justify-content: flex-start;
     152justify-self: auto;
    152153-webkit-font-kerning: auto;
    153154-webkit-font-smoothing: auto;
  • trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt

    r175421 r176218  
    144144column-width: auto
    145145align-content: stretch
    146 align-items: stretch
    147 align-self: stretch
     146align-items: start
     147align-self: start
    148148flex-direction: row
    149149flex-wrap: nowrap
    150150justify-content: flex-start
     151justify-self: auto
    151152-webkit-font-kerning: auto
    152153-webkit-font-smoothing: auto
  • trunk/LayoutTests/fast/css/getComputedStyle/resources/property-names.js

    r175421 r176218  
    6666    "-webkit-hyphens": true,
    6767    "justify-content": true,
     68    "justify-self": true,
    6869    "-webkit-line-align": true,
    6970    "-webkit-line-box-contain": true,
  • trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt

    r175421 r176218  
    287287rect: style.getPropertyValue(align-content) : stretch
    288288rect: style.getPropertyCSSValue(align-content) : [object CSSPrimitiveValue]
    289 rect: style.getPropertyValue(align-items) : stretch
    290 rect: style.getPropertyCSSValue(align-items) : [object CSSPrimitiveValue]
    291 rect: style.getPropertyValue(align-self) : stretch
    292 rect: style.getPropertyCSSValue(align-self) : [object CSSPrimitiveValue]
     289rect: style.getPropertyValue(align-items) : start
     290rect: style.getPropertyCSSValue(align-items) : [object CSSValueList]
     291rect: style.getPropertyValue(align-self) : start
     292rect: style.getPropertyCSSValue(align-self) : [object CSSValueList]
    293293rect: style.getPropertyValue(flex-direction) : row
    294294rect: style.getPropertyCSSValue(flex-direction) : [object CSSPrimitiveValue]
     
    297297rect: style.getPropertyValue(justify-content) : flex-start
    298298rect: style.getPropertyCSSValue(justify-content) : [object CSSPrimitiveValue]
     299rect: style.getPropertyValue(justify-self) : auto
     300rect: style.getPropertyCSSValue(justify-self) : [object CSSValueList]
    299301rect: style.getPropertyValue(-webkit-font-kerning) : auto
    300302rect: style.getPropertyCSSValue(-webkit-font-kerning) : [object CSSPrimitiveValue]
     
    799801g: style.getPropertyValue(align-content) : stretch
    800802g: style.getPropertyCSSValue(align-content) : [object CSSPrimitiveValue]
    801 g: style.getPropertyValue(align-items) : stretch
    802 g: style.getPropertyCSSValue(align-items) : [object CSSPrimitiveValue]
    803 g: style.getPropertyValue(align-self) : stretch
    804 g: style.getPropertyCSSValue(align-self) : [object CSSPrimitiveValue]
     803g: style.getPropertyValue(align-items) : start
     804g: style.getPropertyCSSValue(align-items) : [object CSSValueList]
     805g: style.getPropertyValue(align-self) : start
     806g: style.getPropertyCSSValue(align-self) : [object CSSValueList]
    805807g: style.getPropertyValue(flex-direction) : row
    806808g: style.getPropertyCSSValue(flex-direction) : [object CSSPrimitiveValue]
     
    809811g: style.getPropertyValue(justify-content) : flex-start
    810812g: style.getPropertyCSSValue(justify-content) : [object CSSPrimitiveValue]
     813g: style.getPropertyValue(justify-self) : auto
     814g: style.getPropertyCSSValue(justify-self) : [object CSSValueList]
    811815g: style.getPropertyValue(-webkit-font-kerning) : auto
    812816g: style.getPropertyCSSValue(-webkit-font-kerning) : [object CSSPrimitiveValue]
  • trunk/Source/WebCore/ChangeLog

    r176213 r176218  
     12014-11-17  Javier Fernandez  <jfernandez@igalia.com>
     2
     3        [CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3
     4        https://bugs.webkit.org/show_bug.cgi?id=133359
     5
     6        Reviewed by David Hyatt.
     7
     8        Broaden justify-self's parsing name as a preparation of migrating
     9        align-self, align-items and justify-items to the CSS 3 Alignment syntax.
     10
     11        The current naming was too tied to justify-self and needs to
     12        be broadened. This will reduce the follow-up implementations'
     13        patches.
     14
     15        Upgrade align-self and align-items parsing to CSS 3
     16
     17        This change migrates the 2 properties to the CSS 3 Alignment
     18        parsing. The new parsing is identical to how we parse
     19        'justify-self'. The 2 properties need to be migrated together
     20        as they are used in tandem in CSSComputedStyleDeclaration.
     21
     22        This change also removes EAlignItems as it is now unused.
     23
     24        Tests: css3/parse-align-items.html
     25               css3/parse-align-self.html
     26
     27        * css/CSSComputedStyleDeclaration.cpp:
     28        (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties.
     29        (WebCore::ComputedStyleExtractor::propertyValue):
     30        * css/CSSParser.cpp:
     31        (WebCore::isKeywordPropertyID): Removed align-items and align-self from the list.
     32        (WebCore::isValidKeywordPropertyAndValue): Removed align-items and align-self from the list.
     33        (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties.
     34        (WebCore::isBaselinePositionKeyword): Utility function added to identify Baseline keyword values.
     35        (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties.
     36        (WebCore::CSSParser::parseJustifySelf): Deleted.
     37        * css/CSSParser.h:
     38        * css/CSSPrimitiveValueMappings.h:
     39        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Refactoring some mapping functions.
     40       (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration.
     41        (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added.
     42        (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted.
     43        (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted.
     44        (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted.
     45        * css/CSSPropertyNames.in:
     46        * css/CSSValueKeywords.in:
     47        * css/StyleResolver.cpp:
     48        (WebCore::StyleResolver::adjustRenderStyle): Added a new adjustment to resolve the "auto" vale on the alignment properties.
     49        (WebCore::StyleResolver::adjustStyleForAlignment): Added. Function to resolve the "auto" vale on the alignment properties.
     50        (WebCore::StyleResolver::applyProperty):
     51        (WebCore::isDisplayFlexibleBox): Deleted. Moved to the RenderStyle.
     52        (WebCore::isDisplayGridBox): Deleted. Moved to the RenderStyle.
     53        (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to the RenderStyle.
     54        * css/StyleResolver.h:
     55        * rendering/RenderBox.cpp:
     56        (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPosition enum.
     57        * rendering/RenderFlexibleBox.cpp:
     58        (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPosition enum.
     59        (WebCore::resolveAlignment): Consider also that align-items could be "auto", since it's the default now.
     60        (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPosition enum.
     61        (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPosition enum.
     62        (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPosition enum.
     63        (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPosition enum.
     64        (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPosition enum.
     65        * rendering/RenderFlexibleBox.h:
     66        * rendering/RenderFullScreen.cpp:
     67        (WebCore::createFullScreenStyle): Adapted to the new ItemPosition enum.
     68        * rendering/RenderMenuList.cpp:
     69        (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPosition enum.
     70        * rendering/mathml/RenderMathMLRoot.cpp:
     71        (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPosition enum.
     72        * rendering/mathml/RenderMathMLScripts.cpp:
     73        (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPosition enum.
     74        (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPosition enum.
     75        * rendering/style/RenderStyle.h: Adapted to the new ItemPosition enum.
     76        * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPosition enum.
     77        * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPosition enum.
     78        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPosition enum.
     79        (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPosition enum.
     80        * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPosition enum.
     81        * style/StyleResolveTree.cpp:
     82        (WebCore::Style::determineChange): Changes in the alignItems property will cause a Detach.
     83
    1842014-11-17  Shivakumar JM  <shiva.jm@samsung.com>
    285
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r176212 r176218  
    297297    CSSPropertyFlexWrap,
    298298    CSSPropertyJustifyContent,
    299     CSSPropertyWebkitJustifySelf,
     299    CSSPropertyJustifySelf,
    300300    CSSPropertyWebkitFilter,
    301301#if ENABLE(FILTERS_LEVEL_2)
     
    17131713}
    17141714#endif
     1715
     1716static PassRefPtr<CSSValueList> valueForItemPositionWithOverflowAlignment(ItemPosition itemPosition, OverflowAlignment overflowAlignment)
     1717{
     1718    RefPtr<CSSValueList> result = CSSValueList::createSpaceSeparated();
     1719    result->append(cssValuePool().createValue(itemPosition));
     1720    if (itemPosition >= ItemPositionCenter && overflowAlignment != OverflowAlignmentDefault)
     1721        result->append(cssValuePool().createValue(overflowAlignment));
     1722    return result.release();
     1723}
    17151724
    17161725PassRefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propertyID, EUpdateLayout updateLayout) const
     
    20572066            return cssValuePool().createValue(style->alignContent());
    20582067        case CSSPropertyAlignItems:
    2059             return cssValuePool().createValue(style->alignItems());
    2060         case CSSPropertyAlignSelf:
    2061             if (style->alignSelf() == AlignAuto) {
     2068            return valueForItemPositionWithOverflowAlignment(style->alignItems(), style->alignItemsOverflowAlignment());
     2069        case CSSPropertyAlignSelf: {
     2070            ItemPosition alignSelf = style->alignSelf();
     2071            OverflowAlignment overflow = style->alignSelfOverflowAlignment();
     2072            if (alignSelf == ItemPositionAuto) {
    20622073                Node* parent = styledNode->parentNode();
    2063                 if (parent && parent->computedStyle())
    2064                     return cssValuePool().createValue(parent->computedStyle()->alignItems());
    2065                 return cssValuePool().createValue(AlignStretch);
     2074                if (parent && parent->computedStyle()) {
     2075                    alignSelf = parent->computedStyle()->alignItems();
     2076                    overflow = parent->computedStyle()->alignItemsOverflowAlignment();
     2077                }
    20662078            }
    2067             return cssValuePool().createValue(style->alignSelf());
     2079            return valueForItemPositionWithOverflowAlignment(alignSelf, overflow);
     2080        }
    20682081        case CSSPropertyFlex:
    20692082            return getCSSPropertyValuesForShorthandProperties(flexShorthand());
     
    20822095        case CSSPropertyJustifyContent:
    20832096            return cssValuePool().createValue(style->justifyContent());
    2084         case CSSPropertyWebkitJustifySelf: {
    2085             RefPtr<CSSValueList> result = CSSValueList::createSpaceSeparated();
    2086             result->append(CSSPrimitiveValue::create(style->justifySelf()));
    2087             if (style->justifySelf() >= JustifySelfCenter && style->justifySelfOverflowAlignment() != JustifySelfOverflowAlignmentDefault)
    2088                 result->append(CSSPrimitiveValue::create(style->justifySelfOverflowAlignment()));
    2089             return result.release();
    2090         }
     2097        case CSSPropertyJustifySelf:
     2098            return valueForItemPositionWithOverflowAlignment(style->justifySelf(), style->justifySelfOverflowAlignment());
    20912099        case CSSPropertyOrder:
    20922100            return cssValuePool().createValue(style->order(), CSSPrimitiveValue::CSS_NUMBER);
  • trunk/Source/WebCore/css/CSSParser.cpp

    r176171 r176218  
    866866            return true;
    867867        break;
     868#if !ENABLE(CSS_GRID_LAYOUT)
    868869    case CSSPropertyAlignItems:
    869870        // FIXME: Per CSS alignment, this property should accept the same arguments as 'justify-self' so we should share its parsing code.
     
    876877            return true;
    877878        break;
     879#endif
    878880    case CSSPropertyFlexDirection:
    879881        if (valueID == CSSValueRow || valueID == CSSValueRowReverse || valueID == CSSValueColumn || valueID == CSSValueColumnReverse)
     
    889891            return true;
    890892        break;
    891     case CSSPropertyWebkitJustifySelf:
     893#if !ENABLE(CSS_GRID_LAYOUT)
     894    case CSSPropertyJustifySelf:
    892895        if (valueID == CSSValueAuto || valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || valueID == CSSValueCenter || valueID == CSSValueBaseline || valueID == CSSValueStretch)
    893896            return true;
    894897        break;
     898#endif
    895899    case CSSPropertyWebkitFontKerning:
    896900        if (valueID == CSSValueAuto || valueID == CSSValueNormal || valueID == CSSValueNone)
     
    11071111    case CSSPropertyColumnRuleStyle:
    11081112    case CSSPropertyAlignContent:
     1113#if !ENABLE(CSS_GRID_LAYOUT)
    11091114    case CSSPropertyAlignItems:
    11101115    case CSSPropertyAlignSelf:
     1116#endif
    11111117    case CSSPropertyFlexDirection:
    11121118    case CSSPropertyFlexWrap:
     
    26312637        return false;
    26322638    }
    2633     case CSSPropertyWebkitJustifySelf:
    2634         return parseJustifySelf(propId, important);
    26352639#if ENABLE(CSS_GRID_LAYOUT)
     2640    case CSSPropertyJustifySelf:
     2641        return parseItemPositionOverflowPosition(propId, important);
    26362642    case CSSPropertyWebkitGridAutoColumns:
    26372643    case CSSPropertyWebkitGridAutoRows:
     
    29672973        parsedValue = parseImageResolution();
    29682974        break;
     2975#endif
     2976#if ENABLE(CSS_GRID_LAYOUT)
     2977    case CSSPropertyAlignSelf:
     2978        return parseItemPositionOverflowPosition(propId, important);
     2979
     2980    case CSSPropertyAlignItems:
     2981        return parseItemPositionOverflowPosition(propId, important);
    29692982#endif
    29702983    case CSSPropertyBorderBottomStyle:
     
    30293042    case CSSPropertyColumnRuleStyle:
    30303043    case CSSPropertyAlignContent:
     3044#if !ENABLE(CSS_GRID_LAYOUT)
    30313045    case CSSPropertyAlignItems:
    30323046    case CSSPropertyAlignSelf:
     3047    case CSSPropertyJustifySelf:
     3048#endif
    30333049    case CSSPropertyFlexDirection:
    30343050    case CSSPropertyFlexWrap:
     
    31413157}
    31423158
     3159static inline bool isBaselinePositionKeyword(CSSValueID id)
     3160{
     3161    return id == CSSValueBaseline || id == CSSValueLastBaseline;
     3162}
     3163
    31433164static bool isItemPositionKeyword(CSSValueID id)
    31443165{
     
    31483169}
    31493170
    3150 bool CSSParser::parseJustifySelf(CSSPropertyID propId, bool important)
     3171bool CSSParser::parseItemPositionOverflowPosition(CSSPropertyID propId, bool important)
    31513172{
    31523173    // auto | baseline | stretch | [<item-position> && <overflow-position>? ]
     
    31563177    CSSParserValue* value = m_valueList->current();
    31573178
    3158     if (value->id == CSSValueAuto || value->id == CSSValueBaseline || value->id == CSSValueStretch) {
     3179    if (value->id == CSSValueAuto || value->id == CSSValueStretch || isBaselinePositionKeyword(value->id)) {
    31593180        if (m_valueList->next())
    31603181            return false;
  • trunk/Source/WebCore/css/CSSParser.h

    r176050 r176218  
    178178    bool parseClipShape(CSSPropertyID, bool important);
    179179
    180     bool parseJustifySelf(CSSPropertyID, bool important);
     180    bool parseItemPositionOverflowPosition(CSSPropertyID, bool important);
    181181
    182182#if ENABLE(CSS_SHAPES)
  • trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h

    r176165 r176218  
    14271427    ASSERT_NOT_REACHED();
    14281428    return SHOW;
    1429 }
    1430 
    1431 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EAlignItems e)
    1432     : CSSValue(PrimitiveClass)
    1433 {
    1434     m_primitiveUnitType = CSS_VALUE_ID;
    1435     switch (e) {
    1436     case AlignAuto:
    1437         m_value.valueID = CSSValueAuto;
    1438         break;
    1439     case AlignFlexStart:
    1440         m_value.valueID = CSSValueFlexStart;
    1441         break;
    1442     case AlignFlexEnd:
    1443         m_value.valueID = CSSValueFlexEnd;
    1444         break;
    1445     case AlignCenter:
    1446         m_value.valueID = CSSValueCenter;
    1447         break;
    1448     case AlignStretch:
    1449         m_value.valueID = CSSValueStretch;
    1450         break;
    1451     case AlignBaseline:
    1452         m_value.valueID = CSSValueBaseline;
    1453         break;
    1454     }
    1455 }
    1456 
    1457 template<> inline CSSPrimitiveValue::operator EAlignItems() const
    1458 {
    1459     ASSERT(isValueID());
    1460 
    1461     switch (m_value.valueID) {
    1462     case CSSValueAuto:
    1463         return AlignAuto;
    1464     case CSSValueFlexStart:
    1465         return AlignFlexStart;
    1466     case CSSValueFlexEnd:
    1467         return AlignFlexEnd;
    1468     case CSSValueCenter:
    1469         return AlignCenter;
    1470     case CSSValueStretch:
    1471         return AlignStretch;
    1472     case CSSValueBaseline:
    1473         return AlignBaseline;
    1474     default:
    1475         break;
    1476     }
    1477 
    1478     ASSERT_NOT_REACHED();
    1479     return AlignFlexStart;
    14801429}
    14811430
     
    50835032}
    50845033
    5085 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EJustifySelf justifySelf)
    5086     : CSSValue(PrimitiveClass)
    5087 {
    5088     m_primitiveUnitType = CSS_VALUE_ID;
    5089     switch (justifySelf) {
    5090     case JustifySelfAuto:
     5034template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ItemPosition itemPosition)
     5035    : CSSValue(PrimitiveClass)
     5036{
     5037    m_primitiveUnitType = CSS_VALUE_ID;
     5038    switch (itemPosition) {
     5039    case ItemPositionAuto:
    50915040        m_value.valueID = CSSValueAuto;
    50925041        break;
    5093     case JustifySelfStretch:
     5042    case ItemPositionStretch:
    50945043        m_value.valueID = CSSValueStretch;
    50955044        break;
    5096     case JustifySelfBaseline:
     5045    case ItemPositionBaseline:
    50975046        m_value.valueID = CSSValueBaseline;
    50985047        break;
    5099     case JustifySelfCenter:
     5048    case ItemPositionLastBaseline:
     5049        m_value.valueID = CSSValueLastBaseline;
     5050        break;
     5051    case ItemPositionCenter:
    51005052        m_value.valueID = CSSValueCenter;
    51015053        break;
    5102     case JustifySelfStart:
     5054    case ItemPositionStart:
    51035055        m_value.valueID = CSSValueStart;
    51045056        break;
    5105     case JustifySelfEnd:
     5057    case ItemPositionEnd:
    51065058        m_value.valueID = CSSValueEnd;
    51075059        break;
    5108     case JustifySelfSelfStart:
     5060    case ItemPositionSelfStart:
    51095061        m_value.valueID = CSSValueSelfStart;
    51105062        break;
    5111     case JustifySelfSelfEnd:
     5063    case ItemPositionSelfEnd:
    51125064        m_value.valueID = CSSValueSelfEnd;
    51135065        break;
    5114     case JustifySelfFlexStart:
     5066    case ItemPositionFlexStart:
    51155067        m_value.valueID = CSSValueFlexStart;
    51165068        break;
    5117     case JustifySelfFlexEnd:
     5069    case ItemPositionFlexEnd:
    51185070        m_value.valueID = CSSValueFlexEnd;
    51195071        break;
    5120     case JustifySelfLeft:
     5072    case ItemPositionLeft:
    51215073        m_value.valueID = CSSValueLeft;
    51225074        break;
    5123     case JustifySelfRight:
     5075    case ItemPositionRight:
    51245076        m_value.valueID = CSSValueRight;
    51255077        break;
    5126     default:
    5127         m_value.valueID = CSSValueAuto;
    5128         break;
    5129     }
    5130 }
    5131 
    5132 template<> inline CSSPrimitiveValue::operator EJustifySelf() const
     5078    }
     5079}
     5080
     5081template<> inline CSSPrimitiveValue::operator ItemPosition() const
    51335082{
    51345083    switch (m_value.valueID) {
    51355084    case CSSValueAuto:
    5136         return JustifySelfAuto;
     5085        return ItemPositionAuto;
    51375086    case CSSValueStretch:
    5138         return JustifySelfStretch;
     5087        return ItemPositionStretch;
    51395088    case CSSValueBaseline:
    5140         return JustifySelfBaseline;
     5089        return ItemPositionBaseline;
     5090    case CSSValueLastBaseline:
     5091        return ItemPositionLastBaseline;
    51415092    case CSSValueCenter:
    5142         return JustifySelfCenter;
     5093        return ItemPositionCenter;
    51435094    case CSSValueStart:
    5144         return JustifySelfStart;
     5095        return ItemPositionStart;
    51455096    case CSSValueEnd:
    5146         return JustifySelfEnd;
     5097        return ItemPositionEnd;
    51475098    case CSSValueSelfStart:
    5148         return JustifySelfSelfStart;
     5099        return ItemPositionSelfStart;
    51495100    case CSSValueSelfEnd:
    5150         return JustifySelfSelfEnd;
     5101        return ItemPositionSelfEnd;
    51515102    case CSSValueFlexStart:
    5152         return JustifySelfFlexStart;
     5103        return ItemPositionFlexStart;
    51535104    case CSSValueFlexEnd:
    5154         return JustifySelfFlexEnd;
     5105        return ItemPositionFlexEnd;
    51555106    case CSSValueLeft:
    5156         return JustifySelfLeft;
     5107        return ItemPositionLeft;
    51575108    case CSSValueRight:
    5158         return JustifySelfRight;
    5159     default:
    5160         break;
    5161     }
    5162     ASSERT_NOT_REACHED();
    5163     return JustifySelfAuto;
    5164 }
    5165 
    5166 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EJustifySelfOverflowAlignment overflowAlignment)
     5109        return ItemPositionRight;
     5110    default:
     5111        break;
     5112    }
     5113    ASSERT_NOT_REACHED();
     5114    return ItemPositionAuto;
     5115}
     5116
     5117template<> inline CSSPrimitiveValue::CSSPrimitiveValue(OverflowAlignment overflowAlignment)
    51675118    : CSSValue(PrimitiveClass)
    51685119{
    51695120    m_primitiveUnitType = CSS_VALUE_ID;
    51705121    switch (overflowAlignment) {
    5171     case JustifySelfOverflowAlignmentDefault:
     5122    case OverflowAlignmentDefault:
    51725123        m_value.valueID = CSSValueDefault;
    51735124        break;
    5174     case JustifySelfOverflowAlignmentTrue:
     5125    case OverflowAlignmentTrue:
    51755126        m_value.valueID = CSSValueTrue;
    51765127        break;
    5177     case JustifySelfOverflowAlignmentSafe:
     5128    case OverflowAlignmentSafe:
    51785129        m_value.valueID = CSSValueSafe;
    51795130        break;
     
    51815132}
    51825133
    5183 template<> inline CSSPrimitiveValue::operator EJustifySelfOverflowAlignment() const
     5134template<> inline CSSPrimitiveValue::operator OverflowAlignment() const
    51845135{
    51855136    switch (m_value.valueID) {
    51865137    case CSSValueTrue:
    5187         return JustifySelfOverflowAlignmentTrue;
     5138        return OverflowAlignmentTrue;
    51885139    case CSSValueSafe:
    5189         return JustifySelfOverflowAlignmentSafe;
    5190     default:
    5191         break;
    5192     }
    5193     ASSERT_NOT_REACHED();
    5194     return JustifySelfOverflowAlignmentTrue;
     5140        return OverflowAlignmentSafe;
     5141    default:
     5142        break;
     5143    }
     5144    ASSERT_NOT_REACHED();
     5145    return OverflowAlignmentTrue;
    51955146}
    51965147
  • trunk/Source/WebCore/css/CSSPropertyNames.in

    r176202 r176218  
    365365align-content [NewStyleBuilder]
    366366-webkit-align-content = align-content
    367 align-items [NewStyleBuilder]
     367align-items
    368368-webkit-align-items = align-items
    369 align-self [NewStyleBuilder, TypeName=EAlignItems]
     369align-self
    370370-webkit-align-self = align-self
    371371flex
     
    388388-webkit-backdrop-filter
    389389#endif
    390 -webkit-justify-self
     390justify-self
     391-webkit-justify-self = justify-self
    391392-webkit-font-size-delta
    392393#if defined(ENABLE_CSS_GRID_LAYOUT) && ENABLE_CSS_GRID_LAYOUT
  • trunk/Source/WebCore/css/CSSValueKeywords.in

    r174901 r176218  
    541541// center
    542542// baseline
     543last-baseline
    543544// stretch
    544545
     
    554555// stretch
    555556// baseline
     557// last-baseline
    556558// center
    557559// start
  • trunk/Source/WebCore/css/StyleResolver.cpp

    r176174 r176218  
    11141114}
    11151115
    1116 static bool isDisplayFlexibleBox(EDisplay display)
    1117 {
    1118     return display == FLEX || display == INLINE_FLEX;
    1119 }
    1120 
    1121 static inline bool isDisplayGridBox(EDisplay display)
    1122 {
    1123 #if ENABLE(CSS_GRID_LAYOUT)
    1124     return display == GRID || display == INLINE_GRID;
    1125 #else
    1126     UNUSED_PARAM(display);
    1127     return false;
    1128 #endif
    1129 }
    1130 
    1131 static bool isDisplayFlexibleOrGridBox(EDisplay display)
    1132 {
    1133     return isDisplayFlexibleBox(display) || isDisplayGridBox(display);
    1134 }
    1135 
    11361116#if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
    11371117static bool isScrollableOverflow(EOverflow overflow)
     
    12361216            style.setWritingMode(TopToBottomWritingMode);
    12371217
    1238         if (isDisplayFlexibleOrGridBox(parentStyle.display())) {
     1218        if (parentStyle.isDisplayFlexibleOrGridBox()) {
    12391219            style.setFloating(NoFloat);
    12401220            style.setDisplay(equivalentBlockDisplay(style.display(), style.isFloating(), !document().inQuirksMode()));
     
    12431223
    12441224    // Make sure our z-index value is only applied if the object is positioned.
    1245     if (style.position() == StaticPosition && !isDisplayFlexibleOrGridBox(parentStyle.display()))
     1225    if (style.position() == StaticPosition && !parentStyle.isDisplayFlexibleOrGridBox())
    12461226        style.setHasAutoZIndex();
    12471227
     
    13711351        if ((e->hasTagName(SVGNames::foreignObjectTag) || e->hasTagName(SVGNames::textTag)) && style.isDisplayInlineType())
    13721352            style.setDisplay(BLOCK);
     1353    }
     1354
     1355    // CSS Box Alignment specification requires to resolve "auto" (inital/default) values.
     1356    adjustStyleForAlignment(style);
     1357}
     1358
     1359void StyleResolver::adjustStyleForAlignment(RenderStyle& style)
     1360{
     1361    // The 'auto' keyword computes to:
     1362    //  - 'stretch' for flex containers and grid containers,
     1363    //  - 'start' for everything else. (to be resolved later, during the layout)
     1364    if (style.alignItems() == ItemPositionAuto) {
     1365        if (style.isDisplayFlexibleOrGridBox())
     1366            style.setAlignItems(ItemPositionStretch);
     1367        else
     1368            style.setAlignItems(ItemPositionStart);
     1369    }
     1370
     1371    // The 'auto' keyword computes to 'stretch' on absolutely-positioned elements,
     1372    // and to the computed value of align-items on the parent (minus
     1373    // any 'legacy' keywords) on all other boxes (to be resolved during the layout).
     1374    if (style.alignSelf() == ItemPositionAuto) {
     1375        if ((style.position() == AbsolutePosition))
     1376            style.setAlignSelf(ItemPositionStretch);
    13731377    }
    13741378}
     
    29012905    }
    29022906#endif /* ENABLE(CSS_GRID_LAYOUT) */
    2903 
    2904     case CSSPropertyWebkitJustifySelf:
    2905         HANDLE_INHERIT_AND_INITIAL(justifySelf, JustifySelf);
     2907    case CSSPropertyAlignSelf: {
     2908        if (isInherit) {
     2909            state.style()->setAlignSelf(state.parentStyle()->alignSelf());
     2910            state.style()->setAlignSelfOverflowAlignment(state.parentStyle()->alignSelfOverflowAlignment());
     2911            return;
     2912        }
     2913        if (isInitial) {
     2914            state.style()->setAlignSelf(RenderStyle::initialAlignSelf());
     2915            state.style()->setAlignSelfOverflowAlignment(RenderStyle::initialAlignSelfOverflowAlignment());
     2916            return;
     2917        }
     2918        if (Pair* pairValue = primitiveValue->getPairValue()) {
     2919            state.style()->setAlignSelf(*pairValue->first());
     2920            state.style()->setAlignSelfOverflowAlignment(*pairValue->second());
     2921        } else
     2922            state.style()->setAlignSelf(*primitiveValue);
     2923        return;
     2924    }
     2925
     2926    case CSSPropertyAlignItems: {
     2927        if (isInherit) {
     2928            state.style()->setAlignItems(state.parentStyle()->alignItems());
     2929            state.style()->setAlignItemsOverflowAlignment(state.parentStyle()->alignItemsOverflowAlignment());
     2930            return;
     2931        }
     2932        if (isInitial) {
     2933            state.style()->setAlignItems(RenderStyle::initialAlignItems());
     2934            state.style()->setAlignItemsOverflowAlignment(RenderStyle::initialAlignItemsOverflowAlignment());
     2935            return;
     2936        }
     2937        if (Pair* pairValue = primitiveValue->getPairValue()) {
     2938            state.style()->setAlignItems(*pairValue->first());
     2939            state.style()->setAlignItemsOverflowAlignment(*pairValue->second());
     2940        } else
     2941            state.style()->setAlignItems(*primitiveValue);
     2942        return;
     2943    }
     2944    case CSSPropertyJustifySelf: {
     2945        if (isInherit) {
     2946            state.style()->setJustifySelf(state.parentStyle()->justifySelf());
     2947            state.style()->setJustifySelfOverflowAlignment(state.parentStyle()->justifySelfOverflowAlignment());
     2948            return;
     2949        }
     2950        if (isInitial) {
     2951            state.style()->setJustifySelf(RenderStyle::initialJustifySelf());
     2952            state.style()->setJustifySelfOverflowAlignment(RenderStyle::initialJustifySelfOverflowAlignment());
     2953            return;
     2954        }
    29062955        if (Pair* pairValue = primitiveValue->getPairValue()) {
    29072956            state.style()->setJustifySelf(*pairValue->first());
     
    29102959            state.style()->setJustifySelf(*primitiveValue);
    29112960        return;
    2912 
     2961    }
    29132962#if ENABLE(CSS_SCROLL_SNAP)
    29142963    case CSSPropertyWebkitScrollSnapType:
     
    31293178#endif
    31303179    case CSSPropertyAlignContent:
    3131     case CSSPropertyAlignItems:
    3132     case CSSPropertyAlignSelf:
    31333180    case CSSPropertyFlexBasis:
    31343181    case CSSPropertyFlexDirection:
  • trunk/Source/WebCore/css/StyleResolver.h

    r175772 r176218  
    297297
    298298    void adjustRenderStyle(RenderStyle& styleToAdjust, const RenderStyle& parentStyle, Element*);
     299    void adjustStyleForAlignment(RenderStyle& styleToAdjust);
    299300#if ENABLE(CSS_GRID_LAYOUT)
    300301    std::unique_ptr<GridPosition> adjustNamedGridItemPosition(const NamedGridAreaMap&, const NamedGridLinesMap&, const GridPosition&, GridPositionSide) const;
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r175583 r176218  
    24192419{
    24202420    auto parent = flexitem.parent();
    2421     return flexitem.style().alignSelf() == AlignStretch || (flexitem.style().alignSelf() == AlignAuto && parent->style().alignItems() == AlignStretch);
     2421    return flexitem.style().alignSelf() == ItemPositionStretch || (flexitem.style().alignSelf() == ItemPositionAuto && parent->style().alignItems() == ItemPositionStretch);
    24222422}
    24232423
  • trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp

    r172970 r176218  
    3333
    3434#include "LayoutRepainter.h"
     35#include "NotImplemented.h"
    3536#include "RenderLayer.h"
    3637#include "RenderView.h"
     
    187188        if (child->isOutOfFlowPositioned())
    188189            continue;
    189         if (alignmentForChild(*child) == AlignBaseline && !hasAutoMarginsInCrossAxis(*child)) {
     190        if (alignmentForChild(*child) == ItemPositionBaseline && !hasAutoMarginsInCrossAxis(*child)) {
    190191            baselineChild = child;
    191192            break;
     
    228229}
    229230
    230 static EAlignItems resolveAlignment(const RenderStyle* parentStyle, const RenderStyle* childStyle)
    231 {
    232     EAlignItems align = childStyle->alignSelf();
    233     if (align == AlignAuto)
    234         align = parentStyle->alignItems();
     231static ItemPosition resolveAlignment(const RenderStyle* parentStyle, const RenderStyle* childStyle)
     232{
     233    ItemPosition align = childStyle->alignSelf();
     234    if (align == ItemPositionAuto)
     235        align = (parentStyle->alignItems() == ItemPositionAuto) ? ItemPositionStretch : parentStyle->alignItems();
    235236    return align;
    236237}
     
    240241    RenderBlock::styleDidChange(diff, oldStyle);
    241242
    242     if (oldStyle && oldStyle->alignItems() == AlignStretch && diff == StyleDifferenceLayout) {
     243    if (oldStyle && oldStyle->alignItems() == ItemPositionStretch && diff == StyleDifferenceLayout) {
    243244        // Flex items that were previously stretching need to be relayed out so we can compute new available cross axis space.
    244245        // This is only necessary for stretching since other alignment values don't change the size of the box.
    245246        for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
    246             EAlignItems previousAlignment = resolveAlignment(oldStyle, &child->style());
    247             if (previousAlignment == AlignStretch && previousAlignment != resolveAlignment(&style(), &child->style()))
     247            ItemPosition previousAlignment = resolveAlignment(oldStyle, &child->style());
     248            if (previousAlignment == ItemPositionStretch && previousAlignment != resolveAlignment(&style(), &child->style()))
    248249                child->setChildNeedsLayout(MarkOnlyThis);
    249250        }
     
    10241025}
    10251026
    1026 EAlignItems RenderFlexibleBox::alignmentForChild(RenderBox& child) const
    1027 {
    1028     EAlignItems align = resolveAlignment(&style(), &child.style());
    1029 
    1030     if (align == AlignBaseline && hasOrthogonalFlow(child))
    1031         align = AlignFlexStart;
     1027ItemPosition RenderFlexibleBox::alignmentForChild(RenderBox& child) const
     1028{
     1029    ItemPosition align = resolveAlignment(&style(), &child.style());
     1030
     1031    if (align == ItemPositionBaseline && hasOrthogonalFlow(child))
     1032        align = ItemPositionFlexStart;
    10321033
    10331034    if (style().flexWrap() == FlexWrapReverse) {
    1034         if (align == AlignFlexStart)
    1035             align = AlignFlexEnd;
    1036         else if (align == AlignFlexEnd)
    1037             align = AlignFlexStart;
     1035        if (align == ItemPositionFlexStart)
     1036            align = ItemPositionFlexEnd;
     1037        else if (align == ItemPositionFlexEnd)
     1038            align = ItemPositionFlexStart;
    10381039    }
    10391040
     
    10541055bool RenderFlexibleBox::needToStretchChild(RenderBox& child)
    10551056{
    1056     if (alignmentForChild(child) != AlignStretch)
     1057    if (alignmentForChild(child) != ItemPositionStretch)
    10571058        return false;
    10581059
     
    11051106
    11061107        LayoutUnit childCrossAxisMarginBoxExtent;
    1107         if (alignmentForChild(child) == AlignBaseline && !hasAutoMarginsInCrossAxis(child)) {
     1108        if (alignmentForChild(child) == ItemPositionBaseline && !hasAutoMarginsInCrossAxis(child)) {
    11081109            LayoutUnit ascent = marginBoxAscentForChild(child);
    11091110            LayoutUnit descent = (crossAxisMarginExtentForChild(child) + crossAxisExtentForChild(child)) - ascent;
     
    12661267
    12671268            switch (alignmentForChild(*child)) {
    1268             case AlignAuto:
     1269            case ItemPositionAuto:
    12691270                ASSERT_NOT_REACHED();
    12701271                break;
    1271             case AlignStretch: {
     1272            case ItemPositionStart:
     1273                // FIXME: https://webkit.org/b/135460 - The extended grammar is not supported
     1274                // yet for FlexibleBox.
     1275                // Defaulting to Stretch for now, as it what most of FlexBox based renders
     1276                // expect as default.
     1277                notImplemented();
     1278                FALLTHROUGH;
     1279            case ItemPositionStretch: {
    12721280                applyStretchAlignmentToChild(*child, lineCrossAxisExtent);
    12731281                // Since wrap-reverse flips cross start and cross end, strech children should be aligned with the cross end.
     
    12761284                break;
    12771285            }
    1278             case AlignFlexStart:
     1286            case ItemPositionFlexStart:
    12791287                break;
    1280             case AlignFlexEnd:
     1288            case ItemPositionFlexEnd:
    12811289                adjustAlignmentForChild(*child, availableAlignmentSpaceForChild(lineCrossAxisExtent, *child));
    12821290                break;
    1283             case AlignCenter:
     1291            case ItemPositionCenter:
    12841292                adjustAlignmentForChild(*child, availableAlignmentSpaceForChild(lineCrossAxisExtent, *child) / 2);
    12851293                break;
    1286             case AlignBaseline: {
     1294            case ItemPositionBaseline: {
    12871295                // 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.
    12881296                // https://bugs.webkit.org/show_bug.cgi?id=98076
     
    12951303                break;
    12961304            }
     1305            case ItemPositionLastBaseline:
     1306            case ItemPositionSelfStart:
     1307            case ItemPositionSelfEnd:
     1308            case ItemPositionEnd:
     1309            case ItemPositionLeft:
     1310            case ItemPositionRight:
     1311                // FIXME: https://webkit.org/b/135460 - The extended grammar is not supported
     1312                // yet for FlexibleBox.
     1313                notImplemented();
     1314                FALLTHROUGH;
     1315            default:
     1316                ASSERT_NOT_REACHED();
     1317                break;
    12971318            }
    12981319        }
     
    13101331        for (size_t childNumber = 0; childNumber < lineContexts[lineNumber].numberOfChildren; ++childNumber, child = m_orderIterator.next()) {
    13111332            ASSERT(child);
    1312             if (alignmentForChild(*child) == AlignBaseline && !hasAutoMarginsInCrossAxis(*child) && minMarginAfterBaseline)
     1333            if (alignmentForChild(*child) == ItemPositionBaseline && !hasAutoMarginsInCrossAxis(*child) && minMarginAfterBaseline)
    13131334                adjustAlignmentForChild(*child, minMarginAfterBaseline);
    13141335        }
  • trunk/Source/WebCore/rendering/RenderFlexibleBox.h

    r175084 r176218  
    119119    void setFlowAwareLocationForChild(RenderBox& child, const LayoutPoint&);
    120120    void adjustAlignmentForChild(RenderBox& child, LayoutUnit);
    121     EAlignItems alignmentForChild(RenderBox& child) const;
     121    ItemPosition alignmentForChild(RenderBox& child) const;
    122122    LayoutUnit mainAxisBorderAndPaddingExtentForChild(RenderBox& child) const;
    123123    LayoutUnit mainAxisScrollbarExtentForChild(RenderBox& child) const;
  • trunk/Source/WebCore/rendering/RenderFullScreen.cpp

    r174840 r176218  
    9191    fullscreenStyle.get().setDisplay(FLEX);
    9292    fullscreenStyle.get().setJustifyContent(JustifyCenter);
    93     fullscreenStyle.get().setAlignItems(AlignCenter);
     93    fullscreenStyle.get().setAlignItems(ItemPositionCenter);
    9494    fullscreenStyle.get().setFlexDirection(FlowColumn);
    9595   
  • trunk/Source/WebCore/rendering/RenderMenuList.cpp

    r174898 r176218  
    120120    // when the content overflows, treat it the same as align-items: flex-start.
    121121    // But we only do that for the cases where html.css would otherwise use center.
    122     if (style().alignItems() == AlignCenter) {
     122    if (style().alignItems() == ItemPositionCenter) {
    123123        innerStyle.setMarginTop(Length());
    124124        innerStyle.setMarginBottom(Length());
    125         innerStyle.setAlignSelf(AlignFlexStart);
     125        innerStyle.setAlignSelf(ItemPositionFlexStart);
    126126    }
    127127
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp

    r174619 r176218  
    234234    auto baseStyle = RenderStyle::createAnonymousStyleWithDisplay(&style(), FLEX);
    235235    baseStyle.get().setMarginTop(Length(0, Fixed)); // This will be updated in RenderMathMLRoot::layout().
    236     baseStyle.get().setAlignItems(AlignBaseline);
     236    baseStyle.get().setAlignItems(ItemPositionBaseline);
    237237    base->setStyle(WTF::move(baseStyle));
    238238    base->setNeedsLayoutAndPrefWidthsRecalc();
     
    245245        indexStyle.get().setMarginStart(Length(kernBeforeDegree, Fixed));
    246246        indexStyle.get().setMarginEnd(Length(kernAfterDegree, Fixed));
    247         indexStyle.get().setAlignItems(AlignBaseline);
     247        indexStyle.get().setAlignItems(ItemPositionBaseline);
    248248        index->setStyle(WTF::move(indexStyle));
    249249        index->setNeedsLayoutAndPrefWidthsRecalc();
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp

    r174587 r176218  
    102102    // Let's right align prescripts and left align postscripts.
    103103    // See http://lists.w3.org/Archives/Public/www-math/2012Aug/0006.html
    104     scriptsStyle.setAlignItems(isPostScript ? AlignFlexStart : AlignFlexEnd);
     104    scriptsStyle.setAlignItems(isPostScript ? ItemPositionFlexStart : ItemPositionFlexEnd);
    105105
    106106    // We set the order property so that the prescripts are drawn before the base.
     
    116116    // We set the base wrapper's style so that baseHeight in layout() will be an unstretched height.
    117117    ASSERT(m_baseWrapper && m_baseWrapper->style().hasOneRef());
    118     m_baseWrapper->style().setAlignSelf(AlignFlexStart);
     118    m_baseWrapper->style().setAlignSelf(ItemPositionFlexStart);
    119119
    120120    // This sets the style for postscript pairs.
     
    136136            scriptsStyle.setFlexDirection(FlowRow);
    137137            scriptsStyle.setJustifyContent(JustifyFlexStart);
    138             scriptsStyle.setAlignItems(AlignCenter);
     138            scriptsStyle.setAlignItems(ItemPositionCenter);
    139139            scriptsStyle.setOrder(0);
    140140            scriptsStyle.setFontSize(style().fontSize());
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r175889 r176218  
    904904    const Length& flexBasis() const { return rareNonInheritedData->m_flexibleBox->m_flexBasis; }
    905905    EAlignContent alignContent() const { return static_cast<EAlignContent>(rareNonInheritedData->m_alignContent); }
    906     EAlignItems alignItems() const { return static_cast<EAlignItems>(rareNonInheritedData->m_alignItems); }
    907     EAlignItems alignSelf() const { return static_cast<EAlignItems>(rareNonInheritedData->m_alignSelf); }
     906    ItemPosition alignItems() const { return static_cast<ItemPosition>(rareNonInheritedData->m_alignItems); }
     907    OverflowAlignment alignItemsOverflowAlignment() const { return static_cast<OverflowAlignment>(rareNonInheritedData->m_alignItemsOverflowAlignment); }
     908    ItemPosition alignSelf() const { return static_cast<ItemPosition>(rareNonInheritedData->m_alignSelf); }
     909    OverflowAlignment alignSelfOverflowAlignment() const { return static_cast<OverflowAlignment>(rareNonInheritedData->m_alignSelfOverflowAlignment); }
    908910    EFlexDirection flexDirection() const { return static_cast<EFlexDirection>(rareNonInheritedData->m_flexibleBox->m_flexDirection); }
    909911    bool isColumnFlexDirection() const { return flexDirection() == FlowColumn || flexDirection() == FlowColumnReverse; }
     
    911913    EFlexWrap flexWrap() const { return static_cast<EFlexWrap>(rareNonInheritedData->m_flexibleBox->m_flexWrap); }
    912914    EJustifyContent justifyContent() const { return static_cast<EJustifyContent>(rareNonInheritedData->m_justifyContent); }
    913     EJustifySelf justifySelf() const { return static_cast<EJustifySelf>(rareNonInheritedData->m_justifySelf); }
    914     EJustifySelfOverflowAlignment justifySelfOverflowAlignment() const { return static_cast<EJustifySelfOverflowAlignment>(rareNonInheritedData->m_justifySelfOverflowAlignment); }
     915    ItemPosition justifySelf() const { return static_cast<ItemPosition>(rareNonInheritedData->m_justifySelf); }
     916    OverflowAlignment justifySelfOverflowAlignment() const { return static_cast<OverflowAlignment>(rareNonInheritedData->m_justifySelfOverflowAlignment); }
    915917
    916918#if ENABLE(CSS_GRID_LAYOUT)
     
    14761478    void setOrder(int o) { SET_VAR(rareNonInheritedData, m_order, o); }
    14771479    void setAlignContent(EAlignContent p) { SET_VAR(rareNonInheritedData, m_alignContent, p); }
    1478     void setAlignItems(EAlignItems a) { SET_VAR(rareNonInheritedData, m_alignItems, a); }
    1479     void setAlignSelf(EAlignItems a) { SET_VAR(rareNonInheritedData, m_alignSelf, a); }
     1480    void setAlignItems(ItemPosition a) { SET_VAR(rareNonInheritedData, m_alignItems, a); }
     1481    void setAlignItemsOverflowAlignment(OverflowAlignment overflowAlignment) { SET_VAR(rareNonInheritedData, m_alignItemsOverflowAlignment, overflowAlignment); }
     1482    void setAlignSelf(ItemPosition a) { SET_VAR(rareNonInheritedData, m_alignSelf, a); }
     1483    void setAlignSelfOverflowAlignment(OverflowAlignment overflowAlignment) { SET_VAR(rareNonInheritedData, m_alignSelfOverflowAlignment, overflowAlignment); }
    14801484    void setFlexDirection(EFlexDirection direction) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexDirection, direction); }
    14811485    void setFlexWrap(EFlexWrap w) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexWrap, w); }
    14821486    void setJustifyContent(EJustifyContent p) { SET_VAR(rareNonInheritedData, m_justifyContent, p); }
    1483     void setJustifySelf(EJustifySelf p) { SET_VAR(rareNonInheritedData, m_justifySelf, p); }
    1484     void setJustifySelfOverflowAlignment(EJustifySelfOverflowAlignment overflowAlignment) { SET_VAR(rareNonInheritedData, m_justifySelfOverflowAlignment, overflowAlignment); }
     1487    void setJustifySelf(ItemPosition p) { SET_VAR(rareNonInheritedData, m_justifySelf, p); }
     1488    void setJustifySelfOverflowAlignment(OverflowAlignment overflowAlignment) { SET_VAR(rareNonInheritedData, m_justifySelfOverflowAlignment, overflowAlignment); }
    14851489#if ENABLE(CSS_GRID_LAYOUT)
    14861490    void setGridAutoColumns(const GridTrackSize& length) { SET_VAR(rareNonInheritedData.access()->m_grid, m_gridAutoColumns, length); }
     
    17611765    bool isDisplayInlineType() const { return isDisplayInlineType(display()); }
    17621766    bool isOriginalDisplayInlineType() const { return isDisplayInlineType(originalDisplay()); }
     1767    bool isDisplayFlexibleOrGridBox() const { return isDisplayFlexibleOrGridBox(display()); }
    17631768    bool isDisplayRegionType() const
    17641769    {
     
    18841889    static int initialOrder() { return 0; }
    18851890    static EAlignContent initialAlignContent() { return AlignContentStretch; }
    1886     static EAlignItems initialAlignItems() { return AlignStretch; }
    1887     static EAlignItems initialAlignSelf() { return AlignAuto; }
     1891    static ItemPosition initialAlignItems() { return ItemPositionAuto; }
     1892    static OverflowAlignment initialAlignItemsOverflowAlignment() { return OverflowAlignmentDefault; }
     1893    static ItemPosition initialAlignSelf() { return ItemPositionAuto; }
     1894    static OverflowAlignment initialAlignSelfOverflowAlignment() { return OverflowAlignmentDefault; }
    18881895    static EFlexDirection initialFlexDirection() { return FlowRow; }
    18891896    static EFlexWrap initialFlexWrap() { return FlexNoWrap; }
    18901897    static EJustifyContent initialJustifyContent() { return JustifyFlexStart; }
    1891     static EJustifySelf initialJustifySelf() { return JustifySelfAuto; }
    1892     static EJustifySelfOverflowAlignment initialJustifySelfOverflowAlignment() { return JustifySelfOverflowAlignmentDefault; }
     1898    static ItemPosition initialJustifySelf() { return ItemPositionAuto; }
     1899    static OverflowAlignment initialJustifySelfOverflowAlignment() { return OverflowAlignmentDefault; }
    18931900    static int initialMarqueeLoopCount() { return -1; }
    18941901    static int initialMarqueeSpeed() { return 85; }
     
    20762083    }
    20772084
     2085    bool isDisplayFlexibleBox(EDisplay display) const
     2086    {
     2087        return display == FLEX || display == INLINE_FLEX;
     2088    }
     2089
     2090    bool isDisplayGridBox(EDisplay display) const
     2091    {
     2092#if ENABLE(CSS_GRID_LAYOUT)
     2093        return display == GRID || display == INLINE_GRID;
     2094#else
     2095        UNUSED_PARAM(display);
     2096        return false;
     2097#endif
     2098    }
     2099
     2100    bool isDisplayFlexibleOrGridBox(EDisplay display) const
     2101    {
     2102        return isDisplayFlexibleBox(display) || isDisplayGridBox(display);
     2103    }
     2104
    20782105    // Color accessors are all private to make sure callers use visitedDependentColor instead to access them.
    20792106    Color invalidColor() const { static Color invalid; return invalid; }
  • trunk/Source/WebCore/rendering/style/RenderStyleConstants.h

    r175889 r176218  
    245245
    246246enum EAlignContent { AlignContentFlexStart, AlignContentFlexEnd, AlignContentCenter, AlignContentSpaceBetween, AlignContentSpaceAround, AlignContentStretch };
    247 enum EAlignItems { AlignAuto, AlignFlexStart, AlignFlexEnd, AlignCenter, AlignStretch, AlignBaseline };
    248247enum EFlexDirection { FlowRow, FlowRowReverse, FlowColumn, FlowColumnReverse };
    249248enum EFlexWrap { FlexNoWrap, FlexWrap, FlexWrapReverse };
    250249enum EJustifyContent { JustifyFlexStart, JustifyFlexEnd, JustifyCenter, JustifySpaceBetween, JustifySpaceAround };
    251 enum EJustifySelf {JustifySelfAuto, JustifySelfStretch, JustifySelfBaseline, JustifySelfCenter, JustifySelfStart, JustifySelfEnd, JustifySelfSelfStart, JustifySelfSelfEnd, JustifySelfFlexStart, JustifySelfFlexEnd, JustifySelfLeft, JustifySelfRight};
    252 enum EJustifySelfOverflowAlignment {JustifySelfOverflowAlignmentDefault, JustifySelfOverflowAlignmentTrue, JustifySelfOverflowAlignmentSafe};
     250enum ItemPosition {ItemPositionAuto, ItemPositionStretch, ItemPositionBaseline, ItemPositionLastBaseline, ItemPositionCenter, ItemPositionStart, ItemPositionEnd, ItemPositionSelfStart, ItemPositionSelfEnd, ItemPositionFlexStart, ItemPositionFlexEnd, ItemPositionLeft, ItemPositionRight};
     251enum OverflowAlignment {OverflowAlignmentDefault, OverflowAlignmentTrue, OverflowAlignmentSafe};
    253252
    254253
  • trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp

    r175716 r176218  
    8484    , m_alignContent(RenderStyle::initialAlignContent())
    8585    , m_alignItems(RenderStyle::initialAlignItems())
     86    , m_alignItemsOverflowAlignment(RenderStyle::initialAlignItemsOverflowAlignment())
    8687    , m_alignSelf(RenderStyle::initialAlignSelf())
     88    , m_alignSelfOverflowAlignment(RenderStyle::initialAlignSelfOverflowAlignment())
    8789    , m_justifyContent(RenderStyle::initialJustifyContent())
    8890    , m_justifySelf(RenderStyle::initialJustifySelf())
     
    171173    , m_alignContent(o.m_alignContent)
    172174    , m_alignItems(o.m_alignItems)
     175    , m_alignItemsOverflowAlignment(o.m_alignItemsOverflowAlignment)
    173176    , m_alignSelf(o.m_alignSelf)
     177    , m_alignSelfOverflowAlignment(o.m_alignSelfOverflowAlignment)
    174178    , m_justifyContent(o.m_justifyContent)
    175179    , m_justifySelf(o.m_justifySelf)
     
    266270        && m_alignContent == o.m_alignContent
    267271        && m_alignItems == o.m_alignItems
     272        && m_alignItemsOverflowAlignment == o.m_alignItemsOverflowAlignment
    268273        && m_alignSelf == o.m_alignSelf
     274        && m_alignSelfOverflowAlignment == o.m_alignSelfOverflowAlignment
    269275        && m_justifyContent == o.m_justifyContent
    270276        && userDrag == o.userDrag
  • trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h

    r175716 r176218  
    189189
    190190    unsigned m_alignContent : 3; // EAlignContent
    191     unsigned m_alignItems : 3; // EAlignItems
    192     unsigned m_alignSelf : 3; // EAlignItems
     191    unsigned m_alignItems : 4; // ItemPosition
     192    unsigned m_alignItemsOverflowAlignment : 2; // OverflowAlignment
     193    unsigned m_alignSelf : 4; // ItemPosition
     194    unsigned m_alignSelfOverflowAlignment : 2; // OverflowAlignment
    193195    unsigned m_justifyContent : 3; // EJustifyContent
    194196
    195     unsigned m_justifySelf : 4; // EJustifySelf
    196     unsigned m_justifySelfOverflowAlignment : 2; // EJustifySelfOverflowAlignment
     197    unsigned m_justifySelf : 4; // ItemPosition
     198    unsigned m_justifySelfOverflowAlignment : 2; // OverflowAlignment
    197199
    198200    unsigned userDrag : 2; // EUserDrag
  • trunk/Source/WebCore/style/StyleResolveTree.cpp

    r175583 r176218  
    122122    if (s1.hasFlowFrom() && (s1.specifiesColumns() != s2.specifiesColumns()))
    123123        return Detach;
     124    if (s1.alignItems() != s2.alignItems())
     125        return Detach;
    124126
    125127    if (s1 != s2) {
Note: See TracChangeset for help on using the changeset viewer.