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..1524385a8fc628f29d2cb85dcf01c84620d86f90 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()) |
esprehn
2016/01/29 04:20:56
we need to fix justifyItems too btw (in another pa
|
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, const ComputedStyle& childStyle, ItemPosition resolvedAutoPositionForLayoutObject) |
esprehn
2016/01/29 04:20:56
This should be an instance method on either the ch
|
+{ |
+ // The auto keyword computes to the parent's align-items computed value, or to "stretch", if not set or "auto". |
+ if (childStyle.alignSelfPosition() == ItemPositionAuto) { |
+ if (parentStyle.alignItemsPosition() == ItemPositionAuto) |
+ return {resolvedAutoPositionForLayoutObject, OverflowAlignmentDefault}; |
+ return parentStyle.alignItems(); |
+ } |
+ return childStyle.alignSelf(); |
+} |
+ |
ItemPosition ComputedStyle::resolveJustification(const ComputedStyle& parentStyle, const ComputedStyle& childStyle, ItemPosition resolvedAutoPositionForLayoutObject) |
{ |
if (childStyle.justifySelfPosition() == ItemPositionAuto) |