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 91a127aae9fa0fcda4ea80f0561fbde259d66973..39124fac467439e890257eafb3ba8f60a9498469 100644 |
--- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
+++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
@@ -503,7 +503,13 @@ |
CSSValueList* result = CSSValueList::CreateSpaceSeparated(); |
if (data.PositionType() == kLegacyPosition) |
result->Append(*CSSIdentifierValue::Create(CSSValueLegacy)); |
- if (data.GetPosition() == kItemPositionBaseline) { |
+ if (data.GetPosition() == kItemPositionAuto) { |
+ // To avoid needing to copy the RareNonInheritedData, we repurpose the |
+ // 'auto' flag to not just mean 'auto' prior to running the StyleAdjuster |
+ // but also mean 'normal' after running it. |
+ result->Append(*CSSIdentifierValue::Create( |
+ ComputedStyle::InitialDefaultAlignment().GetPosition())); |
+ } else if (data.GetPosition() == kItemPositionBaseline) { |
result->Append( |
*CSSValuePair::Create(CSSIdentifierValue::Create(CSSValueBaseline), |
CSSIdentifierValue::Create(CSSValueBaseline), |
@@ -2607,10 +2613,7 @@ |
case CSSPropertyIsolation: |
return CSSIdentifierValue::Create(style.Isolation()); |
case CSSPropertyJustifyItems: |
- return ValueForItemPositionWithOverflowAlignment( |
- style.JustifyItems().GetPosition() == kItemPositionAuto |
- ? ComputedStyle::InitialDefaultAlignment() |
- : style.JustifyItems()); |
+ return ValueForItemPositionWithOverflowAlignment(style.JustifyItems()); |
case CSSPropertyJustifySelf: |
return ValueForItemPositionWithOverflowAlignment(style.JustifySelf()); |
case CSSPropertyLeft: |