Merge print recording targets from cross-origin iframes
Categories
(Core :: Printing: Output, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox83 | --- | fixed |
People
(Reporter: svoisen, Assigned: mattwoodrow)
References
Details
(Whiteboard: [print2020_v83], [wptsync upstream])
Crash Data
Attachments
(9 files)
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review |
Tracks work needed to merge print recordings of out-of-process iframes in order to support printing in Fission.
| Reporter | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Sean said fission printing work will most probably not be ready in time for nightly experiment and we shouldn't block on it. It is expected to be fixed in a couple of weeks following the experiment launch.
| Reporter | ||
Comment 2•5 years ago
|
||
Per out-of-band conversation, Matt agreed to start looking into this. Thanks Matt!
| Assignee | ||
Comment 3•5 years ago
|
||
The rough plan at this point is:
- Add support to the print recorder to handle 'dependent' (OOP) surfaces, and send the final list of dependencies across to the parent process with the recording for the page.
- Refactor CrossProcessPaint (the fission-compatible screenshot recorder) to take a list of dependencies and asynchronously resolve a set of recordings.
- Make the parent process side of printing resolve recordings and merge those into the main recording before forwarding the result to the printer.
The existing printing code uses file handles to share recordings between processes, whereas CrossProcessPaint uses shmem.
The reasoning for this (according to the author, Bob Owen) is that printing frequently encountered OOM crashes, and switched to file handles to avoid that.
I believe it'll be fine to keep using the shmem-based CrossProcessPaint for printing iframes because:
- We're only recording iframes this way (the main page stays using the existing code), so it should be much smaller recordings.
- We now handle failed allocations without crashing, so you'd only lose the iframe contents.
- Many more users have 64bit, and more content processes.
It's more likely that other consumers of CrossProcessPaint will have OOM issues (when trying to screenshot a large document), so if we ever do run into issues we can convert that code to file handles and benefit with all consumers.
I have a rough version of code that implements this, just waiting on static cloning to be complete before I can test and finish.
| Assignee | ||
Comment 4•5 years ago
|
||
| Assignee | ||
Comment 5•5 years ago
|
||
This moves the code for converting the set of recordings into a single bitmap into the static Start function, and will allow for other consumers to skip this.
Depends on D90802
| Assignee | ||
Comment 6•5 years ago
|
||
Depends on D90803
| Assignee | ||
Comment 7•5 years ago
|
||
Depends on D90804
| Assignee | ||
Comment 8•5 years ago
|
||
Depends on D90805
| Assignee | ||
Comment 9•5 years ago
|
||
Depends on D90806
| Assignee | ||
Comment 10•5 years ago
|
||
Depends on D90807
| Assignee | ||
Comment 11•5 years ago
|
||
Dependent surfaces are used for recording OOP iframes, and these can go away at any time (if they navigate and switch process while we're trying to capture them).
Making these draws fallible means we can still screenshot/print the outer document (and sibling OOP iframes), rather than failing the entire operation.
Depends on D90808
| Assignee | ||
Comment 12•5 years ago
|
||
Depends on D90809
Updated•5 years ago
|
Comment 14•5 years ago
|
||
Comment 16•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/1e5f3b35d55d
https://hg.mozilla.org/mozilla-central/rev/ec3503bf866f
https://hg.mozilla.org/mozilla-central/rev/4f1bb0fc80a4
https://hg.mozilla.org/mozilla-central/rev/9348d2cc590a
https://hg.mozilla.org/mozilla-central/rev/f165b0ca5bc1
https://hg.mozilla.org/mozilla-central/rev/4c8635b0e73d
https://hg.mozilla.org/mozilla-central/rev/f7fdeb88c5d6
https://hg.mozilla.org/mozilla-central/rev/402741812e28
https://hg.mozilla.org/mozilla-central/rev/478eb5e81118
Updated•5 years ago
|
Updated•4 years ago
|
Description
•