Closed Bug 1673634 Opened 4 years ago Closed 4 years ago

Custom margins don't account for page orientation

Categories

(Toolkit :: Printing, defect)

defect

Tracking

()

VERIFIED FIXED
84 Branch
Tracking Status
firefox84 --- verified

People

(Reporter: mstriemer, Assigned: emmamalysz)

Details

(Whiteboard: [print2020_v85][old-ui+])

Attachments

(1 file)

The custom margins picker always compares against the paperHeight for marginTop and marginBottom, and pageWidth for marginLeft and marginRight.

This comparison is only correct for portrait orientation, however. When the page is in landscape mode the marginTop and marginBottom would now be affecting the pageWidth.

STR

  1. Set orientation to portrait, paper size to letter
  2. Set margin top and bottom to 5"
  3. Change orientation to landscape

Expected results: Maybe the margins rotate? Chrome/Edge resets custom to default on orientation change.
Actual results: The top+bottom margin is now greater than the rotated page height, the page is blank

Whiteboard: [print2020_v84][old-ui+] → [print2020_v85][old-ui+]

When the orientation changes, we must recalculate the maximum height and width.
For portrait orientation, marginTop and marginBottom should be compared to the
paper width, and for landscape orientation, they should be compared to the paper
height (vice versa for marginLeft and marginRight).

If the custom margin values are valid after an orientation switch, they will
persist. If they are no longer valid, they will be reset to the default values,
and the margin dropdown will still have custom selected.

Assignee: nobody → emalysz
Status: NEW → ASSIGNED
Pushed by emalysz@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1817390a4cbf
custom margins must factor in page orientation when calculating maximum values r=mstriemer
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
Flags: qe-verify+

Reproduced with Fx 84.0a1(2020-10-27).
Verified fixed with Fx 85.0a1(2020-11-24) and Fx 84.0b4 on Windows 10, Ubuntu 18.04 and macOS 10.15.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: