Closed Bug 1620749 Opened 5 years ago Closed 5 years ago

Use ReflowChildFlags::ApplyRelativePositioning flag in ReflowFlexItem

Categories

(Core :: Layout: Flexbox, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

Details

Attachments

(1 file)

This is a followup to bug 1547759 to remove the conversion before calling FinishReflowChild() in nsFlexContainerFrame::ReflowFlexItem. Instead we should use ReflowChildFlags::ApplyRelativePositioning flag.

Currently, when using ReflowChildFlags::ApplyRelativePositioning flag in
FinishReflowChild(), we (implicitly) force the callers to pass aWM and
aPos in the same writing-mode as the reflow input, i.e. the child's
writing-mode. This results in an unintuitive LogicalPoint conversion
mContainerSize - mMetrics.PhysicalSize() in
nsBlockReflowContext::PlaceBlock().

We should allow the callers to use their preferred aWM and aPos (either
in parent's wm or child's wm), and doing the necessary conversion in
FinishReflowChild() (like we did to convert aDesiredSize from
ReflowOutput's wm to aWM).

Also, correct the documentation for aWM in ReflowChild() and
FinishReflowChild(). aWM doesn't need to be the containing frame's
writing-mode. It can be any as long as it is the writing-mode that aPos
is used.

Attachment #9131671 - Attachment description: Bug 1620749 - Use the aWM passing to FinishReflowChild() when applying relative positioning. → Bug 1620749 - Adjust FinishReflowChild()'s relative positioning conversion, to make it a writing-mode-agnostic API.
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/0d3c7f7727b4 Adjust FinishReflowChild()'s relative positioning conversion, to make it a writing-mode-agnostic API. r=dholbert
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: