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

Issue 678414 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Viewport units (vw) not matching percentage values relative to ICB anymore

Reported by r...@opera.com, Jan 4 2017

Issue description

I don't know exactly how page sizes and zooming works for printing, but I would expect the two divs below to have the same width in print preview:

<!DOCTYPE html>
<style>
  body { margin:0 }
  div { border: 1px solid black }
  #div1 { width: 50vw }
  #div2 { width: 50% }
</style>
<div id="div1">DIV 1</div>
<div id="div2">DIV 2</div>

55.0.2883.87 - OK
57.0.2950.4  - FAIL

I noticed that the zoom factor in print preview is be different between the two versions. The text is tinier in the newer version.

 

Comment 1 by ajha@chromium.org, Jan 17 2017

Cc: ajha@chromium.org
Components: Blink>CSS
Labels: -Pri-3 -Needs-Bisect hasbisect-per-revision ReleaseBlock-Stable M-56 OS-Mac OS-Windows Pri-1
Owner: bokan@chromium.org
Status: Assigned (was: Untriaged)
Able to reproduce the issue on the latest beta(56.0.2924.59) and the latest canary(57.0.2983.0) on Windows-10 & Linux Ubuntu 14.04. Worked fine on Mac OS 10.12.2.

Regressed in M-56.

Last good build: 56.0.2909.0
First bad build: 56.0.2910.0

Changelog:
==========
https://chromium.googlesource.com/chromium/src/+log/24d56bdf74c6e4c11e96f5b4f331112dba8aeaaf..7f8de7508a3e8098ed174c59daa5b068808382f8

bokan@: Could you please take a look at this.

Thank you!

Note: Attached is the test file with the above test case.
678414
219 bytes View Download
Your bug is labelled as Stable Release Block, please make sure to land the fix and get it merged into the release branch ASAP so we can take it for next week's Beta release for Desktop. Thank you!

Comment 3 by bokan@chromium.org, Jan 17 2017

Yup, will look today

Comment 4 by bokan@chromium.org, Jan 17 2017

Status: Started (was: Assigned)

Comment 5 by bokan@chromium.org, Jan 18 2017

Found the issue, will have a fix in tomorrow.
Project Member

Comment 6 by bugdroid1@chromium.org, Jan 19 2017

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

commit b9d998089be2a4ee8a304730a814386168f84641
Author: bokan <bokan@chromium.org>
Date: Thu Jan 19 18:54:40 2017

Fix viewport unit sizes when printing.

FrameView::viewportSizeForViewportUnits had a special path for inert top
controls that used FrameView::layoutSize directly. The old path used
LayoutView::viewWidth and LayoutView::viewHeight which normally resolve to
FrameView::layoutSize but has a special case for when we're in printing mode.
This patch uses the LayoutView version and only special cases the adjustment
made for the URL bar.

BUG= 678414 

Review-Url: https://codereview.chromium.org/2643903002
Cr-Commit-Position: refs/heads/master@{#444803}

[modify] https://crrev.com/b9d998089be2a4ee8a304730a814386168f84641/third_party/WebKit/Source/core/frame/FrameView.cpp
[modify] https://crrev.com/b9d998089be2a4ee8a304730a814386168f84641/third_party/WebKit/Source/web/tests/WebViewTest.cpp

Comment 7 by bokan@chromium.org, Jan 20 2017

Labels: Merge-Request-56
.Confirmed fix in latest Windows Canary. Requesting merge to 56.
Project Member

Comment 8 by sheriffbot@chromium.org, Jan 20 2017

Labels: -Merge-Request-56 Hotlist-Merge-Approved Merge-Approved-56
Your change meets the bar and is auto-approved for M56. Please go ahead and merge the CL to branch 2924 manually. Please contact milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), gkihumba@(cros), bustamante@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 9 by bugdroid1@chromium.org, Jan 20 2017

Labels: -merge-approved-56 merge-merged-2924
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5246d47f2bb96bea8d40a2838c1a018e1ce53325

commit 5246d47f2bb96bea8d40a2838c1a018e1ce53325
Author: David Bokan <bokan@chromium.org>
Date: Fri Jan 20 19:41:07 2017

Fix viewport unit sizes when printing.

FrameView::viewportSizeForViewportUnits had a special path for inert top
controls that used FrameView::layoutSize directly. The old path used
LayoutView::viewWidth and LayoutView::viewHeight which normally resolve to
FrameView::layoutSize but has a special case for when we're in printing mode.
This patch uses the LayoutView version and only special cases the adjustment
made for the URL bar.

BUG= 678414 

Review-Url: https://codereview.chromium.org/2643903002
Cr-Commit-Position: refs/heads/master@{#444803}
(cherry picked from commit b9d998089be2a4ee8a304730a814386168f84641)

Review-Url: https://codereview.chromium.org/2650473003 .
Cr-Commit-Position: refs/branch-heads/2924@{#820}
Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059}

[modify] https://crrev.com/5246d47f2bb96bea8d40a2838c1a018e1ce53325/third_party/WebKit/Source/core/frame/FrameView.cpp

Comment 10 by bokan@chromium.org, Jan 20 2017

Status: Fixed (was: Started)
Cc: rbasuvula@chromium.org
Labels: TE-Verified-M56 TE-Verified-56.0.2924.76
Tested the issue on Windows-7, Ubuntu 14.04 and Mac OS 10.12.2 using chrome latest Beta M56-56.0.2924.76 by following steps mentioned in the original comment. Observed that both div's are displaying in print preview as expected.Hence adding TE-Verified label.
Please find the screen shot for reference.

Thank you!
678414.png
98.6 KB View Download

Sign in to add a comment