Table as flex item has different width after bug 1689045
Categories
(Core :: Layout: Flexbox, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox87 | --- | fixed |
People
(Reporter: TYLin, Assigned: dholbert)
Details
Attachments
(2 files)
This is a reduced testcase of bug 1689045.
Reporter | ||
Comment 1•4 years ago
|
||
It looks like before bug 1689045, we ignore the flex-grow
property on <table>
, and the flex container grows its width anyway. I feel our current behavior is correct and the rendering matches Google Chrome's. Thunderbird (Bug 1689045) may depend on the wrong behavior of Firefox.
Daniel, what do you think?
Assignee | ||
Comment 2•4 years ago
|
||
(In reply to Ting-Yu Lin [:TYLin] (UTC-8) from comment #1)
It looks like before bug 1689045, we ignore the
flex-grow
property on<table>
Strictly speaking, that's probably not what was happening under the hood -- it's unlikely that we were actually ignoring flex-grow:0
, since it defaults to 0 (so ignoring it would still leave you with 0).
I'll bet that really this had to do with how we were measuring the table's content-width (to resolve the default flex-basis:auto;width:auto
into a width). We were probably doing this in such a way that was allowing the td
's 100% width to resolve against the flex container's explicitly-specified width, or something like that.
In any case: I think the expectation here is that <table>
and <table style="width:max-content>
should render the same as flex items. It seems they didn't used to do so, but they do now (and that's brought us into compat with Chrome on the attached testcase). So I think you're right that this is a step towards correctness, and Thunderbird was just accidentally depending on a Gecko bug before.
So I don't think there are any code changes to make here. I've got an idea for a reftest locally that I'll post as a patch for review from you, though, to be sure we don't regress this.
Assignee | ||
Comment 3•4 years ago
|
||
Chrome and Safari fail this WPT because they mishandle the max-content sizing
in the reference case. That's tracked in these bugs:
https://bugs.chromium.org/p/chromium/issues/detail?id=1172498
https://bugs.webkit.org/show_bug.cgi?id=221165
Updated•4 years ago
|
Comment 9•4 years ago
|
||
The push was wrongfully backed out. It was relanded: https://hg.mozilla.org/integration/autoland/rev/0acd315f0a70
Assignee | ||
Comment 10•4 years ago
|
||
Thanks!
Comment 11•4 years ago
|
||
bugherder |
Description
•