Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(728)

Unified Diff: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp

Issue 2455093002: [css-align] Don't resolve 'auto' values for computed style. (Closed)
Patch Set: Patch for landing. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 39124fac467439e890257eafb3ba8f60a9498469..91a127aae9fa0fcda4ea80f0561fbde259d66973 100644
--- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
+++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
@@ -503,13 +503,7 @@ static CSSValueList* ValueForItemPositionWithOverflowAlignment(
CSSValueList* result = CSSValueList::CreateSpaceSeparated();
if (data.PositionType() == kLegacyPosition)
result->Append(*CSSIdentifierValue::Create(CSSValueLegacy));
- 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) {
+ if (data.GetPosition() == kItemPositionBaseline) {
result->Append(
*CSSValuePair::Create(CSSIdentifierValue::Create(CSSValueBaseline),
CSSIdentifierValue::Create(CSSValueBaseline),
@@ -2613,7 +2607,10 @@ const CSSValue* ComputedStyleCSSValueMapping::Get(
case CSSPropertyIsolation:
return CSSIdentifierValue::Create(style.Isolation());
case CSSPropertyJustifyItems:
- return ValueForItemPositionWithOverflowAlignment(style.JustifyItems());
+ return ValueForItemPositionWithOverflowAlignment(
+ style.JustifyItems().GetPosition() == kItemPositionAuto
+ ? ComputedStyle::InitialDefaultAlignment()
+ : style.JustifyItems());
case CSSPropertyJustifySelf:
return ValueForItemPositionWithOverflowAlignment(style.JustifySelf());
case CSSPropertyLeft:

Powered by Google App Engine
This is Rietveld 408576698