Image not visible when printing from iframe with srcdoc
Categories
(Core :: Printing: Output, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox90 | --- | fixed |
People
(Reporter: vrichter, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(3 files)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0
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="/image.png">">. 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. In the print-preview, the image is not shown. The print process completes successfully. However, the result (using "Save to PDF ") appears to be missing the image.
Expected results:
The print-preview and resulting pdf should contain the image referenced in the iframe.
This works with my versions of chromium-browser, microsoft-edge & opera.
Such a problem was previously reported and fixed in
https://bugzilla.mozilla.org/show_bug.cgi?id=1345588
Comment 3•5 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Printing: Output' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
| Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
| Assignee | ||
Comment 4•5 years ago
|
||
So that we correctly avoid choosing about:srcdoc as a base URI.
Comment 7•5 years ago
|
||
| bugherder | ||
Updated•5 years ago
|
Hi,
I still can reproduce the error with my user agent.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0
| Assignee | ||
Comment 10•4 years ago
|
||
Ah, my patch fixed the image when printing the top-level page, not when printing the iframe itself via window.print(). Let's fix that in a separate bug, so that tracking it isn't confusing.
Description
•