Bug 7702 - CSS background images don't print properly, they are shifted down
Summary: CSS background images don't print properly, they are shifted down
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Printing (show other bugs)
Version: 412
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2006-03-10 11:23 PST by John Sullivan
Modified: 2008-07-19 23:39 PDT (History)
2 users (show)

See Also:


Attachments
zip archive containing HTML file and PNG (1.25 KB, application/zip)
2006-03-10 11:25 PST, John Sullivan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Sullivan 2006-03-10 11:23:41 PST
This bug is also in Radar as <rdar://4469664>

* SUMMARY
When viewing a page in Safari which contains a background image defined by CSS, the images appears correctly on screen, but shifted up/down from its original position in print preview.

* STEPS TO REPRODUCE
1. Download the attached HTML and PNG.
2. Open bug.html in Safari.  You should see a table with 2 cells: the top one has a background image.
3. File > Print...
4. Choose the "Safari" printer options in the Print dialog.
5. Make sure that "Print backgrounds" is checked.
6. Click "Preview".

* RESULTS
In comparing the Safari screen with the print preview, notice that the background image behind "foo" has been shifted down roughly 7 pixels.  The print preview should look exactly like the screen (with the exception of page headers/footers).

* REGRESSION
I noticed this while trying to develop a print CSS for an existing page.  I added the background image to give the table's head cells visual contrast from the rest of its cells.  I tried specifying the background image position with no luck.  I build a stripped-down web page and style to isolate the problem.  I have attached that bare-bones file to this bug and used it to demonstrate the problem.
Comment 1 John Sullivan 2006-03-10 11:25:33 PST
Created attachment 6990 [details]
zip archive containing HTML file and PNG

Here is the test case mentioned in the bug description.