Abspos table or start-aligned block with non-auto insets and auto margins is laid out at a huge negative position
Categories
(Core :: Layout: Positioned, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr128 | --- | unaffected |
| firefox-esr140 | --- | wontfix |
| firefox142 | --- | wontfix |
| firefox143 | --- | wontfix |
| firefox144 | --- | fixed |
People
(Reporter: Oriol, Assigned: dshin)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(2 files)
The table is not visible, it's laid out at -8947788
See https://github.com/w3c/csswg-drafts/issues/11478 for some extra context.
| Reporter | ||
Comment 1•2 months ago
|
||
Or instead of display: table, align-self: start.
Comment 2•2 months ago
|
||
:dshin, since you are the author of the regressor, bug 1920160, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Comment 3•2 months ago
|
||
Set release status flags based on info from the regressing bug 1920160
Updated•2 months ago
|
Comment 4•2 months ago
|
||
Seems worth addressing sooner rather than later since it can cause missing content... But it's probably rare in practice?
| Assignee | ||
Comment 5•2 months ago
|
||
nsTableFrame::ComputeAutoSize returns unconstrained block size no matter what. This is because for tables, desired block size is computed after its children are reflowed.
That calls down from ReflowInput::InitAbsoluteConstraints where it's soon used for computation of auto margin in block direction.
Addressing this fundamentally probably requires a lot of table work. OTOH, it's probably a good idea to constrain the computed auto sizes to the abs-cb size so the content at least doesn't get hidden like this.
Comment 6•2 months ago
|
||
But per the above it's not specific to table, right? <div style="align-self: start"> also triggers this.
Updated•2 months ago
|
| Reporter | ||
Comment 7•2 months ago
|
||
Basically any align-self different than auto, normal, stretch or center is broken.
The containing block of an abspos should be completely definite, and you resolve stretch correctly, so it's weird that you don't align correctly.
| Assignee | ||
Comment 9•2 months ago
|
||
Right. When automatic block size becomes fit-content size size, we need to defer computation of auto margins to after layout, like we already do if we specify height: fit-content.
| Reporter | ||
Comment 10•2 months ago
|
||
Wouldn't it be easier to always defer the computation of auto margins to after layout? That's how we do it in Servo.
https://github.com/servo/servo/blob/87fe202ded0fe9b0d61acda7ac81ab1714eb2389/components/layout/positioned.rs#L582-L600
| Assignee | ||
Comment 11•2 months ago
|
||
May be worth pursuing - our abs offset/margin resolution is not the easiest to reason with because of this. Though that's (Unfortunately) a sizeable refactoring that should be worked as a separate bug.
| Assignee | ||
Comment 12•2 months ago
|
||
Updated•2 months ago
|
Comment 13•2 months ago
|
||
Comment 15•2 months ago
|
||
| bugherder | ||
Updated•2 months ago
|
Comment 17•2 months ago
|
||
The patch landed in nightly and beta is affected.
:dshin, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox143towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 18•2 months ago
|
||
It's a pretty low-risk fix, but OTOH, we're pretty late into the beta phase, and I think this case (content-fit + auto margins + non-auto insets) won't be hugely common (The regressing bug 1920160 was closed 10 months ago).
Updated•2 months ago
|
Description
•