Closed Bug 1651947 Opened 4 years ago Closed 4 years ago

Figure out how to scale down print preview

Categories

(Core :: Printing: Setup, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: jwatt, Assigned: emilio)

References

(Blocks 1 open bug)

Details

(Whiteboard: [print2020_v80])

Attachments

(1 file)

The new printing UI puts print preview in a doorhander, which is narrower than the full tab print preview that we currently have. mstriemer mentioned in a call that the reduced width causes the preview document to get horizontal scrollbars, which is obviously horrible.

We should figure out how to coordinate scaling of the print preview document so that it does not scroll horizontally. ComputePageTransform is probably a good place to start looking.

Whiteboard: [print2020_v80] → [print2020_v80][hiro?]

(Somewhat relatedly, we'll also need to scale down each tiny-page in the "pages per sheet" visualization & printed output. And then also scale down the sheet itself, to fit into doorhanger per comment 0. Possibly some code-sharing opportunities.)

See Also: → 1631452

Poking at this. This is different from bug 1631452 in the sense that this should have no layout effect on the page (and that's great because or incremental reflow setup in print preview just sucks).

I have a patch that almost does it, on top of Mark's patch. It abuses the print preview scale we already apply in the page sequence frame. I think that's the way to go, since it's both trivial and gets us the desired effect.

Assignee: nobody → emilio

This seems to almost do the trick, only some tweaks missing (the
overflow area gets too big and we show scrollbars), and we don't account
for the pages' horizontal margin. All that is fixable of course and will
look after lunch.

This requires flexing the browser element so that the viewport size of
the print preview document changes.

Status: NEW → ASSIGNED
Type: defect → enhancement
Whiteboard: [print2020_v80][hiro?] → [print2020_v80]
Attachment #9163177 - Attachment description: Bug 1651947 - Scale the page sequence in print preview so that pages don't overflow the viewport. → Bug 1651947 - Scale the page sequence in print preview so that pages don't overflow the viewport horizontally. r=dholbert
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bed71c154785
Scale the page sequence in print preview so that pages don't overflow the viewport horizontally. r=dholbert
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
Whiteboard: [print2020_v80] → [print2020_v81]
Whiteboard: [print2020_v81] → [print2020_v80]
Whiteboard: [print2020_v80] → [print2020_v81]
Whiteboard: [print2020_v81] → [print2020_v80]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: