Closed
Bug 789507
Opened 13 years ago
Closed 13 years ago
Printing doesn't work and the tab hangs if mozPrintCallback doesn't call done()
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: spammaaja, Assigned: bdahl)
References
(Blocks 1 open bug)
Details
(Whiteboard: [qa?])
Attachments
(2 files, 2 obsolete files)
|
732 bytes,
text/html
|
Details | |
|
6.09 KB,
patch
|
bdahl
:
review+
|
Details | Diff | Splinter Review |
If mozPrintCallback is used, there will just be an infinite progress bar when printing. If you click cancel and attempt to print again, you get a "Printer Error - Not available" messagebox. The print preview window cannot be closed with the close button.
The tab also hangs: the url bar, back button, refresh button etc. stop working.
Error console says:
Error: TypeError: ctx.fillRect is not a function
Attachment #659284 -
Attachment mime type: text/plain → text/html
| Assignee | ||
Comment 1•13 years ago
|
||
That's a bad example, but yes we need to handle the case when the mozPrintCallback never calls done() to signal that it is done.
Attachment #659284 -
Attachment description: mozPrintCallback example https://gist.github.com/2230187 → mozPrintCallback example from https://gist.github.com/2230187
Summary: Printing doesn't work and the tab hangs if mozPrintCallback is used → Printing doesn't work and the tab hangs if mozPrintCallback doesn't call done()
| Assignee | ||
Comment 3•13 years ago
|
||
Attachment #665609 -
Flags: review?(bugs)
| Comment hidden (obsolete) |
| Assignee | ||
Comment 5•13 years ago
|
||
Addresses comments from irc:
- comment on what calls notify
- reset watchdog counter only from mozPrintCallback
- cleanup on destroy instead of failure
Attachment #665609 -
Attachment is obsolete: true
Attachment #666036 -
Flags: review?(bugs)
Updated•13 years ago
|
Comment 6•13 years ago
|
||
Comment on attachment 666036 [details] [diff] [review]
mozPrintCallback watch dog v2
> nsPagePrintTimer::Notify(nsITimer *timer)
> {
>+ // When finished there still may be pending notifications just ignore them.
Something like
When finished there may be still pending notifications, which we can just ignore.
this is not pretty, but we can improve the situation in FF19.
And hopefully there will be some more ideas in whatwg mailing list.
Attachment #666036 -
Flags: review?(bugs) → review+
| Assignee | ||
Comment 7•13 years ago
|
||
Comment update. Carrying forward r+
Attachment #666036 -
Attachment is obsolete: true
Attachment #667057 -
Flags: review+
| Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
Comment 8•13 years ago
|
||
Pushed to Try.
https://tbpl.mozilla.org/?tree=Try&rev=70bffe879810
Assignee: nobody → bdahl
Comment 9•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/fe034183d766
Should this have a test?
Flags: in-testsuite?
Keywords: checkin-needed
Comment 10•13 years ago
|
||
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
status-firefox18:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
| Assignee | ||
Comment 11•13 years ago
|
||
(In reply to Ryan VanderMeulen from comment #9)
> https://hg.mozilla.org/integration/mozilla-inbound/rev/fe034183d766
>
> Should this have a test?
It ideally would, but there currently isn't an easy way to test the print engine.
Comment 12•13 years ago
|
||
There are ways to test print preview, and indeed this should have a test.
Comment 13•13 years ago
|
||
While using the attachment I could reproduce the issue on 2012-09-07 Nightly
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/18.0 Firefox/18.0
Build ID: 20120907030554
Tested on Firefox 18.0 beta 2 whit the same attachment
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0
Build ID: 20121128060531
a message of "An unknown error occurred while printing" while the printing bar was in progress.
I clicked "Ok" and started a new print job. While printing bar was in progress, I clicked on "Cancel". A "Not available" message appears and after a few seconds, the other message of "An unknown error occurred while printing" appeared.
Same behavior in Latest Nightly
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20121204 Firefox/20.0
Build ID: 20121204030754
Updated•13 years ago
|
Whiteboard: [qa?]
You need to log in
before you can comment on or make changes to this bug.
Description
•