Closed Bug 1724901 Opened 4 months ago Closed 3 months ago

images/svg in oopif are painted as if resolution of ancestor documents is 1

Categories

(Core :: Web Painting, defect)

defect

Tracking

()

RESOLVED FIXED
93 Branch
Fission Milestone MVP
Tracking Status
firefox-esr78 --- disabled
firefox-esr91 --- disabled
firefox91 --- disabled
firefox92 --- disabled
firefox93 --- fixed

People

(Reporter: tnikkel, Assigned: tnikkel)

References

Details

Attachments

(2 files)

If we have something that is rasterized in the child process it knows nothing about any resolution (from pinch zooming or css transforms) in any ancestor document.

This is a webrender only problem. Although we don't plan to use non-wr with fission this works with non-wr because of these two code sites

where send the scale:
https://searchfox.org/mozilla-central/rev/0fec57c05d3996cc00c55a66f20dd5793a9bfb5d/layout/generic/nsSubDocumentFrame.cpp#1316

where we use that scale:
https://searchfox.org/mozilla-central/rev/0fec57c05d3996cc00c55a66f20dd5793a9bfb5d/layout/painting/nsDisplayList.cpp#2419

The equivalent code for webrender is

where we should be sending the scale (sends 1 for scale):
https://searchfox.org/mozilla-central/rev/0fec57c05d3996cc00c55a66f20dd5793a9bfb5d/layout/generic/nsSubDocumentFrame.cpp#1415

and we never use the scale with webrender.

For most content this is not a problem because webrender rasterizes it in the parent/gpu process after it has assembled the oopif webrender display list into the ancestor documents webrender displaylist so it knows the transform because it's all in one tree at that point. But that doesn't work if the child process is responsible for rasterizing the content (or sending the right sized image).

Fission Milestone: --- → ?

(In reply to Timothy Nikkel (:tnikkel) from comment #0)

where we should be sending the scale (sends 1 for scale):
https://searchfox.org/mozilla-central/rev/0fec57c05d3996cc00c55a66f20dd5793a9bfb5d/layout/generic/nsSubDocumentFrame.cpp#1415

Bug 1724904 fixes this part.

Depends on: 1724904
See Also: → 1724808

To fix this we'll probably need to get the scale from the BrowserChild like non-wr does, and then incorporate that into the root StackingContextHelper in that process maybe, or something like that.

Assignee: nobody → tnikkel
Fission Milestone: ? → MVP

This ensures images and svg content and anything else rasterized in the content process has the right scale.

Depends on: 1726088
Pushed by tnikkel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/adf4fec15c1d
Use the scale from ancestor documents in other processes in the StackingContextHelper. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/a9efbba46660
Add test. r=hiro
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch

Setting status-firefox92=disabled because Fission is disabled in Fx92 and I don't think we need to uplift this fix just for our Fission experiment planned for Fx92 in the Release channel.

Blocks: 1739015
You need to log in before you can comment on or make changes to this bug.