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

Issue 1817873002: Print with the correct physical dimensions when specified (Closed)

Created:
4 years, 9 months ago by rhogan
Modified:
4 years, 8 months ago
CC:
blink-reviews, chromium-reviews, Devlin
Base URL:
https://chromium.googlesource.com/chromium/src.git@262769
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Print with the correct physical dimensions when specified If you specify a div in cm, mm or a similar unit of physical measurement and print it you don't get an element of the expected size on paper. This is due to the scaling factor we use when resizing the page for printing. The scaling factor of 1.25 was introduced by https://trac.webkit.org/changeset/22945 and adopted in the Gtk port by http://wkbug.com/15576. It seems to be a magic number that was 'about right'. From trial and error 1.33 seems to be the magic number that produces output with the correct physical size. I don't know how to test this. BUG=273306 Committed: https://crrev.com/a7fd168b96a0f6896b4a4e3d88921998e56f49c0 Cr-Commit-Position: refs/heads/master@{#384518}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Updated #

Patch Set 3 : Updated #

Patch Set 4 : Updated #

Patch Set 5 : Updated #

Patch Set 6 : Updated #

Patch Set 7 : Updated #

Patch Set 8 : Updated #

Total comments: 2

Patch Set 9 : Updated #

Total comments: 2

Patch Set 10 : Updated #

Patch Set 11 : Updated #

Patch Set 12 : Updated #

Patch Set 13 : Updated #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -90 lines) Patch
M components/printing/renderer/print_web_view_helper.cc View 1 2 3 4 5 6 7 8 3 chunks +14 lines, -7 lines 0 comments Download
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +20 lines, -20 lines 0 comments Download
M third_party/WebKit/LayoutTests/compositing/squashing/squashing-print-expected.png View 1 2 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/compositing/squashing/squashing-print-expected.txt View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/printing/ellipsis-printing-style-expected.png View 1 2 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/printing/forced-break-tree-dump-only-expected.txt View 1 2 1 chunk +12 lines, -12 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/printing/iframe-print-expected.png View 1 2 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/printing/iframe-print-expected.txt View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/printing/page-count-relayout-shrink-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/printing/quirks-percentage-height-body-expected.png View 1 2 3 4 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/printing/quirks-percentage-height-body-expected.txt View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/printing/quirks-percentage-height-expected.png View 1 2 3 4 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/printing/quirks-percentage-height-expected.txt View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/printing/standards-percentage-heights-expected.png View 1 2 3 4 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/printing/standards-percentage-heights-expected.txt View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/printing/subframes-percentage-height-expected.png View 1 2 3 4 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/printing/subframes-percentage-height-expected.txt View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/virtual/threaded/printing/ellipsis-printing-style-expected.png View 1 2 3 4 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/virtual/threaded/printing/iframe-print-expected.png View 1 2 3 4 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/virtual/threaded/printing/ellipsis-printing-style-expected.txt View 1 2 3 4 1 chunk +5 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/printing/ellipsis-printing-style-expected.txt View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/printing/quirks-percentage-height-body-expected.html View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/printing/quirks-percentage-height-expected.html View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/printing/resources/paged-media-test-utils.js View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/printing/simultaneous-position-float-change-expected.txt View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/printing/standards-percentage-heights-expected.html View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/printing/subframes-percentage-height-expected.html View 1 2 3 4 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/page/PrintContext.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +10 lines, -7 lines 0 comments Download
M third_party/WebKit/public/web/WebFrame.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 75 (28 generated)
rhogan
4 years, 9 months ago (2016-03-21 18:39:02 UTC) #4
rhogan
thestig - would you mind taking a look? I can provide updated results in a ...
4 years, 9 months ago (2016-03-21 18:43:30 UTC) #5
rhogan
On 2016/03/21 at 18:43:30, rhogan wrote: > thestig - would you mind taking a look? ...
4 years, 9 months ago (2016-03-23 20:40:24 UTC) #7
eae
Sure! https://codereview.chromium.org/1817873002/diff/1/components/printing/renderer/print_web_view_helper.cc File components/printing/renderer/print_web_view_helper.cc (right): https://codereview.chromium.org/1817873002/diff/1/components/printing/renderer/print_web_view_helper.cc#newcode679 components/printing/renderer/print_web_view_helper.cc:679: // Layout page according to printer page size. ...
4 years, 9 months ago (2016-03-23 21:16:56 UTC) #8
rhogan
On 2016/03/23 at 21:16:56, eae wrote: > Sure! > > https://codereview.chromium.org/1817873002/diff/1/components/printing/renderer/print_web_view_helper.cc > File components/printing/renderer/print_web_view_helper.cc (right): ...
4 years, 9 months ago (2016-03-24 19:16:49 UTC) #9
eae
Thank you, LGTM
4 years, 9 months ago (2016-03-24 19:26:36 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1817873002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1817873002/60001
4 years, 9 months ago (2016-03-24 19:27:11 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/160531)
4 years, 9 months ago (2016-03-24 19:39:31 UTC) #14
rhogan
On 2016/03/24 at 19:39:31, commit-bot wrote: > Try jobs failed on following builders: > chromium_presubmit ...
4 years, 9 months ago (2016-03-24 19:42:47 UTC) #16
Lei Zhang
Just have a couple small nits; https://codereview.chromium.org/1817873002/diff/140001/components/printing/renderer/print_web_view_helper.cc File components/printing/renderer/print_web_view_helper.cc (right): https://codereview.chromium.org/1817873002/diff/140001/components/printing/renderer/print_web_view_helper.cc#newcode80 components/printing/renderer/print_web_view_helper.cc:80: const float kPrintingMinimumShrinkFactor ...
4 years, 8 months ago (2016-03-29 01:00:46 UTC) #17
rhogan
On 2016/03/29 at 01:00:46, thestig wrote: > Just have a couple small nits; Both addressed ...
4 years, 8 months ago (2016-03-29 18:34:27 UTC) #18
Lei Zhang
lgtm
4 years, 8 months ago (2016-03-29 18:49:56 UTC) #19
rhogan
https://codereview.chromium.org/1817873002/diff/160001/third_party/WebKit/Source/core/page/PrintContext.cpp File third_party/WebKit/Source/core/page/PrintContext.cpp (right): https://codereview.chromium.org/1817873002/diff/160001/third_party/WebKit/Source/core/page/PrintContext.cpp#newcode105 third_party/WebKit/Source/core/page/PrintContext.cpp:105: int pageHeight = pageSizeInPixels.height() + LayoutUnit::epsilon(); eae: I added ...
4 years, 8 months ago (2016-03-29 19:17:23 UTC) #20
eae
still LGTM https://codereview.chromium.org/1817873002/diff/160001/third_party/WebKit/Source/core/page/PrintContext.cpp File third_party/WebKit/Source/core/page/PrintContext.cpp (right): https://codereview.chromium.org/1817873002/diff/160001/third_party/WebKit/Source/core/page/PrintContext.cpp#newcode105 third_party/WebKit/Source/core/page/PrintContext.cpp:105: int pageHeight = pageSizeInPixels.height() + LayoutUnit::epsilon(); On ...
4 years, 8 months ago (2016-03-29 19:28:47 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1817873002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1817873002/180001
4 years, 8 months ago (2016-03-29 20:27:03 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/161668)
4 years, 8 months ago (2016-03-29 20:38:42 UTC) #26
rhogan
pdr: could you lgtm the change to WebFrame.h? It's just a comment change but the ...
4 years, 8 months ago (2016-03-29 21:17:37 UTC) #28
pdr.
On 2016/03/29 at 21:17:37, robhogan wrote: > pdr: could you lgtm the change to WebFrame.h? ...
4 years, 8 months ago (2016-03-29 23:05:44 UTC) #29
rhogan
Oh right, forgot about TBR! Thanks anyway. On Wed, 30 Mar 2016 00:05 , <pdr@chromium.org> ...
4 years, 8 months ago (2016-03-30 05:06:46 UTC) #30
rhogan
Oh right, forgot about TBR! Thanks anyway. On Wed, 30 Mar 2016 00:05 , <pdr@chromium.org> ...
4 years, 8 months ago (2016-03-30 05:06:46 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1817873002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1817873002/180001
4 years, 8 months ago (2016-03-30 06:52:24 UTC) #33
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 8 months ago (2016-03-30 07:48:33 UTC) #34
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/b0b70b1a7023b375e31b94799e109fd1c19005c0 Cr-Commit-Position: refs/heads/master@{#383925}
4 years, 8 months ago (2016-03-30 07:49:39 UTC) #36
Nico
https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Win10 has been red since this landed.
4 years, 8 months ago (2016-03-30 12:11:56 UTC) #38
rhogan
Maybe my rebaselines for Win10 weren't quite right? You OK to rebaselines and the me? ...
4 years, 8 months ago (2016-03-30 12:47:55 UTC) #39
rhogan
Maybe my rebaselines for Win10 weren't quite right? You OK to rebaselines and the me? ...
4 years, 8 months ago (2016-03-30 12:47:55 UTC) #40
Nico
On Wed, Mar 30, 2016 at 8:47 AM, Robert Hogan <robhogan@gmail.com> wrote: > Maybe my ...
4 years, 8 months ago (2016-03-30 12:58:51 UTC) #41
Nico
On Wed, Mar 30, 2016 at 8:47 AM, Robert Hogan <robhogan@gmail.com> wrote: > Maybe my ...
4 years, 8 months ago (2016-03-30 12:58:52 UTC) #42
rhogan
Sorry I thought you were sheriffing. Jochen has looked after it. On Wed, 30 Mar ...
4 years, 8 months ago (2016-03-30 15:24:38 UTC) #43
rhogan
Sorry I thought you were sheriffing. Jochen has looked after it. On Wed, 30 Mar ...
4 years, 8 months ago (2016-03-30 15:24:39 UTC) #44
Nico
I mean I didn't understand what "and the me" meant On Mar 30, 2016 11:24 ...
4 years, 8 months ago (2016-03-30 15:33:17 UTC) #45
Nico
I mean I didn't understand what "and the me" meant On Mar 30, 2016 11:24 ...
4 years, 8 months ago (2016-03-30 15:33:17 UTC) #46
rhogan
Oh typo: I meant TBR. On Wed, 30 Mar 2016 16:33 Nico Weber, <thakis@chromium.org> wrote: ...
4 years, 8 months ago (2016-03-30 16:03:33 UTC) #47
rhogan
Oh typo: I meant TBR. On Wed, 30 Mar 2016 16:33 Nico Weber, <thakis@chromium.org> wrote: ...
4 years, 8 months ago (2016-03-30 16:03:33 UTC) #48
Devlin
A revert of this CL (patchset #10 id:180001) has been created in https://codereview.chromium.org/1848443003/ by rdevlin.cronin@chromium.org. ...
4 years, 8 months ago (2016-03-30 22:40:14 UTC) #49
rhogan
On 2016/03/30 at 22:40:14, rdevlin.cronin wrote: > A revert of this CL (patchset #10 id:180001) ...
4 years, 8 months ago (2016-03-31 18:10:03 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1817873002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1817873002/200001
4 years, 8 months ago (2016-03-31 18:10:54 UTC) #54
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/162776)
4 years, 8 months ago (2016-03-31 18:24:24 UTC) #56
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1817873002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1817873002/220001
4 years, 8 months ago (2016-03-31 20:56:52 UTC) #59
Devlin
On 2016/03/31 18:10:03, rhogan wrote: > On 2016/03/30 at 22:40:14, rdevlin.cronin wrote: > > A ...
4 years, 8 months ago (2016-03-31 21:33:16 UTC) #61
rhogan
Yes, it should be fine. I've removed the Win10 specific failure expectations for a group ...
4 years, 8 months ago (2016-03-31 21:44:05 UTC) #63
rhogan
Yes, it should be fine. I've removed the Win10 specific failure expectations for a group ...
4 years, 8 months ago (2016-03-31 21:44:05 UTC) #64
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1817873002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1817873002/220001
4 years, 8 months ago (2016-03-31 21:45:36 UTC) #66
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/190459)
4 years, 8 months ago (2016-03-31 22:33:38 UTC) #68
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1817873002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1817873002/240001
4 years, 8 months ago (2016-04-01 06:45:29 UTC) #71
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years, 8 months ago (2016-04-01 08:29:48 UTC) #73
commit-bot: I haz the power
4 years, 8 months ago (2016-04-01 08:31:27 UTC) #75
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/a7fd168b96a0f6896b4a4e3d88921998e56f49c0
Cr-Commit-Position: refs/heads/master@{#384518}

Powered by Google App Engine
This is Rietveld 408576698