Still possible to get infinitely-sized tables as flex items where it previously wasn't (with flex container, table-layout:fixed, and percent width)
Categories
(Core :: Layout: Flexbox, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr52 | --- | unaffected |
| firefox-esr60 | --- | unaffected |
| firefox-esr78 | --- | wontfix |
| firefox-esr91 | --- | wontfix |
| firefox60 | --- | unaffected |
| firefox61 | --- | wontfix |
| firefox62 | + | wontfix |
| firefox63 | - | wontfix |
| firefox64 | --- | wontfix |
| firefox65 | --- | wontfix |
| firefox91 | --- | wontfix |
| firefox92 | --- | wontfix |
| firefox93 | --- | fixed |
People
(Reporter: dholbert, Assigned: TYLin)
References
(Regressed 2 open bugs)
Details
(Keywords: regression)
Attachments
(10 files)
|
650 bytes,
text/html
|
Details | |
|
211.10 KB,
text/html
|
Details | |
|
211.09 KB,
text/html
|
Details | |
|
2.85 KB,
text/html
|
Details | |
|
394.21 KB,
image/png
|
Details | |
|
531.79 KB,
image/png
|
Details | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
2.90 KB,
text/html
|
Details | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
| Reporter | ||
Comment 1•7 years ago
|
||
| Reporter | ||
Updated•7 years ago
|
| Reporter | ||
Comment 2•7 years ago
|
||
| Reporter | ||
Comment 3•7 years ago
|
||
| Reporter | ||
Comment 4•7 years ago
|
||
| Reporter | ||
Comment 5•7 years ago
|
||
Comment 6•7 years ago
|
||
| Reporter | ||
Comment 7•7 years ago
|
||
Updated•7 years ago
|
| Reporter | ||
Comment 8•7 years ago
|
||
Comment 9•7 years ago
|
||
| Reporter | ||
Comment 10•7 years ago
|
||
| Reporter | ||
Comment 11•7 years ago
|
||
| Reporter | ||
Comment 12•7 years ago
|
||
Comment 13•7 years ago
|
||
Comment 14•7 years ago
|
||
Comment 15•7 years ago
|
||
Comment 16•7 years ago
|
||
| Reporter | ||
Comment 17•7 years ago
|
||
Comment 18•7 years ago
|
||
| Reporter | ||
Comment 19•7 years ago
|
||
Updated•7 years ago
|
Comment 20•7 years ago
|
||
| Reporter | ||
Comment 21•7 years ago
|
||
Comment 22•7 years ago
|
||
Updated•7 years ago
|
Comment 23•7 years ago
|
||
| Reporter | ||
Updated•5 years ago
|
Comment 24•5 years ago
|
||
Comment 25•5 years ago
|
||
Comment 26•5 years ago
|
||
I found known-affected site.
It is https://payroll.jobcan.jp/ 給与明細(pay advice).
It's a site that requires you to login.
I'm new to this, and I don't know how to report this.
Sorry it's too simple.
In the meantime, I'm attaching a screenshot with Firefox and Chromium.
I've confirmed that it reproduces the problem with nightly.
| Assignee | ||
Comment 27•5 years ago
•
|
||
Re comment 17:
So: the next-best option I can think of to address the fundamental issue here is to use an int64_t (with its larger coordinate space) for tracking the flex container's space-to-be-distributed (which is hugely negative value in this case). This might actually make for more robust results in general, so I'm tempted to do this.
Do you feel it's worth adding an int64_t strong coordinate type for the above usage? It can also serve the purpose to explore bug 1602669 as its APIs should be similar to strong type nscoord.
| Reporter | ||
Comment 28•5 years ago
|
||
Yeah, that seems worth doing (whether via a strong coordinate type or just a typedef -- given that this is relatively localized, I don't have strong feelings & would be fine with either).
| Reporter | ||
Updated•5 years ago
|
| Assignee | ||
Updated•5 years ago
|
Comment 29•5 years ago
|
||
FYI: we are running into "table-layout:fixed;width:100%" issues with Flex/Grid when trying to ship TablesNG in Chrome.
Our test of what we believe is correct behavior is:
wpt/css/css-tables/tentative/table-fixed-minmax.html
Basically:
"table-layout:fixed; width:X%" is a table intrinsic width algorithm exception that reports infinitely wide intrinsic table width.
This works well in block layout, but not if container is flex/grid.
We believe that not doing the exception when inside flex/grid works well, and are trying to ship this in TablesNG.
This is similar to what table layout algorithm does when considering TD's percentages when computing table grid width.
TD's percentages are ignored when computing intrinsic width.
The only difference between TD fix, and table:100% fix is that TD fix applies inside Flex/Grid/Cell, while table:100% fix applies inside Flex/Grid only.
Chrome's code implementing this fix:
https://chromium-review.googlesource.com/c/chromium/src/+/2718436
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Updated•5 years ago
|
Comment 31•4 years ago
|
||
FYI: In Chrome, the function that determines whether infinite table sizes are allowed is NGTableNode::AllowColumnPercentages
None of this is specified, just leaving it here if you are interested for compatibility reasons.
| Reporter | ||
Comment 32•4 years ago
|
||
Thanks! We may need to draw inspiration from that. (I'm not actively working on this at the moment, though.)
| Assignee | ||
Comment 33•4 years ago
|
||
The precision of double is needed when we are distributing large
sizeDelta via availableFreeSpace * myShareOfRemainingSpace.
Without this patch, the wpt test added in Part 2 will fail.
Depends on D123266
| Assignee | ||
Comment 34•4 years ago
|
||
The wpt testcase is adapted from bug 1469649 comment 12.
Depends on D123267
| Reporter | ||
Comment 35•4 years ago
|
||
| Reporter | ||
Updated•4 years ago
|
| Reporter | ||
Comment 36•4 years ago
|
||
My just-attached "testcase 4" (with flex-shrink:0) has infinitely-sized tables even with the attached patch stack. But it's also infinite in Chrome, so maybe that's interoperable... I had suspected from Aleks's comment that maybe it would be not-infinite in Chrome, but maybe I misunderstood.
Aleks, was your patch meant to address cases like testcase 4? (I thought you intended to constrain the resolved flex base size of flex items with these tables to be non-infinite, but maybe not.)
Just want to be sure we end up resolving this bug in a compatible way. It seems like the current patch does, but I want to be sure I'm not missing something.
Comment 37•4 years ago
|
||
dgrogan is the flex<->table sizing expert, my knowledge of flex is limited.
I am cc'ing him on this bug, see if he can explain this test case.
The infinitely sized table is surprising to me, it might a bug in Chrome too.
| Reporter | ||
Comment 38•4 years ago
|
||
I suspect testcase 4 is huge (in both Firefox and Chromium) for the same reason that a similar no-flexbox testcase is huge, with a display:block;width:max-content wrapper instead of a flex-item wrapper): https://jsfiddle.net/dholbert/4gkm05cr/
| Assignee | ||
Comment 39•4 years ago
|
||
The assertion is testing the sign of availableFreeSpace and isUsingFlexGrow.
After we use 64-bit arithmetic, it's likely the stronger assertion holds.
Depends on D123268
| Assignee | ||
Comment 40•4 years ago
|
||
Testcase 4 is similar to the test I attached in bug 1184430 comment 2 :)
| Reporter | ||
Updated•4 years ago
|
Comment 42•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/be6f1ddbc743
https://hg.mozilla.org/mozilla-central/rev/f0b07571b559
https://hg.mozilla.org/mozilla-central/rev/abdafabdceec
Updated•4 years ago
|
Comment 44•4 years ago
•
|
||
This looks a bit similar https://github.com/webcompat/web-bugs/issues/92046
but it should not. it has been fixed.
Comment 45•4 years ago
|
||
https://github.com/webcompat/web-bugs/issues/92046 looks like it is triggered by "table intrinsic size is infinitely wide inside flexbox" issue.
I've looked into it, and I do not think it is just the table. There are also deeply nested sibling flexboxes, and if they are removed, table looks fine.
Description
•