Bug 225343

Summary: [css-flexbox] Flexbox uses min-width property of table child instead of its effective size
Product: WebKit Reporter: Felipe Erias <felipeerias>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, bfulgham, simon.fraser, svillar, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: http://wpt.live/css/css-flexbox/table-as-item-fixed-min-width-3.html
Bug Depends on:    
Bug Blocks: 221473    

Description Felipe Erias 2021-05-04 00:34:31 PDT
Failing test:

  imported/w3c/web-platform-tests/css/css-flexbox/table-as-item-fixed-min-width-3.html

A table inside a flex container claims to have a min-width of 50px, but actually its content will make it larger than that.
  
The flex algorithm uses that min-width when distributing the available space, which causes an error in layout when the table ends up taking up more space than expected.
Comment 1 Felipe Erias 2021-05-04 00:38:40 PDT
RenderFlexibleBox::adjustChildSizeForMinAndMax() returns the wrong width for the child table because it ends up using the min-width value directly.

Using the child's minPreferredLogicalWidth() would return the right value in this case, but I haven't yet found a way to do that without causing other tests to fail.
Comment 2 Radar WebKit Bug Importer 2021-05-11 00:35:13 PDT
<rdar://problem/77809882>
Comment 3 Ahmad Saleem 2023-07-16 07:45:00 PDT
We are passing this test now:

https://wpt.fyi/results/css/css-flexbox/table-as-item-fixed-min-width-3.html?label=experimental&label=master&aligned=

Marking this as 'RESOLVED CONFIGURATION CHANGED'.