Bug 253922

Summary: Table flex-item inside inline-flex with column flex-direction has incorrect cross-size (width)
Product: WebKit Reporter: decademoon.bugzilla
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: ahmad.saleem792, bfulgham, changseok, dgrogan, esprehn+autocc, ews-watchlist, glenn, koivisto, kondapallykalyan, pdr, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Mac (Apple Silicon)   
OS: macOS 13   
Attachments:
Description Flags
Screenshot of Safari's incorrect rendering and Chrome and Firefox's correct rendering
none
[fast-cq]Patch none

Description decademoon.bugzilla 2023-03-14 17:14:00 PDT
Created attachment 465439 [details]
Screenshot of Safari's incorrect rendering and Chrome and Firefox's correct rendering

HTML:

<div class="container">
  <table>
    <tr>
      <td>the quick brown fox jumps over the lazy dog</td>
    </tr>
  </table>
</div>

CSS:

.container {
  display: inline-flex;
  flex-direction: column;
}

table {
  border-collapse: collapse;
}

td {
  border: 1px solid black;
}

In Safari 16.3 and Technology Preview 16.4 it renders the table too narrow (as if its width were min-content). Chrome 110 and Firefox 110 render it correctly with width as wide as the text.

JsFiddle reproduction: https://jsfiddle.net/1ox8cfnp/
Comment 1 Ahmad Saleem 2023-03-16 19:33:10 PDT
Is this same as bug 253928?
Comment 2 decademoon.bugzilla 2023-03-16 20:32:47 PDT
I thought it might be related to that; this might just be two different symptoms of the same underlying bug.
Comment 3 Radar WebKit Bug Importer 2023-03-21 17:14:16 PDT
<rdar://problem/107029563>
Comment 4 zalan 2023-04-14 15:22:39 PDT
Created attachment 465921 [details]
[fast-cq]Patch
Comment 5 EWS 2023-04-15 06:26:12 PDT
Committed 263001@main (13134c656ef8): <https://commits.webkit.org/263001@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 465921 [details].