Bug 3318 - REGRESSION (412+): printing of images is broken
Summary: REGRESSION (412+): printing of images is broken
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Printing (show other bugs)
Version: 412
Hardware: Mac OS X 10.4
: P1 Major
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-07 16:11 PDT by John Sullivan
Modified: 2005-06-18 22:56 PDT (History)
0 users

See Also:


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+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Sullivan 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.
Comment 1 John Sullivan 2005-06-07 16:13:02 PDT
This is also in Radar as <rdar://problem/4141569>
Comment 2 John Sullivan 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.
Comment 3 John Sullivan 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).
Comment 4 Darin Adler 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.
Comment 5 Darin Adler 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.
Comment 6 Maciej Stachowiak 2005-06-13 02:59:16 PDT
r=me
Comment 7 Chris Petersen 2005-06-18 22:56:49 PDT
Verified with TOT WebKit (6/18) under 10.4.1. Marking Verified.