Bug 232383

Summary: [css-flexbox] Do not shrink tables bellow their intrinsic sizes
Product: WebKit Reporter: Sergio Villar Senin <svillar>
Component: New BugsAssignee: Sergio Villar Senin <svillar>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, cdumez, changseok, darin, esprehn+autocc, ews-watchlist, glenn, jfernandez, kondapallykalyan, mrobinson, pdr, rego, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch rego: review+

Description Sergio Villar Senin 2021-10-27 09:27:24 PDT
[css-flexbox] Do not shrink tables bellow their intrinsic sizes
Comment 1 Sergio Villar Senin 2021-10-27 11:24:52 PDT
Created attachment 442614 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2021-11-03 09:28:16 PDT
<rdar://problem/84977609>
Comment 3 Manuel Rego Casasnovas 2021-11-25 03:52:36 PST
Comment on attachment 442614 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=442614&action=review

r=me

> Source/WebCore/ChangeLog:12
> +        size and the min-size.

Is it only tables? Or there might be other elements we should take care too? I guess not, but it'd be nice to think twice about other cases like an <input>, <fieldset>, <details> or flex/grid/multi-col with gaps.
Comment 4 Sergio Villar Senin 2021-11-29 02:05:36 PST
(In reply to Manuel Rego Casasnovas from comment #3)
> Comment on attachment 442614 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=442614&action=review
> 
> r=me
> 
> > Source/WebCore/ChangeLog:12
> > +        size and the min-size.
> 
> Is it only tables? Or there might be other elements we should take care too?
> I guess not, but it'd be nice to think twice about other cases like an
> <input>, <fieldset>, <details> or flex/grid/multi-col with gaps.

Yeah, so far only tables are affected. Note that this issue has nothing to do with content size. This is about ignoring what min-height|min-width say when computing the hypothetical main size, i.e. the flex item's min|max limits to be applied to the flex base size. We obbey what min-height|width say for any kind of block. Tables are a bit different on that regard, if the intrinsic size of the table is greater than the used value of min-height|width we must use the intrinsic size no matter what the min-size says. This unique behaviour is exclusive to tables.
Comment 5 Sergio Villar Senin 2021-11-29 02:29:49 PST
Committed r286207 (244589@main): <https://commits.webkit.org/244589@main>
Comment 6 Sergio Villar Senin 2021-11-29 04:16:58 PST
*** Bug 233313 has been marked as a duplicate of this bug. ***