Bug 225343 - [css-flexbox] Flexbox uses min-width property of table child instead of its effective size
Summary: [css-flexbox] Flexbox uses min-width property of table child instead of its e...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://wpt.live/css/css-flexbox/table...
Keywords: InRadar
Depends on:
Blocks: 221473
  Show dependency treegraph
 
Reported: 2021-05-04 00:34 PDT by Felipe Erias
Modified: 2023-07-16 07:45 PDT (History)
6 users (show)

See Also:


Attachments

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