Bug 210093

Summary: [css-flexbox] select element incorrectly allows itself to shrink to a main-size of 0, in a flex container
Product: WebKit Reporter: Carlos Alberto Lopez Perez <clopez>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: REOPENED ---    
Severity: Normal CC: bdakin, bfulgham, darin, gsnedders, koivisto, ntim, simon.fraser, svillar, tonikitoo, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugzilla.mozilla.org/show_bug.cgi?id=1591925
https://bugs.webkit.org/show_bug.cgi?id=210091
https://bugs.webkit.org/show_bug.cgi?id=177503
https://github.com/web-platform-tests/wpt/pull/27975
Attachments:
Description Flags
Patch ews-feeder: commit-queue-

Description Carlos Alberto Lopez Perez 2020-04-06 20:43:35 PDT
Steps to reproduce:

Put select element inside flexbox and apply some "pressure":
https://jsfiddle.net/Risord/dvky8w4m/4/

Actual results:
Select will be collapsed all the way zero height (in demo there is a bit more space so that select is easier to see).

Expected results:
Select should keep it's "obvious" height just like the div (and other form inputs etc.). Chrome and Edge also handle select correct way.


This very same issue has been reported (and fixed) on firefox at : https://bugzilla.mozilla.org/show_bug.cgi?id=1591925
Chrome doesn't have this issue.

This is tested by the following WPT tests (that fail on WebKit):

https://wpt.live/css/css-flexbox/select-element-zero-height-001.html
https://wpt.live/css/css-flexbox/select-element-zero-height-002.html
Comment 1 Sergio Villar Senin 2021-03-10 04:20:30 PST
There is a problem in the tests.
Comment 2 Sergio Villar Senin 2021-10-21 04:26:42 PDT
Created attachment 442006 [details]
Patch
Comment 4 Radar WebKit Bug Importer 2022-05-31 09:56:21 PDT
<rdar://problem/94158795>
Comment 5 Brent Fulgham 2022-05-31 09:56:41 PDT
We show this as a failure in STP 146. Is this a Safari-only issue we are having?
Comment 6 Sam Sneddon [:gsnedders] 2022-06-07 08:18:45 PDT
https://wpt.fyi/analyzer?screenshot=sha1%3A7c46f91fa7586a0036094866a706ac1f220f14eb&screenshot=sha1%3A2d1204d50c43764eeae10692c176aa39fdd7ccfa

this being a few pixels makes me wonder if it's related to intrinsic margins on form elements? it's 1 pixel off vertically, which suggests it is something else, though the height of the select element seems right.
Comment 7 Tim Nguyen (:ntim) 2022-08-15 21:30:29 PDT
Intrinsic margins were removed (https://github.com/WebKit/WebKit/pull/3205), and this isn't fixed.