Bug 1591925 Comment 7 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Aha, so the issue is here:
```c++

  // NOTE: Technically we should be checking the 'overflow' subproperty in the
  // main axis. But since we only care whether it's 'visible', we can check
  // either subproperty -- because they must be BOTH 'visible' or BOTH
  // non-'visible' due to the way the subproperties interact.
  mNeedsMinSizeAutoResolution =
      IsAutoOrEnumOnBSize(mainMinSize, IsInlineAxisMainAxis()) &&
      disp->mOverflowX == StyleOverflow::Visible;
}
```

The "overflowX" check there is implementing the first sentence of this spec-text (which used to be worded in terms of the "overflow" property, but now is worded in terms of scroll containers) -- emphasis added by me:
> To provide a more reasonable default minimum size for flex items, the used value of a main axis automatic minimum size on a flex item **that is not a scroll container** is a content-based minimum size; **for scroll containers the automatic minimum size is zero, as usual.**
https://drafts.csswg.org/css-flexbox-1/#min-size-auto

Select elements have `overflow: -moz-hidden-unscrollable` under the hood:
https://searchfox.org/mozilla-central/rev/3300072e993ae05d50d5c63d815260367eaf9179/layout/style/res/forms.css#231,245
...so they fail the `overflow` check there.    But they're not scroll containers, so they shouldn't be bailing out of this check.

We should add `&& disp->mOverflowX == StyleOverflow::MozHiddenUnscrollable` here, to exclude that as well.  (I **think** we can continue abusing mOverflowX here without caring about the actual axis, because if we had a scrollport-producing 'overflow' value in either axis, then I think it would force the other axis to 'auto' (away from visible/MozHiddenUnscrollable).  That would be worth verifying, though.

I'm going to reserve this bug as a "good first/second bug" for Emily who joined our team today.
Aha, so the issue is here:
```c++
  // NOTE: Technically we should be checking the 'overflow' subproperty in the
  // main axis. But since we only care whether it's 'visible', we can check
  // either subproperty -- because they must be BOTH 'visible' or BOTH
  // non-'visible' due to the way the subproperties interact.
  mNeedsMinSizeAutoResolution =
      IsAutoOrEnumOnBSize(mainMinSize, IsInlineAxisMainAxis()) &&
      disp->mOverflowX == StyleOverflow::Visible;
}
```
Searchfox link: https://searchfox.org/mozilla-central/rev/3300072e993ae05d50d5c63d815260367eaf9179/layout/generic/nsFlexContainerFrame.cpp#2101-2107

The "overflowX" check there is implementing the first sentence of this spec-text (which used to be worded in terms of the "overflow" property, but now is worded in terms of scroll containers) -- emphasis added by me:
> To provide a more reasonable default minimum size for flex items, the used value of a main axis automatic minimum size on a flex item **that is not a scroll container** is a content-based minimum size; **for scroll containers the automatic minimum size is zero, as usual.**
https://drafts.csswg.org/css-flexbox-1/#min-size-auto

Select elements have `overflow: -moz-hidden-unscrollable` under the hood:
https://searchfox.org/mozilla-central/rev/3300072e993ae05d50d5c63d815260367eaf9179/layout/style/res/forms.css#231,245
...so they fail the `overflow` check there.    But they're not scroll containers, so they shouldn't be bailing out of this check.

We should add `&& disp->mOverflowX == StyleOverflow::MozHiddenUnscrollable` here, to exclude that as well.  (I **think** we can continue abusing mOverflowX here without caring about the actual axis, because if we had a scrollport-producing 'overflow' value in either axis, then I think it would force the other axis to 'auto' (away from visible/MozHiddenUnscrollable).  That would be worth verifying, though.

I'm going to reserve this bug as a "good first/second bug" for Emily who joined our team today.

Back to Bug 1591925 Comment 7