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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2915773002: Reland of [css-align] Don't resolve 'auto' values for computed style. (Closed)
Patch Set: Applied suggested changes 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/style/ComputedStyle.cpp
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index 4d7efa94d904859440e5315eff086c09ad17e6d0..2069db05e934c1c3bb2ffa89f08d8073b3c5af59 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -199,7 +199,6 @@ StyleRecalcChange ComputedStyle::StylePropagationDiff(
}
if (!old_style->LoadingCustomFontsEqual(*new_style) ||
- old_style->AlignItems() != new_style->AlignItems() ||
old_style->JustifyItems() != new_style->JustifyItems())
return kInherit;
@@ -220,9 +219,6 @@ void ComputedStyle::PropagateIndependentInheritedProperties(
StyleSelfAlignmentData ResolvedSelfAlignment(
const StyleSelfAlignmentData& value,
ItemPosition normal_value_behavior) {
- // 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.
if (value.GetPosition() == kItemPositionNormal ||
value.GetPosition() == kItemPositionAuto)
return {normal_value_behavior, kOverflowAlignmentDefault};
@@ -244,9 +240,6 @@ StyleSelfAlignmentData ComputedStyle::ResolvedAlignSelf(
if (!parent_style || AlignSelfPosition() != kItemPositionAuto)
return ResolvedSelfAlignment(AlignSelf(), normal_value_behaviour);
- // We shouldn't need to resolve any 'auto' value in post-adjusment
- // ComputedStyle, but some layout models can generate anonymous boxes that may
- // need 'auto' value resolution during layout.
// The 'auto' keyword computes to the parent's align-items computed value.
return parent_style->ResolvedAlignItems(normal_value_behaviour);
}
@@ -266,9 +259,6 @@ StyleSelfAlignmentData ComputedStyle::ResolvedJustifySelf(
if (!parent_style || JustifySelfPosition() != kItemPositionAuto)
return ResolvedSelfAlignment(JustifySelf(), normal_value_behaviour);
- // We shouldn't need to resolve any 'auto' value in post-adjusment
- // ComputedStyle, but some layout models can generate anonymous boxes that may
- // need 'auto' value resolution during layout.
// The auto keyword computes to the parent's justify-items computed value.
return parent_style->ResolvedJustifyItems(normal_value_behaviour);
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutGrid.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698