Bug 210093 - [css-flexbox] select element incorrectly allows itself to shrink to a main-size of 0, in a flex container
Summary: [css-flexbox] select element incorrectly allows itself to shrink to a main-si...
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar, WPTImpact
Depends on:
Blocks:
 
Reported: 2020-04-06 20:43 PDT by Carlos Alberto Lopez Perez
Modified: 2023-06-25 04:40 PDT (History)
12 users (show)

See Also:


Attachments
Patch (1.91 KB, patch)
2021-10-21 04:26 PDT, Sergio Villar Senin
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.