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

Issue 2672983003: Implements PrintBrowser mode. (Closed)

Created:
3 years, 10 months ago by gozzard
Modified:
3 years, 10 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dglazkov+blink, jam, kinuko+watch, nasko+codewatch_chromium.org, gozzardam_gmail.com
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implements PrintBrowser mode. Added --enable-print-browser runtime flag. Renders the frame in print mode in response to the enable-print-browser runtime flag. Currently defaults to dimensions of A4 portrait paper and is set to show background graphics. This functionality is dependent on slimming paint v2, which is automatically enabled if needed. This can be invoked from the command line with: content_shell --enable-print-browser "http://example.com" The virtual test environment can be run using: run-webkit-tests virtual/print_browser Design doc: https://docs.google.com/document/d/1G2RoH7yiwh_vosEHsHTwqETBvt2ij8p9ov0D3kIz4ww/edit?usp=sharing BUG=667547 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2672983003 Cr-Commit-Position: refs/heads/master@{#449585} Committed: https://chromium.googlesource.com/chromium/src/+/080936f5193590e65409c60127a510f71e910d73

Patch Set 1 #

Total comments: 2

Patch Set 2 : Merge with dependant and fixes #

Total comments: 8

Patch Set 3 : Add tests and respond to comments #

Total comments: 10

Patch Set 4 : Respond to comments #

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -4 lines) Patch
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/child/runtime_features.cc View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/common/content_switches.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/VirtualTestSuites View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/print_testharness/README.txt View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/virtual/print_browser/print_testharness/README.txt View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/virtual/print_browser/print_testharness/test_enable_print_browser.html View 1 2 1 chunk +26 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.h View 1 2 3 chunks +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 2 3 4 7 chunks +45 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp View 1 2 3 4 2 chunks +8 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintInvalidator.cpp View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5 View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebRuntimeFeatures.cpp View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebRuntimeFeatures.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 42 (22 generated)
gozzard
PTAL
3 years, 10 months ago (2017-02-03 05:31:56 UTC) #3
nainar
lgtm
3 years, 10 months ago (2017-02-03 05:49:03 UTC) #6
gozzard
PTAL
3 years, 10 months ago (2017-02-03 05:50:21 UTC) #8
gozzard
On 2017/02/03 at 05:50:21, gozzard wrote: > PTAL Bump. Sorry to nag, @creis, @nasko, but ...
3 years, 10 months ago (2017-02-07 00:57:51 UTC) #11
nasko
Please merge the two CLs, as adding a feature flag with no difference in behavior ...
3 years, 10 months ago (2017-02-07 19:46:13 UTC) #12
gozzard
Merged in crrev.com/2671953002 as per request. Responded to comments from both that CL and this ...
3 years, 10 months ago (2017-02-08 00:49:51 UTC) #14
gozzard
On 2017/02/08 at 00:49:51, gozzard wrote: > Merged in crrev.com/2671953002 as per request. > > ...
3 years, 10 months ago (2017-02-08 00:54:22 UTC) #16
pdr.
Cool feature! This will be useful for testing print bugs in blink too. https://codereview.chromium.org/2672983003/diff/20001/third_party/WebKit/Source/core/frame/FrameView.cpp File ...
3 years, 10 months ago (2017-02-08 04:28:05 UTC) #19
gozzard
PTAL. https://codereview.chromium.org/2672983003/diff/20001/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2672983003/diff/20001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode2933 third_party/WebKit/Source/core/frame/FrameView.cpp:2933: if (!m_frame->document()->printing()) { On 2017/02/08 at 04:28:05, pdr. ...
3 years, 10 months ago (2017-02-08 05:40:20 UTC) #20
nasko
content/ bits LGTM.
3 years, 10 months ago (2017-02-08 05:43:15 UTC) #21
pdr.
I think this looks pretty reasonable. Is there a good owner for this code once ...
3 years, 10 months ago (2017-02-08 06:34:08 UTC) #24
mstensho (USE GERRIT)
Just some nit-picking from me. pdr reported some real issues / concerns, so I'll leave ...
3 years, 10 months ago (2017-02-08 14:32:29 UTC) #27
gozzard
Thanks for all the feedback. PTAL. https://codereview.chromium.org/2672983003/diff/40001/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2672983003/diff/40001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode2905 third_party/WebKit/Source/core/frame/FrameView.cpp:2905: if (!m_frame->document()->printing()) { ...
3 years, 10 months ago (2017-02-09 04:17:26 UTC) #28
pdr.
LGTM. Just a small note, you'll need to rebase because RuntimeEnabledFeatures.in has evolved into RuntimeEnabledFeatures.json5. ...
3 years, 10 months ago (2017-02-10 01:03:21 UTC) #29
gozzard
PTAL nainar
3 years, 10 months ago (2017-02-10 01:26:49 UTC) #31
nainar
On 2017/02/10 at 01:26:49, gozzard wrote: > PTAL nainar Yup, this lgtm. Happy to maintain ...
3 years, 10 months ago (2017-02-10 01:51:19 UTC) #32
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/2672983003/80001
3 years, 10 months ago (2017-02-10 02:53:06 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_TIMED_OUT, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/307196) chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, ...
3 years, 10 months ago (2017-02-10 08:53:52 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/2672983003/80001
3 years, 10 months ago (2017-02-10 09:30:29 UTC) #39
commit-bot: I haz the power
3 years, 10 months ago (2017-02-10 10:59:48 UTC) #42
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/080936f5193590e65409c60127a5...

Powered by Google App Engine
This is Rietveld 408576698