Stop calling nsPrintSettingsService::GetDefaultPrintSettingsForPrinting in nsGlobalWindowOuter::PrintOuter
Categories
(Core :: Printing: Setup, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox83 | --- | fixed |
People
(Reporter: jwatt, Assigned: emilio)
Details
(Whiteboard: [print2020_v83])
Attachments
(1 file)
nsPrintSettingsService::GetDefaultPrintSettingsForPrinting gets a settings object that may well have completely different settings to what the print preview/print will set. Using that to get a settings object in nsGlobalWindowOuter::PrintOuter to pass to nsPrintJob::Print/PrintPreview isn't great.
It's not possible to get the same settings object at this point in the code as will be chosen by the frontend code, because our sandboxing goals mean that we can't be accessing nsIPrinterList in the content process.
Ideally I think the code would be refactored so that we only do the static cloning under nsGlobalWindowOuter::PrintOuter, and do not try to reflow the document until the print preview/print on the parent side takes ownership of the temporary docshell and then passes a settings object over to the content process via nsFrameLoader::Print/PrintPreview.
Emilio, would you be able to take a look at this?
| Assignee | ||
Comment 1•5 years ago
|
||
The comment should be self-descriptive. We keep cloning the doc sync and
the UI will preview that doc, so it works out nicely and we do less
work.
Updated•5 years ago
|
| Assignee | ||
Comment 2•5 years ago
|
||
So like this? I don't think this is observable/testable, but let me know if you think it is and I can try to add a test.
| Reporter | ||
Comment 3•5 years ago
|
||
Yeah, that's great. Thanks!
| Reporter | ||
Comment 4•5 years ago
|
||
(And no, I don't think this is testable.)
Comment 6•5 years ago
|
||
| bugherder | ||
| Reporter | ||
Updated•5 years ago
|
Description
•