| Index: third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
| diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
| index 874e929fbcf1e18d199b48bc3f6870a7f744c8fb..818e9a9c7d5fbc0b5bdd4c3afa7ca227f4cf81ac 100644
|
| --- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
| +++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
| @@ -182,8 +182,7 @@ StyleRecalcChange ComputedStyle::stylePropagationDiff(const ComputedStyle* oldSt
|
| || oldStyle->hasPseudoStyle(FIRST_LETTER) != newStyle->hasPseudoStyle(FIRST_LETTER)
|
| || !oldStyle->contentDataEquivalent(newStyle)
|
| || oldStyle->hasTextCombine() != newStyle->hasTextCombine()
|
| - || oldStyle->justifyItems() != newStyle->justifyItems()
|
| - || oldStyle->alignItems() != newStyle->alignItems())
|
| + || oldStyle->justifyItems() != newStyle->justifyItems()) // TODO (lajava): We must avoid this Reattach.
|
| return Reattach;
|
|
|
| if (oldStyle->inheritedNotEqual(*newStyle))
|
| @@ -206,6 +205,17 @@ ItemPosition ComputedStyle::resolveAlignment(const ComputedStyle& parentStyle, c
|
| return childStyle.alignSelfPosition();
|
| }
|
|
|
| +const StyleSelfAlignmentData ComputedStyle::resolvedAlignment(const ComputedStyle& parentStyle, ItemPosition resolvedAutoPositionForLayoutObject) const
|
| +{
|
| + // The auto keyword computes to the parent's align-items computed value, or to "stretch", if not set or "auto".
|
| + if (alignSelfPosition() == ItemPositionAuto) {
|
| + if (parentStyle.alignItemsPosition() == ItemPositionAuto)
|
| + return {resolvedAutoPositionForLayoutObject, OverflowAlignmentDefault};
|
| + return parentStyle.alignItems();
|
| + }
|
| + return alignSelf();
|
| +}
|
| +
|
| ItemPosition ComputedStyle::resolveJustification(const ComputedStyle& parentStyle, const ComputedStyle& childStyle, ItemPosition resolvedAutoPositionForLayoutObject)
|
| {
|
| if (childStyle.justifySelfPosition() == ItemPositionAuto)
|
|
|