Closed Bug 1771677 Opened 4 years ago Closed 8 months ago

Printing with multiple fixed-pos elements triggers "ASSERTION: Primary child list can have at most one frame in it: 'aListID != kPrincipalList || aChildList.IsEmpty() || aChildList.OnlyChild()', file layout/generic/nsCanvasFrame.cpp:265"

Categories

(Core :: Printing: Output, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 482886

People

(Reporter: dholbert, Unassigned)

Details

(Keywords: assertion)

Attachments

(1 file)

STR:

  1. Print-preview (or print) the attached testcase in a debug build.
  2. Check your terminal for assertions.

ACTUAL RESULTS:
This assertion gets spammed when we reflow for the print/print-preview layout:

ASSERTION: Primary child list can have at most one frame in it: 'aListID != kPrincipalList || aChildList.IsEmpty() || aChildList.OnlyChild()', file layout/generic/nsCanvasFrame.cpp:265

EXPECTED RESULTS:
No assertion.

This seems to happen for any document that has multiple fixed-position frames and multiple pages. nsCSSFrameConstructor::ReplicateFixedFrames gets called for the second page, which calls canvasFrame->SetInitialChildList(kPrincipalList, fixedPlaceholders); at the very end, which trips over this assertion (since we're passing in a principal child-list with multiple placeholder-frames).

Attached file testcase 1 —
Type: task → defect

Note, this bug reproduces when you print-preview about:home (i.e. the default new-tab page), probably because it has several fixed-position elements, making it sufficiently similar to the reduced testcase.

Status: NEW → RESOLVED
Closed: 8 months ago
Duplicate of bug: 482886
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: