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

Issue 2116283002: Don't let rounding prematurely influence document size when printing (Closed)

Created:
4 years, 5 months ago by rhogan
Modified:
4 years, 4 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, blink-reviews-dom_chromium.org, blink-reviews-layout_chromium.org, chromium-reviews, dcheng, dglazkov+blink, eae+blinkwatch, jchaffraix+rendering, kinuko+watch, leviw+renderwatch, mlamouri+watch-blink_chromium.org, mstensho (USE GERRIT), pdr+renderingwatchlist_chromium.org, rwlbuis, sof, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@620456-2
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't let rounding prematurely influence document size when printing Don't round away subpixel values when they can still make a difference to the size of the document. We convert back and forth between different DPIs so we can lose a pixel or two along the way if we don't retain subpixel values to the end. BUG=467579 Committed: https://crrev.com/53c779cbb1a137fd5781422c67f36c3354382bc8 Cr-Commit-Position: refs/heads/master@{#409469}

Patch Set 1 #

Patch Set 2 : bug 467579 #

Patch Set 3 : bug 467579 #

Total comments: 2

Patch Set 4 : bug 467579 #

Patch Set 5 : bug 467579 #

Patch Set 6 : bug 467579 #

Total comments: 1

Patch Set 7 : bug 467579 #

Total comments: 6

Patch Set 8 : bug 467579 #

Patch Set 9 : bug 467579 #

Patch Set 10 : bug 467579 #

Patch Set 11 : bug 467579 #

Patch Set 12 : bug 467579 #

Total comments: 8

Patch Set 13 : bug 467579 #

Patch Set 14 : bug 467579 #

Patch Set 15 : bug 467579 #

Patch Set 16 : bug 467579 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+209 lines, -34 lines) Patch
M components/printing/renderer/print_web_view_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +10 lines, -19 lines 0 comments Download
M printing/units.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M printing/units.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M printing/units_unittest.cc View 1 2 3 4 1 chunk +11 lines, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/printing/iso-page-in-inches.html View 1 chunk +21 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/printing/iso-page-in-inches-expected.txt View 1 chunk +3 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/printing/iso-page-in-points.html View 1 chunk +21 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/printing/iso-page-in-points-expected.txt View 1 chunk +3 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/printing/page-and-element-geometry-match.html View 1 chunk +21 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/printing/page-and-element-geometry-match-expected.txt View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/page/PrintContext.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +3 lines, -2 lines 0 comments Download
A third_party/WebKit/public/platform/WebDoubleSize.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +101 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebLocalFrame.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 78 (40 generated)
rhogan
4 years, 5 months ago (2016-07-05 18:32:40 UTC) #3
Lei Zhang
UnitsTest.Convertions is failing. I'm trying to do some code archaeology to figure out why the ...
4 years, 5 months ago (2016-07-06 18:26:45 UTC) #4
Lei Zhang
So does printing::ConvertUnit() actually need to take a double? If not, leave it alone and ...
4 years, 5 months ago (2016-07-06 18:46:43 UTC) #5
rhogan
On 2016/07/06 at 18:46:43, thestig wrote: > So does printing::ConvertUnit() actually need to take a ...
4 years, 5 months ago (2016-07-07 21:53:18 UTC) #6
Lei Zhang
On 2016/07/07 21:53:18, rhogan wrote: > On 2016/07/06 at 18:46:43, thestig wrote: > > So ...
4 years, 5 months ago (2016-07-07 22:43:36 UTC) #7
Lei Zhang
... otherwise I think this is looking good.
4 years, 5 months ago (2016-07-07 22:46:59 UTC) #8
rhogan
On 2016/07/07 at 22:46:59, thestig wrote: > ... otherwise I think this is looking good. ...
4 years, 5 months ago (2016-07-11 18:14:09 UTC) #9
Lei Zhang
non Blink bits lgtm https://codereview.chromium.org/2116283002/diff/100001/third_party/WebKit/public/web/WebFrame.h File third_party/WebKit/public/web/WebFrame.h (right): https://codereview.chromium.org/2116283002/diff/100001/third_party/WebKit/public/web/WebFrame.h#newcode88 third_party/WebKit/public/web/WebFrame.h:88: struct WebFloatSize; Move to WebLocalFrame.h?
4 years, 5 months ago (2016-07-12 17:02:24 UTC) #10
rhogan
eae@ - could you give it a look for blink?
4 years, 5 months ago (2016-07-12 21:52:25 UTC) #12
eae
This does not look correct to me. Pages should always have a size in full-pixels. ...
4 years, 5 months ago (2016-07-12 22:26:39 UTC) #13
rhogan
https://codereview.chromium.org/2116283002/diff/120001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2116283002/diff/120001/third_party/WebKit/Source/core/dom/Document.cpp#newcode1998 third_party/WebKit/Source/core/dom/Document.cpp:1998: float width = pageSize.width(); On 2016/07/12 at 22:26:39, eae ...
4 years, 5 months ago (2016-07-13 18:27:13 UTC) #14
eae
https://codereview.chromium.org/2116283002/diff/120001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2116283002/diff/120001/third_party/WebKit/Source/core/dom/Document.cpp#newcode1998 third_party/WebKit/Source/core/dom/Document.cpp:1998: float width = pageSize.width(); On 2016/07/13 18:27:13, rhogan wrote: ...
4 years, 5 months ago (2016-07-13 20:42:26 UTC) #15
rhogan
On 2016/07/13 at 20:42:26, eae wrote: > > In that case we need to use ...
4 years, 5 months ago (2016-07-17 18:40:14 UTC) #16
eae
LGTM Thank you!
4 years, 5 months ago (2016-07-18 17:00:41 UTC) #17
Lei Zhang
On 2016/07/18 17:00:41, eae wrote: > LGTM > > Thank you! ++lgtm ++thanks
4 years, 5 months ago (2016-07-18 18:41:37 UTC) #18
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/2116283002/200001
4 years, 5 months ago (2016-07-20 07:03:10 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/221283)
4 years, 5 months ago (2016-07-20 07:14:34 UTC) #27
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/2116283002/220001
4 years, 5 months ago (2016-07-20 20:13:21 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/221685)
4 years, 5 months ago (2016-07-20 20:22:25 UTC) #32
Lei Zhang
Looks like we need more OWNERS? +dglazkov
4 years, 5 months ago (2016-07-20 20:26:12 UTC) #34
rhogan
pdr: have you got time to take a look?
4 years, 5 months ago (2016-07-22 13:38:57 UTC) #36
dglazkov
lgtm
4 years, 5 months ago (2016-07-22 14:25:24 UTC) #37
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/2116283002/220001
4 years, 5 months ago (2016-07-22 14:48:33 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/267479)
4 years, 5 months ago (2016-07-22 16:10:17 UTC) #41
pdr.
Why are the non-printing pixel tests different? Particularly zoom-hixie-mixed; I wouldn't have expected that to ...
4 years, 5 months ago (2016-07-22 16:34:19 UTC) #42
esprehn
Can we just pixel inflate instead? We usually just round up. Please fix comments before ...
4 years, 5 months ago (2016-07-22 17:03:09 UTC) #44
rhogan
On 2016/07/22 at 17:03:09, esprehn wrote: > Can we just pixel inflate instead? We usually ...
4 years, 5 months ago (2016-07-24 12:02:55 UTC) #53
rhogan
On 2016/07/22 at 16:34:19, pdr wrote: > Why are the non-printing pixel tests different? Particularly ...
4 years, 5 months ago (2016-07-24 12:05:25 UTC) #54
pdr.
On 2016/07/24 at 12:05:25, robhogan wrote: > On 2016/07/22 at 16:34:19, pdr wrote: > > ...
4 years, 5 months ago (2016-07-25 16:09:26 UTC) #59
rhogan
On 2016/07/24 at 12:02:55, rhogan wrote: > On 2016/07/22 at 17:03:09, esprehn wrote: > > ...
4 years, 4 months ago (2016-07-27 12:43:45 UTC) #60
rhogan
On 2016/07/24 at 12:02:55, rhogan wrote: > On 2016/07/22 at 17:03:09, esprehn wrote: > > ...
4 years, 4 months ago (2016-07-27 12:43:47 UTC) #61
rhogan
On 2016/07/27 at 12:43:47, rhogan wrote: > On 2016/07/24 at 12:02:55, rhogan wrote: > > ...
4 years, 4 months ago (2016-07-29 14:18:58 UTC) #62
esprehn
I hope we can move the printing code into blink eventually and stop with all ...
4 years, 4 months ago (2016-08-02 18:01:59 UTC) #63
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/2116283002/280001
4 years, 4 months ago (2016-08-02 18:03:39 UTC) #66
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/44968) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 4 months ago (2016-08-02 18:07:44 UTC) #68
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/2116283002/300001
4 years, 4 months ago (2016-08-03 06:23:17 UTC) #75
commit-bot: I haz the power
Committed patchset #16 (id:300001)
4 years, 4 months ago (2016-08-03 06:35:10 UTC) #76
commit-bot: I haz the power
4 years, 4 months ago (2016-08-03 06:36:41 UTC) #78
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/53c779cbb1a137fd5781422c67f36c3354382bc8
Cr-Commit-Position: refs/heads/master@{#409469}

Powered by Google App Engine
This is Rietveld 408576698