summaryrefslogtreecommitdiff
path: root/layout
diff options
context:
space:
mode:
authorFranklinDM <mrmineshafter17@gmail.com>2022-04-06 22:44:31 +0800
committerFranklinDM <mrmineshafter17@gmail.com>2022-04-07 18:35:48 +0800
commit0b75a2a787eeec1c87f7d6f3fa0d114c00f950f8 (patch)
tree0b64426b02682ccc4af4ef40df9bcff39435a8a0 /layout
parentb8d18bace6948b304c4a3e22836c86bc329d4adf (diff)
downloaduxp-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.cpp12
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;
}
}