Implement a paginator for the print preview
Categories
(Toolkit :: Printing, enhancement, P1)
Tracking
()
People
(Reporter: mstriemer, Assigned: sfoster)
References
(Regressed 2 open bugs)
Details
(Whiteboard: [print2020_v85])
Attachments
(2 files, 1 obsolete file)
There should be a paginator overlayed onto the print preview that shows the total number of pages and allows the user to skip to the next page, previous page, beginning, or end.
This could be done in the print.html document and positioned above the preview, or possibly in the preview document itself.
Comment 1•4 years ago
|
||
(Update from Sean: "Also, FWIW, Romain and Martin agreed that the paginator can be removed from scope for 81.")
Reporter | ||
Comment 2•4 years ago
|
||
Updated•4 years ago
|
Comment 4•4 years ago
|
||
FWIW nsIWebBrowserPrint's printPreviewNumPages, printPreviewCurrentPageNumber and printPreviewScrollToPage should all be working now.
Comment 5•4 years ago
|
||
[Moving front-end printing v82 bugs to v83.]
Assignee | ||
Comment 6•4 years ago
|
||
It shouldn't be too much more work to get actual pagination here, but the first priority is to get a 1 of n sheets indicator on the preview.
I'm not sure how to handle duplex printing, I guess initially we'll just label those as new sheets and follow-up as necessary.
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 7•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 8•4 years ago
|
||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 9•4 years ago
|
||
I'm getting a test failure from the new browser_preview_navigation.js. It looks like there's a crash somewhere between testPreviewScroll
and testPreviewNavigationCommands
and the print tabmodal dialog goes away. testPreviewScroll does both focus and synthesizeKey stuff to page down the preview, as well as synthesized mouse events to scroll down. So I tried some voodoo in there to put it back into a good state but no change. Does anything suggest itself from log or the test? I'm drawing a blank...
https://treeherder.mozilla.org/jobs?repo=try&revision=6354c3f3d233b238d937f48b787ddb27f81ac669
Comment 10•4 years ago
|
||
Comment 11•4 years ago
•
|
||
Backed out 2 changesets (bug 1654684) for bc failures at browser_ext_tabs_printPreview.
https://hg.mozilla.org/integration/autoland/rev/1c681871f691c9ffb5df3bf925154442eaf01586
Failure log:
https://treeherder.mozilla.org/logviewer?job_id=323746740&repo=autoland&lineNumber=31116
Assignee | ||
Comment 12•4 years ago
|
||
Thanks for the backout. I can't reproduce locally yet, but am investigating.
Assignee | ||
Comment 13•4 years ago
|
||
(In reply to Sam Foster [:sfoster] (he/him) from comment #9)
I'm getting a test failure from the new browser_preview_navigation.js. It looks like there's a crash somewhere between
testPreviewScroll
andtestPreviewNavigationCommands
and the print tabmodal dialog goes away.
I was able to narrow this down to testPreviewNavigationCommands, and attempted to land this with that particular test skipped (tracked in Bug 1681026). testPreviewNavigationCommands exercises the home/back/next/end buttons and doesnt fundamentally do anything unique that isn't done in the other tests, so I'm not sure yet what the problem is there.
Comment 14•4 years ago
|
||
Comment 15•4 years ago
|
||
Backed out for broswer chrome failures with .printPreviewCurrentPageNumber. CLOSED TREE
backout: https://hg.mozilla.org/integration/autoland/rev/226151a97ecfe5bb2394c33c3386a118e6207eb6
push with landings: https://treeherder.mozilla.org/jobs?repo=autoland&revision=2fdc1b5569e124b2f64c4be3bc6bc10f16b217ea&group_state=expanded
failure log: (failures were triggered on subsequent pushes)
Comment 16•4 years ago
|
||
Assignee | ||
Comment 17•4 years ago
|
||
The DeferredTask we use to debounce the scroll handling is now disarmed when the actor is destroyed (which happens when the print dialog closes) Furthermore, using the actor properties to register that scroll handler had the unintended consequence that any content scroll event would construct and enter the PrintingChild actor. We now add the scroll event listener to the contentWindow and remove it from within the actor's own lifecycle.
This was reproducing on mochitest-chrome tests on osx, so with this clean try run I'm re-landing the patch: https://treeherder.mozilla.org/jobs?repo=try&revision=2527ba2cf416bd000329340b818faa7548689d60
Assignee | ||
Comment 18•4 years ago
|
||
I think we've figured out the test failure and there's a patch on bug 1681026, so I'm clearing the ni on :mstriemer.
Comment 19•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3f892edf0139
https://hg.mozilla.org/mozilla-central/rev/519c764753f3
Updated•4 years ago
|
Comment 20•4 years ago
|
||
Hello,
Confirming this a verified fixed on 86.0a1(20201218095607) and 85.0b3(20201217185930) with macOS 10.14.6, Win10x64 and Ubuntu 20.04
Description
•