Bug 7702

Summary: CSS background images don't print properly, they are shifted down
Product: WebKit Reporter: John Sullivan <sullivan>
Component: PrintingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: oliver, shc
Priority: P2 Keywords: InRadar
Version: 412   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
zip archive containing HTML file and PNG none

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.