Closed Bug 1620289 Opened 5 years ago Closed 5 years ago

Have static clones clone the current selection ranges

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: jwatt, Assigned: nordzilla)

References

Details

(Whiteboard: [print2020_v77][layout:backlog:77])

Attachments

(1 file, 2 obsolete files)

To print a document we create a "static clone" so that we can print independently of and without freezing the original document (since that can cause various problems). Unfortunately, we aren't actually completely independent of the original document right now.

The main issue in our current implementation of static cloning is that we don't try to copy the selections or the focused frame that were present in the original document. As a result, the code in nsPrintJob keeps a reference to the original document (mOriginalDoc) to get the selections. This is pretty broken since that selection in the original document could change at any time. mOriginalDoc should be killed off.

Note: one issue to keep in mind when fixing this is that we don't want the selection to appear visibly selected in the static clone.

Whiteboard: [print2020_v76] → [print_v76]
Assignee: nobody → enordin
Status: NEW → ASSIGNED
Priority: -- → P3

So the original clone-doc-for-printing patch did clone selection, but I can't find anymore where that code might have moved (or was it removed for some reason?).

Attachment #9132370 - Attachment description: Bug 1620289 - Clone selection ranges when printing -- WIP → Bug 1620289 - Clone selection ranges when printing r=jwatt
Attachment #9132370 - Attachment description: Bug 1620289 - Clone selection ranges when printing r=jwatt → Bug 1620289 - Clone selection ranges when printing -- WIP
Attachment #9132370 - Attachment description: Bug 1620289 - Clone selection ranges when printing -- WIP → Bug 1620289 - Clone selection ranges when printing r=jwatt,smaug
Attachment #9132370 - Attachment description: Bug 1620289 - Clone selection ranges when printing r=jwatt,smaug → Bug 1620289 - Clone selection ranges when printing r=jwatt,smaug,alaskanemily
Whiteboard: [print_v76] → [print_v77][layout:backlog:77]
Attachment #9132370 - Attachment is obsolete: true
Attachment #9140894 - Attachment description: Bug 1620289 - Part 1 Clone Selection on PresShell Creation → Bug 1620289 - Part 1 Clone Selection on PresShell Creation r=jwatt,smaug,alaskanemily
Attachment #9140894 - Attachment description: Bug 1620289 - Part 1 Clone Selection on PresShell Creation r=jwatt,smaug,alaskanemily → Bug 1620289 - Part 1 Clone Print Selection Ranges r=jwatt,smaug,alaskanemily
Attachment #9140894 - Attachment description: Bug 1620289 - Part 1 Clone Print Selection Ranges r=jwatt,smaug,alaskanemily → Bug 1620289 - Part 1 Clone Print Selection Ranges r=jwatt,alaskanemily
Attachment #9140894 - Attachment description: Bug 1620289 - Part 1 Clone Print Selection Ranges r=jwatt,alaskanemily → Bug 1620289 - Part 1 Clone Selection Ranges For Printing r=jwatt,alaskanemily
  • Add new member nsPrintJob::mIsRangeSelection
  • Cache mIsRangeSelection and mIsIframeSelected on first call to print

Depends on D71110

Pushed by cbrindusan@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cad73a01b0b2 Part 1 Clone Selection Ranges For Printing r=jwatt
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
Whiteboard: [print_v77][layout:backlog:77] → [print2020_v77][layout:backlog:77]
Blocks: 1638162
Summary: Have static clones clone the current selection ranges and focused frame → Have static clones clone the current selection ranges
Regressions: 1652746
Regressions: 1653334
Regressions: 1654406
Attachment #9141817 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: