Bug 3318

Summary: REGRESSION (412+): printing of images is broken
Product: WebKit Reporter: John Sullivan <sullivan>
Component: PrintingAssignee: Darin Adler <darin>
Status: VERIFIED FIXED    
Severity: Major    
Priority: P1    
Version: 412   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
adds autorelease pools to fix the bug; also change tabs to spaces mjs: review+

John Sullivan
Reported 2005-06-07 16:11:53 PDT
To reproduce: 1. go to maps.google.com 2. search for some particular address (e.g. "Cupertino, CA") 3. Select Print from the File menu 4. click Preview (to avoid wasting paper) In the built-in Safari on Tiger (or 10.4.1), this works fine. In Safari on tip of tree, I get an error message from Preview ("File error. couldn't open the file."), and the Safari page changes to show the default maps.google.com image of the U.S.
Attachments
adds autorelease pools to fix the bug; also change tabs to spaces (11.86 KB, patch)
2005-06-12 19:49 PDT, Darin Adler
mjs: review+
John Sullivan
Comment 1 2005-06-07 16:13:02 PDT
This is also in Radar as <rdar://problem/4141569>
John Sullivan
Comment 2 2005-06-10 09:48:04 PDT
It turns out that all printing is broken, including Preview and Save as PDF. I suspect something broke in the SPI reshuffling just before we open-sourced WebKit.
John Sullivan
Comment 3 2005-06-10 15:26:04 PDT
It turns out (it sure keeps turning) that not all printing is broken, but printing of images is broken. Printing a page consisting of nothing but text and form elements works fine. Printing a page with only a single image fails (even the missing image image).
Darin Adler
Comment 4 2005-06-12 19:41:53 PDT
Turns out this is a bug due to a subtle issue with graphics contexts. If you retain a pointer to the graphics context, you break printing. And we were using autoreleased NSGraphicsContext pointers. Fix is simple.
Darin Adler
Comment 5 2005-06-12 19:49:36 PDT
Created attachment 2282 [details] adds autorelease pools to fix the bug; also change tabs to spaces This patch fixes the bug, and also changes the various tabs in this file to spaces.
Maciej Stachowiak
Comment 6 2005-06-13 02:59:16 PDT
r=me
Chris Petersen
Comment 7 2005-06-18 22:56:49 PDT
Verified with TOT WebKit (6/18) under 10.4.1. Marking Verified.
Note You need to log in before you can comment on or make changes to this bug.