Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Issue 2795453002: Use DPI from Print Preview on Windows, handle non square (Closed)

Created:
3 years, 8 months ago by rbpotter
Modified:
3 years, 8 months ago
Reviewers:
Lei Zhang
CC:
chromium-reviews, arv+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use DPI from Print Preview on Windows, handle non square - On Windows, use DPI set in print preview to set the printer DPI. Print preview DPI was previously only used for extension/cloud printers. - Fix handling of non-square DPI - use x and y DPI to compute the correct page size to report from the printer instead of assuming both resolutions are the same when computing page size. Assuming both are identical results in incorrect page sizes for non square DPI. - Note that we have to use only 1 DPI for rendering in both dimensions, this CL just fixes the bad page size behavior. BUG=648774 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2795453002 Cr-Commit-Position: refs/heads/master@{#461799} Committed: https://chromium.googlesource.com/chromium/src/+/116c2e17ec19ced7c6700c34661017ee81d0d4ab

Patch Set 1 #

Total comments: 12

Patch Set 2 : Remove unused desired_dpi #

Total comments: 2

Patch Set 3 : Fix compile errors #

Patch Set 4 : Actually fix compile errors #

Patch Set 5 : Rebase #

Total comments: 6

Patch Set 6 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -25 lines) Patch
M chrome/browser/resources/print_preview/native_layer.js View 2 chunks +8 lines, -0 lines 0 comments Download
M printing/print_job_constants.h View 1 chunk +2 lines, -0 lines 0 comments Download
M printing/print_job_constants.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M printing/print_settings.h View 1 2 3 4 5 4 chunks +16 lines, -8 lines 0 comments Download
M printing/print_settings.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M printing/print_settings_conversion.cc View 1 2 3 4 5 2 chunks +9 lines, -0 lines 0 comments Download
M printing/print_settings_initializer_win.cc View 1 2 3 4 5 2 chunks +16 lines, -16 lines 0 comments Download
M printing/printing_context_win.cc View 1 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (27 generated)
rbpotter
3 years, 8 months ago (2017-03-31 19:28:04 UTC) #4
Lei Zhang
https://codereview.chromium.org/2795453002/diff/1/components/printing/browser/print_manager_utils.cc File components/printing/browser/print_manager_utils.cc (right): https://codereview.chromium.org/2795453002/diff/1/components/printing/browser/print_manager_utils.cc#newcode28 components/printing/browser/print_manager_utils.cc:28: : 72; Can we leave this file with only ...
3 years, 8 months ago (2017-03-31 22:21:13 UTC) #5
rbpotter
https://codereview.chromium.org/2795453002/diff/1/components/printing/browser/print_manager_utils.cc File components/printing/browser/print_manager_utils.cc (right): https://codereview.chromium.org/2795453002/diff/1/components/printing/browser/print_manager_utils.cc#newcode28 components/printing/browser/print_manager_utils.cc:28: : 72; On 2017/03/31 22:21:13, Lei Zhang wrote: > ...
3 years, 8 months ago (2017-04-01 00:08:02 UTC) #8
Lei Zhang
There are some trybot failures. We may want to remove desired_dpi first in a separate ...
3 years, 8 months ago (2017-04-01 00:55:44 UTC) #11
Lei Zhang
https://codereview.chromium.org/2795453002/diff/20001/printing/print_settings.h File printing/print_settings.h (right): https://codereview.chromium.org/2795453002/diff/20001/printing/print_settings.h#newcode107 printing/print_settings.h:107: int dpi() const { return std::min(dpi_[0], dpi_[1]); } On ...
3 years, 8 months ago (2017-04-01 01:14:13 UTC) #12
rbpotter
3 years, 8 months ago (2017-04-03 22:00:52 UTC) #22
Lei Zhang
lgtm https://codereview.chromium.org/2795453002/diff/80001/printing/print_settings.h File printing/print_settings.h (right): https://codereview.chromium.org/2795453002/diff/80001/printing/print_settings.h#newcode106 printing/print_settings.h:106: void set_dpi(int dpi_horizontal, int dpi_vertical) { Can we ...
3 years, 8 months ago (2017-04-04 00:03:04 UTC) #26
rbpotter
https://codereview.chromium.org/2795453002/diff/80001/printing/print_settings.h File printing/print_settings.h (right): https://codereview.chromium.org/2795453002/diff/80001/printing/print_settings.h#newcode106 printing/print_settings.h:106: void set_dpi(int dpi_horizontal, int dpi_vertical) { On 2017/04/04 00:03:03, ...
3 years, 8 months ago (2017-04-04 00:36:34 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2795453002/100001
3 years, 8 months ago (2017-04-04 19:03:24 UTC) #34
commit-bot: I haz the power
3 years, 8 months ago (2017-04-04 19:22:47 UTC) #37
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/116c2e17ec19ced7c6700c346610...

Powered by Google App Engine
This is Rietveld 408576698