Closed Bug 1769161 Opened 7 months ago Closed 6 months ago

Page Margins do not properly take into account page-size scaling

Categories

(Core :: Printing: Output, defect, P3)

defect

Tracking

()

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: alaskanemily, Assigned: alaskanemily)

References

Details

Attachments

(4 files)

This is related to Bug 1763030, but fixing this doesn't seem to fully resolve that issue.

This includes two versions of the function, one which takes an already-computed
page size to avoid computing this multiple times for a caller, and the other
which computes this value itself for convenience.

See Also: → 1771666
Attachment #9276955 - Attachment description: Bug 1769161 Part 2 - Scale unwriteable margins and user-specified margins by the page-size scaling factor → Bug 1769161 Part 2 - Rename and document margin and sizing calculation for nsPageFrame margins.
Attachment #9276956 - Attachment description: Bug 1769161 Part 3 - Add test for unwriteable margin scaling with page-size mismatches → Bug 1769161 Part 4 - Add test for unwriteable margin scaling with page-size mismatches
Pushed by emcdonough@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/616392cd1725
Part 1 - Refactor scaling factor due to page-size for nsPageFrame to be in its own function. r=dholbert
https://hg.mozilla.org/integration/autoland/rev/4ffac65dfc17
Part 2 - Rename and document margin and sizing calculation for nsPageFrame margins. r=dholbert
https://hg.mozilla.org/integration/autoland/rev/a821b6bc4a18
Part 3 - Scale unwriteable margins and user-specified margins by the page-size scaling factor r=dholbert
https://hg.mozilla.org/integration/autoland/rev/d376decbcba0
Part 4 - Add test for unwriteable margin scaling with page-size mismatches r=dholbert

Backed out 4 changesets (bug 1769161) for causing mochitest failures in layout/base/tests/chrome/test_printpreview.xhtml

Backout link: https://hg.mozilla.org/integration/autoland/rev/8205298391339b99457378a40bbb308346ddb54a

Push with failures

Failure log

 INFO - TEST-UNEXPECTED-FAIL | layout/base/tests/chrome/test_printpreview.xhtml | Printing bug1769161_1.html and bug1769161_1_ref.html should produce the same results - got false, expected true
Flags: needinfo?(emcdonough)

Looks like our Windows-specific fuzzy threshold for bug 1680838 just need to be higher here (sigh), for all the new tests.

1 has: different: 800, maxDifference: 255
2 has: different: 6463, maxDifference: 255
3 has: different: 800, maxDifference: 255
4 has: different: 11742, maxDifference: 255

Pushed by emcdonough@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/75371351ca96
Part 1 - Refactor scaling factor due to page-size for nsPageFrame to be in its own function. r=dholbert
https://hg.mozilla.org/integration/autoland/rev/8ef0b13d48e0
Part 2 - Rename and document margin and sizing calculation for nsPageFrame margins. r=dholbert
https://hg.mozilla.org/integration/autoland/rev/e2514be19669
Part 3 - Scale unwriteable margins and user-specified margins by the page-size scaling factor r=dholbert
https://hg.mozilla.org/integration/autoland/rev/ec7e694733a0
Part 4 - Add test for unwriteable margin scaling with page-size mismatches r=dholbert
Flags: needinfo?(emcdonough)
You need to log in before you can comment on or make changes to this bug.