Bug 296560

Summary: Flex container set to flex:none does not size to fit image
Product: WebKit Reporter: Razvan Caliman <rcaliman>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: bfulgham, sgill26, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Test Case
none
Screenshot of test case in Safari
none
Screenshot of test case in Firefox
none
Screenshot of test case in Chrome none

Razvan Caliman
Reported 2025-07-28 04:01:36 PDT
A flex container set to `flex:none` does not size to fit a single <img> when explicitly asked to with `width:fit-content`. See the attached test case. The issue seems related to the <img> not having explicit dimensions. Chrome 140 and Firefox 142 render as expected. Safari 18.5 does not.
Attachments
Test Case (57.17 KB, application/zip)
2025-07-28 04:03 PDT, Razvan Caliman
no flags
Screenshot of test case in Safari (275.17 KB, image/png)
2025-07-28 04:04 PDT, Razvan Caliman
no flags
Screenshot of test case in Firefox (264.84 KB, image/png)
2025-07-28 04:04 PDT, Razvan Caliman
no flags
Screenshot of test case in Chrome (252.68 KB, image/png)
2025-07-28 04:04 PDT, Razvan Caliman
no flags
Radar WebKit Bug Importer
Comment 1 2025-07-28 04:01:51 PDT
Razvan Caliman
Comment 2 2025-07-28 04:03:23 PDT
Created attachment 476193 [details] Test Case
Razvan Caliman
Comment 3 2025-07-28 04:04:03 PDT
Created attachment 476194 [details] Screenshot of test case in Safari
Razvan Caliman
Comment 4 2025-07-28 04:04:26 PDT
Created attachment 476195 [details] Screenshot of test case in Firefox
Razvan Caliman
Comment 5 2025-07-28 04:04:43 PDT
Created attachment 476196 [details] Screenshot of test case in Chrome
Note You need to log in before you can comment on or make changes to this bug.