Bug 154646 - <input type="file"> is inconsistent about whether its intrinsic size can be 0
Summary: <input type="file"> is inconsistent about whether its intrinsic size can be 0
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 9
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: FromImplementor, InRadar
Depends on:
Blocks:
 
Reported: 2016-02-24 11:12 PST by Daniel Holbert
Modified: 2023-02-17 08:37 PST (History)
6 users (show)

See Also:


Attachments
testcase 1 (653 bytes, text/html)
2016-02-24 11:21 PST, Daniel Holbert
no flags Details

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