Index: Source/core/css/CSSComputedStyleDeclaration.cpp |
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp |
index 472fa870517b80bc94de995c07a765925dc219ce..a288b1bfb0d2691ae2f0ee8626a2e65c06f6c0db 100644 |
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp |
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp |
@@ -1891,17 +1891,8 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValu |
return cssValuePool().createValue(style->alignContent()); |
case CSSPropertyAlignItems: |
return valueForItemPositionWithOverflowAlignment(style->alignItems(), style->alignItemsOverflowAlignment(), NonLegacyPosition); |
- case CSSPropertyAlignSelf: { |
- ItemPosition alignSelf = style->alignSelf(); |
- if (alignSelf == ItemPositionAuto) { |
- Node* parent = styledNode->parentNode(); |
- if (parent && parent->computedStyle()) |
- alignSelf = parent->computedStyle()->alignItems(); |
- else |
- alignSelf = ItemPositionStretch; |
- } |
- return valueForItemPositionWithOverflowAlignment(alignSelf, style->alignSelfOverflowAlignment(), NonLegacyPosition); |
- } |
+ case CSSPropertyAlignSelf: |
+ return valueForItemPositionWithOverflowAlignment(style->alignSelf(), style->alignSelfOverflowAlignment(), NonLegacyPosition); |
case CSSPropertyFlex: |
return valuesForShorthandProperty(flexShorthand()); |
case CSSPropertyFlexBasis: |
@@ -2065,47 +2056,10 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValu |
return CSSPrimitiveValue::create(style->imageRendering()); |
case CSSPropertyIsolation: |
return cssValuePool().createValue(style->isolation()); |
- case CSSPropertyJustifyItems: { |
- // FIXME: I would like this to be tested; is not possible with a layout test but it |
- // should be possible using a method similar to https://codereview.chromium.org/351973004 |
- ItemPosition justifyItems = style->justifyItems(); |
- ItemPositionType positionType = style->justifyItemsPositionType(); |
- if (justifyItems == ItemPositionAuto) { |
- Node* parent = styledNode->parentNode(); |
- // If the inherited value of justify-items includes the legacy keyword, 'auto' |
- // computes to the the inherited value. |
- if (parent && parent->computedStyle() && parent->computedStyle()->justifyItemsPositionType()) { |
- justifyItems = parent->computedStyle()->justifyItems(); |
- positionType = parent->computedStyle()->justifyItemsPositionType(); |
- // Otherwise, auto computes to: |
- } else if (style->isDisplayFlexibleOrGridBox()) { |
- // 'stretch' for flex containers and grid containers. |
- justifyItems = ItemPositionStretch; |
- } else { |
- // 'start' for everything else. |
- justifyItems = ItemPositionStart; |
- } |
- } |
- return valueForItemPositionWithOverflowAlignment(justifyItems, style->justifyItemsOverflowAlignment(), positionType); |
- } |
- case CSSPropertyJustifySelf: { |
- // FIXME: I would like this to be tested; is not possible with a layout test but it |
- // should be possible using a method similar to https://codereview.chromium.org/351973004 |
- ItemPosition justifySelf = style->justifySelf(); |
- if (justifySelf == ItemPositionAuto) { |
- // The auto keyword computes to stretch on absolutely-positioned elements, |
- if (style->position() == AbsolutePosition) { |
- justifySelf = ItemPositionStretch; |
- } else { |
- // and to the computed value of justify-items on the parent (minus |
- // any legacy keywords) on all other boxes. |
- Node* parent = styledNode->parentNode(); |
- if (parent && parent->computedStyle()) |
- justifySelf = parent->computedStyle()->justifyItems(); |
- } |
- } |
- return valueForItemPositionWithOverflowAlignment(justifySelf, style->justifySelfOverflowAlignment(), NonLegacyPosition); |
- } |
+ case CSSPropertyJustifyItems: |
+ return valueForItemPositionWithOverflowAlignment(style->justifyItems(), style->justifyItemsOverflowAlignment(), style->justifyItemsPositionType()); |
+ case CSSPropertyJustifySelf: |
+ return valueForItemPositionWithOverflowAlignment(style->justifySelf(), style->justifySelfOverflowAlignment(), NonLegacyPosition); |
case CSSPropertyLeft: |
return valueForPositionOffset(*style, CSSPropertyLeft, renderer); |
case CSSPropertyLetterSpacing: |