Closed Bug 2009647 Opened 9 months ago Closed 7 months ago

Add measuring reflow in printing scenario for fragmentainer-aware abspos positioning

Categories

(Core :: Layout: Positioned, task)

task

Tracking

()

RESOLVED FIXED
150 Branch
Tracking Status
firefox150 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

(Blocks 1 open bug)

Details

(Whiteboard: [anchorpositioning:2026])

Attachments

(2 files)

Bug 1994346 added measuring reflow logic in nsColumnSetFrame to compute the unfragmented positions of absolutely positioned descendants in multicol contexts. This is needed for fragmentainer-aware positioning to determine whether an abspos first-in-flow needs to be pushed to the next fragmentainer continuation.

We need similar logic for printing scenario, which may be added in PageSequenceFrame::Reflow().

Blocks: 2002115
Whiteboard: [anchorpositioning:triage]
Whiteboard: [anchorpositioning:triage] → [anchorpositioning:2026]
Depends on: 2016959

This renames the measuring reflow flag to use "fragmentainer" terminology,
making it applicable to both multicol and printing contexts. This doesn't change
behavior.

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED

This extends the measuring reflow mechanism from multicol (Bug 1994346) to
printing scenarios. When absolutely positioned elements exists, we now perform
an initial measuring reflow with an unconstrained page height to compute
unfragmented positions, sizes, etc.

Each frame type (nsPageSequenceFrame, nsPageFrame, PrintedSheetFrame,
nsPageContentFrame) has their own logic to calculate the available size for its
child, and they do not derived the size its own reflow input's available size.
To avoid substantial refactoring, this patch checks
mIsInFragmentainerMeasuringReflow and overrides the available block-size to
unconstrained when running a measuring reflow.

Duplicate of this bug: 2016960
Pushed by aethanyc@gmail.com: https://github.com/mozilla-firefox/firefox/commit/04b46f1dcc7d https://hg.mozilla.org/integration/autoland/rev/5c6ab63f61dd Part 1 - Rename mIsInColumnMeasuringReflow to mIsInFragmentainerMeasuringReflow. r=layout-reviewers,dshin https://github.com/mozilla-firefox/firefox/commit/19124a708fc4 https://hg.mozilla.org/integration/autoland/rev/94b404c5c152 Part 2 - Add measuring reflow in printing scenarios for fragmentainer-aware abspos positioning. r=layout-reviewers,dshin
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch
QA Whiteboard: [qa-triage-done-c151/b150]
Regressions: 2055723
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: