Bug 1950732 - Avoid spurious shrink-wrapping for descendants of an orthogonal table-cell's inner anonymous-block frame. r=layout-reviewers,AlaskanEmily

The table cell's inner frame itself will be shrink-wrapped, but we don't want to also
shrink-wrap its descendant blocks, as that prevents them being sized or aligned properly
to fit the cell.

So instead of checking whether the frame is orthogonal to mCBReflowInput (which may
still refer to the table-cell frame, whose writing mode does not reflect the writing
mode  of its inner content), check against alignCB (the parent within which this frame
is aligned).

Differential Revision: https://phabricator.services.mozilla.com/D245148
This commit is contained in:
Jonathan Kew
2025-04-11 08:27:48 +00:00
parent 639b094272
commit 8b11a7e748
4 changed files with 1 additions and 10 deletions

View File

@@ -2400,7 +2400,7 @@ void ReflowInput::InitConstraints(
return true;
}
if (!alignCB->IsGridContainerFrame() &&
mWritingMode.IsOrthogonalTo(GetCBWritingMode())) {
mWritingMode.IsOrthogonalTo(alignCB->GetWritingMode())) {
// Shrink-wrap blocks that are orthogonal to their container (unless
// we're in a grid?)
return true;