Refactor containing block size calculation in ReflowAbsoluteFrame()
Categories
(Core :: Layout: Positioned, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox150 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
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().
| Assignee | ||
Comment 1•7 months ago
|
||
The lambda that was previously in ReflowAbsoluteFrame() was extracted into ComputeContainingBlock() [1] by Bug 1991489, and we now store the unfragmented containing block and use it when needed [2].
At this point, I'm inclined to remove the comment at [3]. We can always file a targeted bug later if necessary.
[1] https://searchfox.org/firefox-main/rev/2d123ef3d530f3ae52f03978fbb9fe51af44bb5e/layout/generic/AbsoluteContainingBlock.cpp#502
[2] https://searchfox.org/firefox-main/rev/2d123ef3d530f3ae52f03978fbb9fe51af44bb5e/layout/generic/AbsoluteContainingBlock.cpp#614-631
[3] https://searchfox.org/firefox-main/rev/2d123ef3d530f3ae52f03978fbb9fe51af44bb5e/layout/generic/AbsoluteContainingBlock.cpp#741-742
| Assignee | ||
Comment 2•7 months ago
|
||
See bug 2009643 comment 1 for the rationale for removing this comment.
Updated•7 months ago
|
Updated•6 months ago
|
Description
•