Closed Bug 334760 Opened 18 years ago Closed 18 years ago

When printing an iframe using cocoa widgets: "Printer Error: An unknown error occurred while printing"

Categories

(Core :: Printing: Output, defect)

PowerPC
macOS
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: sharparrow1, Assigned: sharparrow1)

References

Details

Attachments

(2 files, 1 obsolete file)

Pretty self-explanatory.  Potential fix: in nsPresShell::CreateRenderingContext, add loop to search for the widget that stops at the root view.
Hmm, I'm rather tempted to make nsIView::CreateWidget not create a widget when there isn't a parent widget; that would be the most correct thing to do.  I'm not really prepared to deal with the regressions from that at this point, however.  I'll file a bug on that, I think, and put the hack fix in here for the moment.
Attached patch Patch (obsolete) — Splinter Review
Someone on the Mac needs to double-check that this works, but it should.  The idea is that we shouldn't make a widget if we're not going to initialize it.  I won't be able to work on Gecko for a long time after Saturday, though, so I don't really want to take responsibility for a somewhat risky change like this.
Attachment #219237 - Flags: review?(roc)
Attached patch Crash logSplinter Review
Attachment 219237 [details] [diff] causes this crash when attempting to print a page with an iframe.
Comment on attachment 219237 [details] [diff] [review]
Patch

Cancelling review.

Well, that's weird; it's not crashing in my Windows non-Cairo build.  It ought to as far as I can tell.  Oh well.  I guess we're back to adding a check to nsPresShell::CreateRenderingContext.
Attachment #219237 - Attachment is obsolete: true
Attachment #219237 - Flags: review?(roc)
Attached patch PatchSplinter Review
Sorry this took so long; I'm almost certain this will work, although someone should double-check.  Mark?
Attachment #224355 - Flags: review?(roc)
Note Bug 338904 comment 7.
Blocks: 338904
Comment on attachment 224355 [details] [diff] [review]
Patch

Hello!

I'll look at this first thing tomorrow morning.
Comment on attachment 224355 [details] [diff] [review]
Patch

Looks good to me.  What's more, it even works!
Attachment #224355 - Flags: superreview?(roc)
Attachment #224355 - Flags: superreview?(roc)
Attachment #224355 - Flags: superreview+
Attachment #224355 - Flags: review?(roc)
Attachment #224355 - Flags: review+
Checked in.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: