Open Bug 2009643 Opened 2 days ago Updated 2 days ago

Refactor containing block size calculation in ReflowAbsoluteFrame()

Categories

(Core :: Layout: Positioned, task)

task

Tracking

()

People

(Reporter: TYLin, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Bug 1994346 introduces a logic in AbsoluteContainingBlock::Reflow() to compute cbSize for checking whether a first-in-flow needs to be pushed to the next fragmentainer. It currently uses:

const LogicalSize cbSize(containerWM, aContainingBlock.Size());

However, in AbsoluteContainingBlock::ReflowAbsoluteFrame() [1], there's a lambda that computes the containing block rect with various adjustments for anchor-positioning, grid container, and viewport frame. We should refactor the lambda in ReflowAbsoluteFrame() into a helper method and call it from both places to ensure consistent containing block size calculations. Or we could compute the containing block size in Reflow() and pass it into ReflowAbsoluteFrame().

[1] https://searchfox.org/firefox-main/rev/874c5779b2429acf0844c956bb72c529a2047b01/layout/generic/AbsoluteContainingBlock.cpp#1325-1405

Blocks: 1994316
You need to log in before you can comment on or make changes to this bug.