Open Bug 1699837 Opened 2 months ago Updated 6 days ago

Remote frames are zoomed in or out when printing to PDF

Categories

(Core :: Printing: Output, defect, P3)

defect

Tracking

()

Fission Milestone M7a
Tracking Status
firefox-esr78 --- disabled
firefox86 --- disabled
firefox87 --- disabled
firefox88 --- affected

People

(Reporter: jdescottes, Assigned: emilio)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

I mentioned this in Bug 1695806, but I think it's worth filing a separate bug to make sure this gets properly triaged.

STRs:

ER: The content of the remote frame should look the same as without fission
AR: The content of the remote frame is zoomed out

Fission Milestone: --- → M7a
Flags: needinfo?(emilio)

When I print the same page as PDF with Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:88.0) Gecko/20100101 Firefox/88.0 ID:20210312033752 the remote frames content is zoomed in. So maybe it's system / platform dependent what actually happens?

Summary: Remote frames are zoomed out when printing to PDF → Remote frames are zoomed in or out when printing to PDF

So I dug into this a bit and I'm pretty sure that this is due to the various page scales etc not applying to the remote iframe. So somewhat a Graphics issue.

This is very visible on a test-case like this. The red area should always be half of the content area, but it is scaled up because we don't seem to account for the page scale transform that shrinks the iframe.

Tim, do you happen to know how do we compute effective scales for remote content like this?

Flags: needinfo?(emilio) → needinfo?(tnikkel)

For non-wr I think we send the scale to the child here

https://searchfox.org/mozilla-central/rev/36f79bed679ad7ec46f7cd05868a8f6dc823e1be/layout/generic/nsSubDocumentFrame.cpp#1290

and we use that value in the child here

https://searchfox.org/mozilla-central/rev/36f79bed679ad7ec46f7cd05868a8f6dc823e1be/layout/painting/nsDisplayList.cpp#2326

For wr I'm not sure how it works, the corresponding wr call to AddEffectUpdate just sends a unit scale. So maybe when wr rasterizes in the gpu/parent proc it assembles the wr display list and has all the info it needs that way?

Flags: needinfo?(tnikkel)
Depends on: 1700379
Blocks: gfx-triage
Assignee: nobody → emilio
Severity: -- → S3
Priority: -- → P3

Looks like layout folks have this one.

No longer blocks: gfx-triage

Emilio, gentle reminder about this M7a issue assigned to you. :)

Flags: needinfo?(emilio)
Depends on: 1709062

Yup, I was blocked on some snapping issues, but bug 1709062 allows me to dig into them and fix them.

Flags: needinfo?(emilio)
Blocks: 1710059
No longer blocks: 1710059
Depends on: 1710059
You need to log in before you can comment on or make changes to this bug.