Print Preview: Fix custom margins logic and add tests
Correct Print Preview custom margin logic to match the old UI. The following rules should be followed: 1) If there is no sticky custom margins value, when custom margins are selected, they should be initialized to the document margins to avoid a preview regeneration. 2) If there is a sticky value, custom margins should be initialized to that sticky value, even if this results in a regeneration of the preview. 3) If at any point the user changes the orientation or the media size, the sticky custom margins value is cleared. This happens even if the media size is changed while the margins are not available, i.e., while previewing a PDF, because the media size value is sticky. Bug: 870249 Change-Id: Ibbe5084e34a8b80ec452ec9697184f0c274d2132 Reviewed-on: https://chromium-review.googlesource.com/1161288Reviewed-by:Scott Chen <scottchen@chromium.org> Reviewed-by:
Lei Zhang <thestig@chromium.org> Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Cr-Commit-Position: refs/heads/master@{#584163}
Showing
This diff is collapsed.
Please register or sign in to comment