diff options
author | FranklinDM <mrmineshafter17@gmail.com> | 2022-04-06 22:44:31 +0800 |
---|---|---|
committer | FranklinDM <mrmineshafter17@gmail.com> | 2022-04-07 18:35:48 +0800 |
commit | 0b75a2a787eeec1c87f7d6f3fa0d114c00f950f8 (patch) | |
tree | 0b64426b02682ccc4af4ef40df9bcff39435a8a0 /layout | |
parent | b8d18bace6948b304c4a3e22836c86bc329d4adf (diff) | |
download | uxp-0b75a2a787eeec1c87f7d6f3fa0d114c00f950f8.tar.gz |
Issue #1370 - Part 2: Remove redundant special-case code for treating flex-basis enum values as 'auto' in vertical axis
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1436881
Diffstat (limited to 'layout')
-rw-r--r-- | layout/generic/nsFrame.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 7a1cd428b1..99442e681f 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -4647,19 +4647,11 @@ nsFrame::SetCoordToFlexBasis(bool aIsInlineFlexItem, return; } + // Override whichever styleCoord is in the flex container's main axis if (aIsInlineFlexItem) { *aInlineStyle = aFlexBasis; } else { - // One caveat for vertical flex items: We don't support enumerated - // values (e.g. "max-content") for height properties yet. So, if our - // computed flex-basis is an enumerated value, we'll just behave as if - // it were "auto", which means "use the main-size property after all" - // (which is "height", in this case). - // NOTE: Once we support intrinsic sizing keywords for "height", - // we should remove this check. - if (aFlexBasis->GetUnit() != eStyleUnit_Enumerated) { - *aBlockStyle = aFlexBasis; - } + *aBlockStyle = aFlexBasis; } } |