Closed Bug 767593 Opened 8 years ago Closed 6 years ago

"Already have an undisplayed context entry for aContent" when printing


(Core :: Layout, defect)

Not set





(Reporter: jruderman, Assigned: mats)


(Blocks 1 open bug)


(Keywords: assertion, testcase)


(4 files, 1 obsolete file)

Attached file testcase (print me)
Printing the testcase (e.g. to PDF) triggers:

###!!! ASSERTION: Already have an undisplayed context entry for aContent: '!GetUndisplayedContent(aContent)', file layout/base/nsFrameManager.cpp, line 338
Attached file stack trace
Attached file testcase 2 (print me)
This one triggers an additional assertion:

###!!! ASSERTION: node in map twice: 'Not Reached', file layout/base/nsFrameManager.cpp, line 1911
The issue is that replicated fixed frames, which are only generated in paginated mode, might contain undisplayed content. Also, the fact that attachment 635934 [details] doesn't generate the warning attachment 635956 [details] generates is due to a slight flaw in nsFrameManagerBase::UndisplayedMap::AppendNodeFor, which is fixed in this patch.

It might or might not be a clearer solution just to remove all the use of mUndisplayedItems/mUndisplayedMap map in pagination mode though perhaps that should be a followup bug. However, I am not sure whether eContext_PageLayout needs it.

I also bumped into bug 485893. I might talk a look into that later.
Assignee: nobody → kennyluck
Attachment #636246 - Flags: review?(bzbarsky)
Wouldn't it be better to skip calls to SetUndisplayedContent when aState.mCreatingExtraFrames?
In the patch description, "dumplicated" is either a typo or a sad relationship status.
(In reply to Jesse Ruderman from comment #5)
> In the patch description, "dumplicated" is either a typo or a sad
> relationship status.

It's "duplicated" :p

I plan to do study a bit more and do Comment 4, but I probably wouldn't have the chance to do that by the weekend.
Attachment #636246 - Flags: review?(bzbarsky)
Attached patch fix+testsSplinter Review
Is this is what you suggested in comment 4?
Attachment #636246 - Attachment is obsolete: true
Attachment #8456833 - Flags: review?(bzbarsky)
Comment on attachment 8456833 [details] [diff] [review]

Yep, that works.  Thanks!
Attachment #8456833 - Flags: review?(bzbarsky) → review+
Assignee: kennyluck → mats
Flags: in-testsuite+
OS: Linux → All
Hardware: x86_64 → All
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.