forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle CSS @page margins correctly when scaling.
Let Blink handle the scale factor set in PrintParams. The PDF plug-in already does this, but Blink didn't. Therefore there was logic in PrintRenderFrameHelper to determine whether the scale factor should be applied or not. This can now be removed, since everyone (i.e. PDF and Blink) is now able to honor blink::WebPrintParams::scale_factor. The only scaling that PrintRenderFrameHelper now needs to deal with, is the fit-to-page scale factor, i.e. when the page size specified in CSS is larger than actual paper. Add a bunch of browser tests for this. Test coverage was/is really low! Also test all three scaling mechanisms, when combined: PrintParams scale, Blink scaling (to prevent inline overflow), and PrintRenderFrameHelper fit-to-page scaling. Bug: 1480270 Change-Id: I163486eb0aa0fa2d3d630827394b19a2f97cdaf1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4853339 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/main@{#1195404}
- Loading branch information
Showing
8 changed files
with
403 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.