Bug 1686603 Part 4 - Use StyleSizeOverrides to revise flex base size resolution. r=dholbert

Differential Revision: https://phabricator.services.mozilla.com/D101795
This commit is contained in:
Ting-Yu Lin
2021-01-21 04:22:08 +00:00
parent 695bf341fc
commit e20b050352
4 changed files with 76 additions and 100 deletions

View File

@@ -567,8 +567,10 @@ LogicalSize nsTextControlFrame::ComputeAutoSize(
// Note: nsContainerFrame::ComputeAutoSize only computes the inline-size (and
// only for 'auto'), the block-size it returns is always NS_UNCONSTRAINEDSIZE.
const auto& iSizeCoord = StylePosition()->ISize(aWM);
if (iSizeCoord.IsAuto()) {
const auto& styleISize = aSizeOverrides.mStyleISize
? *aSizeOverrides.mStyleISize
: StylePosition()->ISize(aWM);
if (styleISize.IsAuto()) {
if (aFlags.contains(ComputeSizeFlag::IClampMarginBoxMinSize)) {
// CalcIntrinsicSize isn't aware of grid-item margin-box clamping, so we
// fall back to nsContainerFrame's ComputeAutoSize to handle that.