Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
| diff --git a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
| index e9eaeee55ff51a0d1a9fa11064cee03175c43ea3..16c24fc7822a18fb1a6bcbcf27317516a797c6f5 100644 |
| --- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
| +++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
| @@ -1608,8 +1608,12 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID |
| case CSSPropertyAlignItems: |
| return valueForItemPositionWithOverflowAlignment(resolveAlignmentAuto(style.alignItemsPosition(), &style), style.alignItemsOverflowAlignment(), NonLegacyPosition); |
| case CSSPropertyAlignSelf: { |
| - Node* parent = styledNode->parentNode(); |
| - return valueForItemPositionWithOverflowAlignment(resolveAlignmentAuto(style.alignSelfPosition(), parent ? parent->ensureComputedStyle() : nullptr), style.alignSelfOverflowAlignment(), NonLegacyPosition); |
| + ItemPosition position = style.alignSelfPosition(); |
| + if (position == ItemPositionAuto) { |
| + const ComputedStyle* parentStyle = styledNode->parentNode() ? styledNode->parentNode()->ensureComputedStyle() : nullptr; |
|
esprehn
2016/01/29 04:20:55
You need to use LayoutTreeBuilderTraversal::parent
|
| + position = parentStyle ? ComputedStyle::resolveAlignment(*parentStyle, style, resolveAlignmentAuto(parentStyle->alignItemsPosition(), parentStyle)) : ItemPositionStart; |
| + } |
| + return valueForItemPositionWithOverflowAlignment(position, style.alignSelfOverflowAlignment(), NonLegacyPosition); |
| } |
| case CSSPropertyFlex: |
| return valuesForShorthandProperty(flexShorthand(), style, layoutObject, styledNode, allowVisitedStyle); |