Closed Bug 1652344 Opened 1 year ago Closed 1 year ago

Stop creating an nsIPrintSettings in nsGlobalWindowOuter::PrintOuter

Categories

(Core :: Printing: Setup, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: jwatt, Assigned: jwatt)

References

Details

(Whiteboard: [print2020_v80])

Attachments

(3 files)

No description provided.

All our backends implement nsIPrintSettingsService, so this code is unused.

The fallback code in nsPrintJob::DoCommonPrint to create an nsIPrintSettings if
none is passed in is never used, since all callers pass a settings object.
However, to simplify future changes I'd like nsGlobalWindowOuter::PrintOuter to
stop creating and passing in its own default valued nsIPrintSettings object.

This patch makes the fallback code that DoCommonPrint calls do what
nsGlobalWindowOuter::PrintOuter does, and makes the latter stop passing in a
settings object.

This patch also removes nsIWebBrowserPrint.globalPrintSettings since
nsGlobalWindowOuter::PrintOuter was its only consumer.

Depends on D83267

Pushed by jwatt@jwatt.org:
https://hg.mozilla.org/integration/autoland/rev/075903436ef2
p1. Remove the code in nsGlobalWindowOuter::PrintOuter for handling failure to get an nsIPrintSettingsService. r=bobowen
https://hg.mozilla.org/integration/autoland/rev/d2b66d810ab5
p2. Stop creating an nsIPrintSettings in nsGlobalWindowOuter::PrintOuter. r=bobowen
Pushed by malexandru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d2591c221cff
p1. Remove the code in nsGlobalWindowOuter::PrintOuter for handling failure to get an nsIPrintSettingsService. r=bobowen
Attachment #9163086 - Attachment description: Bug 1652344 p2. Stop creating an nsIPrintSettings in nsGlobalWindowOuter::PrintOuter. r=bobowen → Bug 1652344 p3. Stop creating an nsIPrintSettings in nsGlobalWindowOuter::PrintOuter. r=bobowen
Attachment #9163116 - Attachment description: Bug 1652344 p2. Fix the print settings creation in the print preview tests. r=bobowen → Bug 1652344 p2. Fix the print settings creation in the print preview tests. r=hiro
Pushed by jwatt@jwatt.org:
https://hg.mozilla.org/integration/autoland/rev/20c29266e1df
p2. Fix the print settings creation in the print preview tests. r=hiro
https://hg.mozilla.org/integration/autoland/rev/24fb0d980a2e
p3. Stop creating an nsIPrintSettings in nsGlobalWindowOuter::PrintOuter. r=bobowen
Flags: needinfo?(jwatt)
Whiteboard: [print2020_v80] → [print2020_v81]
Whiteboard: [print2020_v81] → [print2020_v80]
Whiteboard: [print2020_v80] → [print2020_v81]
Whiteboard: [print2020_v81] → [print2020_v80]
Blocks: 1602410
You need to log in before you can comment on or make changes to this bug.