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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp

Issue 2913093002: Revert of [css-align] Don't resolve 'auto' values for computed style. (Closed)
Patch Set: 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/layout/LayoutFlexibleBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
index 3b10dde901743b460c8f4f8376e7e9fd2ae5cf85..79ca989986b700afb12c74e39484c1ddff478e20 100644
--- a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
@@ -325,13 +325,14 @@
intrinsic_size_along_main_axis_.erase(child);
}
+// TODO (lajava): Is this function still needed ? Every time the flex
+// container's align-items value changes we propagate the diff to its children
+// (see ComputedStyle::stylePropagationDiff).
void LayoutFlexibleBox::StyleDidChange(StyleDifference diff,
const ComputedStyle* old_style) {
LayoutBlock::StyleDidChange(diff, old_style);
- if (old_style &&
- old_style->ResolvedAlignItems(SelfAlignmentNormalBehavior())
- .GetPosition() == kItemPositionStretch &&
+ if (old_style && old_style->AlignItemsPosition() == kItemPositionStretch &&
diff.NeedsFullLayout()) {
// Flex items that were previously stretching need to be relayed out so we
// can compute new available cross axis space. This is only necessary for
@@ -1705,7 +1706,8 @@
const LayoutBox& child) const {
ItemPosition align =
child.StyleRef()
- .ResolvedAlignSelf(SelfAlignmentNormalBehavior(), Style())
+ .ResolvedAlignSelf(SelfAlignmentNormalBehavior(),
+ child.IsAnonymous() ? Style() : nullptr)
.GetPosition();
DCHECK_NE(align, kItemPositionAuto);
DCHECK_NE(align, kItemPositionNormal);
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutGrid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698