Infinite print preview loading state if printing an XML selection via context menu
Categories
(Core :: Print Preview, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox81 | --- | unaffected |
firefox82 | --- | unaffected |
firefox83 | --- | verified |
People
(Reporter: emilghitta, Assigned: emilio)
References
(Blocks 1 open bug)
Details
(Whiteboard: [print2020_v83] [old-ui-])
Attachments
(2 files)
Affected versions
- Firefox 83.0a1 (BuildId:20201012113229)
Affected platforms
- Windows 10 64bit
- Windows 7 64bit
- Ubuntu 18.04 64bit
- macOS 10.14
Steps to reproduce
- Launch Firefox.
- Access the following link
- Perform a selection and right click in order to open the context menu.
- Select the “Print Selection” option.
Expected result
- The “Print Selection” option is disabled (as in pdf documents).
Actual result
- The “Print Selection” option is enabled and if the user selects the option, it will open the print preview with the
“There was an unexpected problem while printing”
error message and the print preview remains in an infinite loading state.
Regression Window
This is not a regression. The Print Selection option was implemented in Bug 140718
Additional Information
- [Suggested severity] S2
- The following error message is displayed inside the browser console
Uncaught (in promise) DOMException: Print preview failed print.js:657:10
Reporter | ||
Updated•4 years ago
|
Comment 1•4 years ago
|
||
:emilghitta, if you think that's a regression, then could you try to find a regression range in using for example mozregression?
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Recursive the things all :^)
The fix to the "corresponding node" bits in Document.cpp should be
pretty straight-forward. The fix in nsPrintJob is a bit more subtle:
The way printing selection works is literally "select everything else,
then call Selection.deleteFromDocument on that". We need to do the same
with shadow DOM, which involves skipping over shadow trees, and dealing
with selecting bits in ancestor trees as needed.
Note that for multi-range-selection case this technically relies on the
order of the ranges being shadow-tree-inclusive. We don't support
multi-range selection in shadow dom well, afaict, but I've added a
comment to the code to that effect.
Updated•4 years ago
|
Comment 4•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Reporter | ||
Comment 5•4 years ago
|
||
This issue is verified fixed using Firefox 83.0b2 (BuildId:20201020173725) on Windows 10 64bit, macOS 10.15 and Ubuntu 20.04
Description
•