Bug 154646

Summary: <input type="file"> is inconsistent about whether its intrinsic size can be 0
Product: WebKit Reporter: Daniel Holbert <dholbert>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, akeerthi, ap, dino, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: FromImplementor, InRadar
Version: Safari 9   
Hardware: All   
OS: All   
Attachments:
Description Flags
testcase 1 none

Description Daniel Holbert 2016-02-24 11:12:28 PST
STR:
1. Visit https://jsfiddle.net/0j2ozsvn/

EXPECTED OUTPUT:
Three lines that look the same. ("Greedy cell" should take pretty much all of the space on each line.)

ACTUAL OUTPUT:
The first line, "Greedy cell" does *not* take all of the space -- there's a big aqua area for the first cell.

NOTES:
 * In each case, the first cell only contains an <input type="file"> element. In the first line, it explicitly has "width:0", and on the next two lines it has a percent width.
 * Paradoxically, that first line (with "width:0") is the one where it gives its table-cell a *large* intrinsic width.

OTHER BROWSERS:
- Chrome (on Linux) matches the confusing Safari behavior.
- Edge 13 on Windows 10 gives EXPECTED RESULTS
- Firefox 44 gives EXPECTED RESULTS.


I also filed https://bugs.chromium.org/p/chromium/issues/detail?id=589555 for this same issue in Blink.
Comment 1 Daniel Holbert 2016-02-24 11:21:13 PST
Created attachment 272126 [details]
testcase 1

Here's the jsfiddle (slightly reduced/simplified) as an attachment, for archival purposes.
Comment 2 Radar WebKit Bug Importer 2016-02-24 12:42:47 PST
<rdar://problem/24821216>
Comment 3 Ahmad Saleem 2022-10-31 15:06:45 PDT
I am able to reproduce this bug from attached test case in Safari 16.1 and STP 156 where first cell has expanded cell while Chrome Canary 109 and Firefox Nightly 108 matches with below two rows in cell size etc. and everything.

Just wanted to update. Thanks!
Comment 4 Ahmad Saleem 2023-02-17 08:37:25 PST
This seems to have now worse looking with Safari Technology Preview 163, where "Choose File" is not hidden like Safari 16.3 and other browsers.