New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 778837 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Nov 8
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows
Pri: 2
Type: Bug



Sign in to add a comment

Increasing Print Scaling to 150% cuts off the end of the print job

Reported by drew.lei...@gmail.com, Oct 26 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Steps to reproduce the problem:
1.navigate to http://bookdb.nextgoodbook.com/newsletter/w/4fa8b866d4531e52107cba56a114616b/l/155203/printer
2.Open print menu
3.In "more settings" increase scaling to 150%
4.Scroll to the bottom of the print preview to see it is cutting off the end of the print job.

What is the expected behavior?
I would expect to still see the entirety of the pages I am trying to print regardless of if I scale the job up or down. I would expect if a job is scaled up and runs off of one page that a new page would be generated with the additional content.

What went wrong?
I assume the length of the scaled up content is not being calculated properly and thus if it runs past the end of one page a new page is not being created for that content. With the scale set to 100% the length and preview is being calculated correctly so I assume there is a problem in the way the scale option is programmed.

Did this work before? N/A 

Chrome version: 61.0.3163.100  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 27.0 r0

Not sure if this worked before or not.
 
Cc: divya.pa...@techmahindra.com
Components: Internals>Printing
Labels: M-64 Triaged-ET
Status: Untriaged (was: Unconfirmed)
Able to reproduce this issue on reported version 61.0.3163.100, latest stable 62.0.3202.75 and latest canary 64.0.3251.0 using Win 7, Win 10

This issue is seen from M57 i.e; 57.0.2926.0 from the introduction of scaling. Hence considering this issue as Non-regression and marking as Untriaged.

NOTE: Issue is not seen on Ubunutu 14.04 and Mac 10.12.6
Components: Blink>Layout
Labels: OS-Linux
The issue appears to be laying out the page into an area narrower than the window size (for purposes of layout scaling up is the same as printing to a smaller page). I can reproduce the same cut off behavior by setting page size to A5 paper with 100% scaling if I have the browser window fully maximized. The case described here as well as A5 paper works if you shrink the browser window before opening the preview. This seems to be related to the page CSS applying various widths based on the width of the media - simplified test case attached. +Blink>Layout as this looks like it may be layout related and the page gets cut off in Print Browser mode also.

RE: comment 1, did you test with different browser window sizes on Linux/Mac vs Windows? I was able to reproduce this on Linux, and it seems likely this is common to all platforms.
778837_test.html
5.6 KB View Download
778837_styles.css
266 bytes View Download

Comment 3 by e...@chromium.org, Oct 31 2017

Cc: robho...@gmail.com
Status: Available (was: Untriaged)
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4c9edd832c4cf110cb73e2000f415da43a465681

commit 4c9edd832c4cf110cb73e2000f415da43a465681
Author: Robert Hogan <robhogan@gmail.com>
Date: Mon Nov 06 19:01:50 2017

Set the page size for printing before laying out for print

ResizeForPrinting() used to be called before the page was laid
out for print. This made sense because the size of the webview
has an effect on the way the contents are laid out. In the case of this
bug for example, the width available to the layout depends on the width
of the media thanks to a css query and that determines the number of pages
required to print/preview the doc.

In https://codereview.chromium.org/2089373002 and
https://bugs.chromium.org/p/chromium/issues/detail?id=567317 ResizeForPrinting()
was moved because it was felt this was causing CSS transitions to be triggered
and adversely affecting the layout. 

Unfortunately none of the tests in that bug were successfully automated in the CL
and in manual testing the tests in the CL and the bug now pass regardless of the
position of the ResizeForPrinting() call in StartPrinting().

So this CL reverts crrev.com/2089373002 by moving ResizeForPrinting()
back to where it was since it doesn't appear to have had any positive effect.

Bug:  778837 
Change-Id: I492546756266bd1eecf1b5d155c3f3daaed694e7
Reviewed-on: https://chromium-review.googlesource.com/749949
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Robert Hogan <robhogan@gmail.com>
Cr-Commit-Position: refs/heads/master@{#514199}
[modify] https://crrev.com/4c9edd832c4cf110cb73e2000f415da43a465681/components/printing/renderer/print_render_frame_helper.cc
[modify] https://crrev.com/4c9edd832c4cf110cb73e2000f415da43a465681/components/printing/test/print_render_frame_helper_browsertest.cc

Project Member

Comment 5 by sheriffbot@chromium.org, Nov 7

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Owner: robho...@gmail.com
Status: Fixed (was: Untriaged)
Looks like it's fixed.

Sign in to add a comment