Index: Source/core/rendering/style/RenderStyle.cpp |
diff --git a/Source/core/rendering/style/RenderStyle.cpp b/Source/core/rendering/style/RenderStyle.cpp |
index b6db98ebcf328be94f64c9ecfebe286c9a719587..b36273469b2d01f9190608b896f4755c5b9a9c71 100644 |
--- a/Source/core/rendering/style/RenderStyle.cpp |
+++ b/Source/core/rendering/style/RenderStyle.cpp |
@@ -32,6 +32,7 @@ |
#include "core/rendering/style/ContentData.h" |
#include "core/rendering/style/DataEquivalency.h" |
#include "core/rendering/style/QuotesData.h" |
+#include "core/rendering/style/RenderStyleConstants.h" |
#include "core/rendering/style/ShadowList.h" |
#include "core/rendering/style/StyleImage.h" |
#include "core/rendering/style/StyleInheritedData.h" |
@@ -197,6 +198,15 @@ StyleRecalcChange RenderStyle::stylePropagationDiff(const RenderStyle* oldStyle, |
return NoInherit; |
} |
+ItemPosition RenderStyle::resolveAlignment(const RenderStyle* parentStyle, const RenderStyle* childStyle) |
+{ |
+ 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; |
+} |
+ |
void RenderStyle::inheritFrom(const RenderStyle* inheritParent, IsAtShadowBoundary isAtShadowBoundary) |
{ |
if (isAtShadowBoundary == AtShadowBoundary) { |