Eliminate the storage of a PMPageFormat in prefs
Categories
(Core :: Printing: Setup, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: jfkthame, Assigned: jfkthame)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
text/x-phabricator-request
|
Details |
We currently have code to serialize a PMPageFormat object from the macOS print settings and store it in a pref, and to read it back again. But this shouldn't be needed, as this object just serves to store "information such as the paper size, orientation, and scale of pages"[1], which we have in our base print settings object anyhow.
We don't make any use of the "extended data" functions to attach extra stuff to the PMPageFormat. So it appears to be redundant; we can just set up the page format parameters from our base-class members as needed.
[1] https://developer.apple.com/documentation/applicationservices/pmpageformat?language=objc
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Updated•4 years ago
|
Comment 4•4 years ago
|
||
We'll need to fix this in order for bug 1669905's patches to work correctly. See dupe bug 1682403 for more on that.
(Right now with my WIP code for bug 1669905, when we print two side-by-side portrait-oriented pages on a landscape-oriented sheet, we inadvertently end up serializing the landscape page-orientation into the PMPageFormat and using landscape as the default orientation for the next print operation. This isn't a problem once we've removed the PMPageFormat stuff via the patch here.)
Comment hidden (typo) |
Updated•4 years ago
|
Comment 6•4 years ago
|
||
Sorry for bug/patch-spam -- that was a bug number mis-paste on my part.
Comment hidden (typo) |
Comment 8•4 years ago
|
||
jfkthame: when you get around to it, it looks like the patch needs a manual rebase to account for some changes to the code that this patch is removing, in nsPrintSettingsServiceX.mm.
(Probably trivial, and no rush at all, particularly during the holiday. Just pinging as a heads-up -- I happened to notice the rebase failure locally, because I'm building with this patch locally.)
Updated•4 years ago
|
Comment 9•4 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #4)
We'll need to fix this in order for bug 1669905's patches to work correctly.
(This is now the only thing blocking that bug's last patch from landing, for 2&6 pages-per-sheet -- setting ni=jwatt to be sure this is still on his radar for review.)
Comment 10•4 years ago
|
||
There is a report in this reddit thread where a 10KB print.macosx.pagesetup-2
pref was apparently impacting print dialog opening performance.
Comment 11•4 years ago
|
||
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d5525991f7c7 Eliminate reading/writing of a PMPageFormat to prefs on macOS. r=jwatt
Comment 12•4 years ago
|
||
bugherder |
![]() |
||
Updated•3 years ago
|
Description
•