Start clearing up some of nsPrintJob's non-obvious distinction between original, source and preview documents
Categories
(Core :: Printing: Setup, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: jwatt, Assigned: jwatt)
Details
Attachments
(2 files)
It's not obvious, since the code doesn't hint at it in naming or detail it in comments, but nsPrintJob essentially acts on three different documents: an original document (never changes), a source document (may change over time) and one or more print preview document (may change over time).
(Further adding to the confusion, the "original" document is not necessarily the original document that the user selected to print since Firefox frontend code sometimes passes an existing print preview document as the "original", but lets leave that for another bug. Baby steps...)
Unsurprisingly, this has over the years ended up resulting in code using the wrong things and generally being an impenetrable mess. In this bug I'll do some renaming, restructuring and commenting. I'll then have one or more separate bugs for changes that actually make behavior changes (hopefully fixing bugs, but with some risk of introducing bugs too given the mess this code is in).
![]() |
Assignee | |
Comment 1•6 years ago
|
||
This stops nsPrintJob::PrintPreview from duplicating work done in
nsDocumentViewer::PrintPreview.
![]() |
Assignee | |
Comment 2•6 years ago
|
||
Depends on D31811
![]() |
||
Comment 4•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6030ebc07cd2
https://hg.mozilla.org/mozilla-central/rev/a42daaa44f88
Description
•