Closed Bug 1758757 Opened 2 years ago Closed 2 years ago

Remove two ReflowInput::ApplyRelativePositioning methods that require ReflowInput instance

Categories

(Core :: Layout, task)

task

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Almost all frame containers who need to place its children in relative positioning use the static ApplyRelativePositioning methods. For the two methods that require ReflowInput instance, the physical-coordinate one [1] is unused, and the logical one [2] is used only by nsTableRowGroupFrame [3].

Let's convert [3] to call [2] instead, and remove [1] and [2] to reduce the API variants from 4 down to 2.

[1] https://searchfox.org/mozilla-central/rev/eeeba8183d3268e0d563c2becf9f4adc21a37368/layout/generic/ReflowInput.h#857-859
[2] https://searchfox.org/mozilla-central/rev/eeeba8183d3268e0d563c2becf9f4adc21a37368/layout/generic/ReflowInput.h#866-871
[3] https://searchfox.org/mozilla-central/rev/eeeba8183d3268e0d563c2becf9f4adc21a37368/layout/tables/nsTableRowGroupFrame.cpp#933-934

See bug 1758757 comment 0 for the rationale.

Note: the old code in nsTableRowGroupFrame::SlideChild() is bogus because it
calls ApplyRelativePositioning() via the nsTableRowGroupFrame's ReflowInput
instance. That is, it applies relative positioning to nsTableRowGroupFrame, but
not to the aKidFrame (nsTableRowFrame).

While I'm here, I expand SlideChild in its only caller, and simplify it.

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
Blocks: 1776769
Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/ae2c08e94765
Remove two ReflowInput::ApplyRelativePositioning methods that require ReflowInput instance. r=emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: