Closed Bug 767593 Opened 12 years ago Closed 10 years ago

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

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: jruderman, Assigned: MatsPalmgren_bugz)

References

Details

(Keywords: assertion, testcase)

Attachments

(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
Status: NEW → ASSIGNED
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?

https://tbpl.mozilla.org/?tree=Try&rev=b6f73670c85f
https://tbpl.mozilla.org/?tree=Try&rev=c0c592796ab7
Attachment #636246 - Attachment is obsolete: true
Attachment #8456833 - Flags: review?(bzbarsky)
Comment on attachment 8456833 [details] [diff] [review]
fix+tests

Yep, that works.  Thanks!
Attachment #8456833 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/e280e3ce940b
Assignee: kennyluck → mats
Flags: in-testsuite+
OS: Linux → All
Hardware: x86_64 → All
https://hg.mozilla.org/mozilla-central/rev/e280e3ce940b
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: