Closed Bug 1954762 Opened 7 months ago Closed 7 months ago

Reflow orthogonal child frame during nsLayoutUtils::IntrinsicForAxis if its intrinsic block size is needed

Categories

(Core :: Layout, defect)

defect

Tracking

()

RESOLVED FIXED
139 Branch
Tracking Status
firefox139 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

(Whiteboard: [writing-modes:m1])

Attachments

(2 files)

With the improved support for orthogonal flow sizing implemented in bug 1949064, I think it will now be feasible for us to reflow orthogonal child frames when needed during IntrinsicForAxis, so that we can get a valid block size rather than using a potentially uninitialized or stale value.

Blocks: 1955008
Blocks: 1955921
Whiteboard: [writing-modes:m1]

It turns out that since bug 1949064 fixed the available-size computation for orthogonal flows, this becomes quite simple: we can do a "measuring reflow" of an orthogonal child by setting up a dummy parent ReflowInput (similar to what Grid code does), and using the resulting desired size of the child.

This resolves a large number of the existing test failures related to orthogonal flows. (This includes a couple that are part of interop-2025, but also dozens of other WPT writing-modes tests.)

Once this is landed, we should revisit any real-world examples in existing reports (bug 1955008) to check if they are adequately resolved, and investigate whether there are cases where the "dummy" parent RI is insufficient and a "real" ancestor RI is needed for context (bug 1955921).

This reflows the child frame using a "dummy" parent ReflowInput, and does not provide
a valid containing block. This means proper positioning of the child would not be
possible in vertical-rl writing mode; but we don't apply positioning here, as we only
care about its desired size and don't actually update the child's mRect (we don't call
FinishReflowChild or equivalent), so this is OK.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5406da763b22 If nsLayoutUtils::IntrinsicForAxis needs the intrinsic block-size of an orthogonal child frame, do an immediate measuring reflow to get its desired size. r=layout-reviewers,emilio,TYLin https://hg.mozilla.org/integration/autoland/rev/edb5a7edfcde Remove failure metadata for WPT tests that now pass. r=TYLin
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch
See Also: → 1949148
See Also: → 1950758
Duplicate of this bug: 1949149
Duplicate of this bug: 1917399
QA Whiteboard: [qa-triage-done-c140/b139]
Duplicate of this bug: 1166120
Duplicate of this bug: 1272181
Regressions: 1972149
No longer regressions: 1972149
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: