"Print selection" is broken if the selected text is in a subdocument (iframe)
Categories
(Core :: Printing: Setup, defect, P1)
Tracking
()
People
(Reporter: jwatt, Assigned: bobowen)
References
(Regression)
Details
(Keywords: regression, Whiteboard: [print2020_v81])
Attachments
(2 files)
We only call CachePrintSelectionRanges in nsPrintObject::InitAsRootObject. So if the selection is in a subdocument, then the "Print selection" functionality will be broken.
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Looks like this is just a matter of adding the function call to do the caching into InitAsNestedObject.
Reporter | ||
Comment 2•4 years ago
|
||
I also had in mind to propagate out from the InitAs*Object functions the information on whether there is a selection. That would allow later code to avoid querying the documents. Ideally nsPrintData would know exactly which of its nsPrintObjects has the selection it should use. I believe that should be the one from the document that was cloned from the focused window, or else the selection from the first document found in a depth first search.
Assignee | ||
Comment 3•4 years ago
|
||
These unused members are removed from nsIWebBrowserPrint and PPrintingTypes
along with their supporting functions.
Assignee | ||
Comment 4•4 years ago
|
||
This also refactors the selection printing code, so that as we build the tree we
record which nsPrintObject should be used if printing a Selection is chosen.
Depends on D85007
Updated•4 years ago
|
Comment 6•4 years ago
|
||
Backed outfor reftest failures at test-print-selection.html.
Backout link: https://hg.mozilla.org/integration/autoland/rev/e3d4f0ab31787a5d772c29ed7cb337ab9206a745
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=311871893&repo=autoland&lineNumber=8623
Comment 8•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/93dd13edad8a
https://hg.mozilla.org/mozilla-central/rev/2adc23aed2a6
Updated•4 years ago
|
Assignee | ||
Comment 10•4 years ago
|
||
(In reply to Julien Cristau [:jcristau] from comment #9)
Is this worth uplifting to beta and/or esr78?
This turned into quite a big change, so I'm a little nervous about uplifting to Beta now that Beta is quite short.
The crash that this fixes in bug 1653981 is fairly rare.
jwatt - what do you think?
I think once it looks good on Beta (but maybe Beta 81), we should probably uplift to ESR78.
Comment 13•4 years ago
|
||
Reproduced with Fx 80.0a1 (2020-07-16) on Windows 10.
Verified fixed with Fx 81.0a1 (2020-08-18) on Windows 10, macOS 10.15 and Ubuntu 18.04.
Updated•4 years ago
|
Updated•4 years ago
|
Description
•