Closed Bug 1345588 Opened 8 years ago Closed 7 years ago

Image not visible when printing from iframe with srcdoc

Categories

(Core :: Printing: Output, defect)

53 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: alex, Assigned: fatseng, NeedInfo)

References

Details

(Keywords: testcase)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0 Build ID: 20170306004003 Steps to reproduce: I create an iframe with a srcdoc set as single image element. The img element's src is set to a path that doesn't have the domain name. So something like `<iframe srcdoc="<img src=&quot;/image.png&quot;>">`. I then get a reference to the iframe and try to print its contents with `myiframe.contentWindow.print()`. Actual results: In the browser, the image is visible within the iframe. The print process completes successfully. However, the result (using "Microsoft Print to PDF") appears to be missing the image. The print artifacts I'd expect in the margin are there (like it says about:srcdoc in the top right corner, page 1/1, etc), but the document itself appears to be completely empty. If the path *isn't* relative (eg `src=&quot;/http://127.0.0.1/image.png&quot;`) the iframe looks identical in the browser but the image actually shows up in the result. Also, if the body of the srcdoc has some text in addition to the image with the relative path, the text shows up but the image does not. Expected results: The image should be visible in the resulting pdf.
Product: Firefox → Core
Summary: Image not visible when printing from iframe w/ srcdoc → Image not visible when printing from iframe with srcdoc
Attached image firefox.jpg
Attached file 1345588.html
Component: Untriaged → Printing: Output
Keywords: testcase
Assignee: nobody → fatseng
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
It works fine on FF 55.0.2 and nightly, seemed to be fixed.
Assignee: fatseng → nobody
Status: ASSIGNED → NEW
Assignee: nobody → fatseng
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED

Im am getting the behaviour described in the original bug-report with the original reproduction files. Ist this a regression?

My setup:
Firefox 88.0.1 (64-bit)
OS: Ubunt 20.04
Kernel: 5.8.0-50-generic

Please file a new bug.

Flags: needinfo?(vrichter)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: