| Index: Source/core/rendering/style/RenderStyle.cpp
|
| diff --git a/Source/core/rendering/style/RenderStyle.cpp b/Source/core/rendering/style/RenderStyle.cpp
|
| index 4f875ad5ca4190c0011198add9e4d02855d1d57d..73fd13281ec8315dd1ae245dc8517f3aef3d4342 100644
|
| --- a/Source/core/rendering/style/RenderStyle.cpp
|
| +++ b/Source/core/rendering/style/RenderStyle.cpp
|
| @@ -198,13 +198,19 @@ StyleRecalcChange RenderStyle::stylePropagationDiff(const RenderStyle* oldStyle,
|
| return NoInherit;
|
| }
|
|
|
| -ItemPosition RenderStyle::resolveAlignment(const RenderStyle* parentStyle, const RenderStyle* childStyle)
|
| +ItemPosition RenderStyle::resolveAlignment(const RenderStyle* parentStyle, const RenderStyle* childStyle, ItemPosition defaultPosition)
|
| {
|
| - ItemPosition align = childStyle->alignSelf();
|
| // The auto keyword computes to the parent's align-items computed value, or to "stretch", if not set or "auto".
|
| - if (align == ItemPositionAuto)
|
| - align = (parentStyle->alignItems() == ItemPositionAuto) ? ItemPositionStretch : parentStyle->alignItems();
|
| - return align;
|
| + if (childStyle->alignSelf() == ItemPositionAuto)
|
| + return (parentStyle->alignItems() == ItemPositionAuto) ? defaultPosition : parentStyle->alignItems();
|
| + return childStyle->alignSelf();
|
| +}
|
| +
|
| +ItemPosition RenderStyle::resolveJustification(const RenderStyle* parentStyle, const RenderStyle* childStyle, ItemPosition defaultPosition)
|
| +{
|
| + if (childStyle->justifySelf() == ItemPositionAuto)
|
| + return (parentStyle->justifyItems() == ItemPositionAuto) ? defaultPosition : parentStyle->justifyItems();
|
| + return childStyle->justifySelf();
|
| }
|
|
|
| void RenderStyle::inheritFrom(const RenderStyle* inheritParent, IsAtShadowBoundary isAtShadowBoundary)
|
|
|