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

Issue 817342 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

<td> size computed incorrectly (DPI rounding issues), causing text inside <td> to wrap

Reported by jer...@duckware.com, Feb 28 2018

Issue description

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

Example URL:
http://www.vsynctester.com

Steps to reproduce the problem:
Visit vsynctester.com (on a Windows system where system zoom is 100%) and play around with page zoom (both in and out) and take notice of the table at the bottom of the web page

What is the expected behavior?
Chrome is deciding the <td> size.  As such, there should never be text wrap.

What went wrong?
At certain zoom levels, text inside <td> will improperly wrap.  Is this causes by Chrome computing a <td> size that is rounded down, when it should instead be computed size that is ceil()?

Regardless, if Chrome knows that the size is not big enough to display the text and must wrap the text -- surely it can use the proper size "up front" so that text does not have to wrap later.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? Yes Before chrome made changes to how browser zoom was implemented

Does this work in other browsers? Yes

Chrome version: 64.0.3282.186  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version:
 
works.jpg
41.5 KB View Download
fails-wrap.jpg
34.1 KB View Download

Comment 1 by jer...@duckware.com, Feb 28 2018

Attachments above are from a laptop with 1366x768 screen at '90%' zoom level.

Also, click once inside vsynctester.com window and look for debug (window.devicePixelRatio) 'dpr=#' value.  On the problem system, at 90% browser zoom, dpr is .8999999761581421, a strange value.

Comment 2 by jer...@duckware.com, Feb 28 2018

Smallest test case that reproduces the issue: https://www.duckware.com/test/chrome/table.html:

  <html><body>
  <table><tr><td>Chrome is broken</td><td width=30></td></tr></table>
  </body></html>

where "broken" is on a second line (or not), depending upon page zoom in Chrome.

Comment 3 by woxxom@gmail.com, Feb 28 2018

Bisect info using #c2: 495725 (good) - 495746 (bad)
https://chromium.googlesource.com/chromium/src/+log/c20ed0be..2b9cc988?pretty=fuller
Suspecting r495736 = 27d732d9364e1f139dafdbacc813318b5a9a852f = https://crrev.com/c/619603 by wangxianzhu@chromium.org
"Reland Devirtualize LayoutBoxModelObject logical orientation border/margin/padding accessors"
Landed in 62.0.3190.0

A similar  issue 777156  was fixed for the text inside a table cell, but not for separate cells as shown in this report.
Labels: Needs-Triage-M64 Needs-Bisect
Cc: sindhu.chelamcherla@chromium.org
Components: -Blink Blink>Layout>Table
Labels: -Type-Bug -Pri-2 -Needs-Bisect hasbisect-per-revision Triaged-ET RegressedIn-64 M-64 Target-65 FoundIn-66 Target-66 FoundIn-64 FoundIn-65 Target-64 OS-Linux OS-Mac Pri-1 Type-Bug-Regression
Owner: wangxianzhu@chromium.org
Status: Assigned (was: Unconfirmed)
Able to reproduce this issue on reported version 64.0.3282.186 and on latest canary 66.0.3357.0 using Windows 10, Mac 10.13.3 and Ubuntu 14.04 with link given in comment#0. i.e; wrapping of text is not proper on zoom in/out.

Good Build: 62.0.3189.0
Bad Build: 62.0.3190.0

You are probably looking for a change made after 495735 (known good), but no later than 495736 (first known bad).
CHANGELOG URL:
 https://chromium.googlesource.com/chromium/src/+log/47bf178b9802260a023f43f3170ca7b4e6242163..27d732d9364e1f139dafdbacc813318b5a9a852f

Reviewed-on: https://chromium-review.googlesource.com/619603

Suspecting same from changelog.

@ wangxianzhu: Please confirm the bug and help in re-assigning if it is not related to your change. Adding RB-Stable for M-64. Please change if not the case.

Thanks!
Labels: -M-64 -Target-64
Will target 65.
Labels: -Pri-1 Pri-2
Similar to  bug 777156 , the root cause of the bug is incomplete subpixel layout support in tables (bug 377847). I think my CL just changed how the bug behaves in some particular cases. The fix (workaround actually) will be also similar to the fix for  bug 777156 .
Project Member

Comment 8 by bugdroid1@chromium.org, Mar 5 2018

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

commit 14350ac7143cb3ec2a216d5f14233f532b8ca87a
Author: Xianzhu Wang <wangxianzhu@chromium.org>
Date: Mon Mar 05 23:52:21 2018

[PE] Don't truncate table cell's padding

Truncation caused inadequate logical width when padding is like 1.7px.

Bug:  817342 
Change-Id: Ibdb76cc528cc7e04801fe65409bb8f60e5ac69a5
Reviewed-on: https://chromium-review.googlesource.com/943827
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540991}
[add] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/external/wpt/css/css-tables/width-distribution/td-with-subpixel-padding.html
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/linux/transforms/bounding-rect-zoom-expected.png
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/linux/transforms/bounding-rect-zoom-expected.txt
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/transforms/bounding-rect-zoom-expected.png
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/mac/tables/mozilla_expected_failures/bugs/bug89315-expected.png
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/mac/transforms/bounding-rect-zoom-expected.png
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/mac/transforms/bounding-rect-zoom-expected.txt
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/win/transforms/bounding-rect-zoom-expected.png
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/LayoutTests/platform/win/transforms/bounding-rect-zoom-expected.txt
[modify] https://crrev.com/14350ac7143cb3ec2a216d5f14233f532b8ca87a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp

Labels: -RegressedIn-64 -Target-65 RegressedIn-62 Merge-Request-66
Project Member

Comment 10 by sheriffbot@chromium.org, Mar 7 2018

Labels: -Merge-Request-66 Merge-Approved-66 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M66. Please go ahead and merge the CL to branch 3359 manually. Please contact milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), josafat@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Pls merge your change to M66 branch 3359 ASAP so we can pick it up for next dev release. Thank you..
Project Member

Comment 12 by bugdroid1@chromium.org, Mar 8 2018

Labels: -merge-approved-66 merge-merged-3359
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/43780a522b4fb6a40bfa7b6ba25c5c608736a52c

commit 43780a522b4fb6a40bfa7b6ba25c5c608736a52c
Author: Xianzhu Wang <wangxianzhu@chromium.org>
Date: Thu Mar 08 02:42:55 2018

[PE] Don't truncate table cell's padding

Truncation caused inadequate logical width when padding is like 1.7px.

TBR=wangxianzhu@chromium.org

(cherry picked from commit 14350ac7143cb3ec2a216d5f14233f532b8ca87a)

Bug:  817342 
Change-Id: Ibdb76cc528cc7e04801fe65409bb8f60e5ac69a5
Reviewed-on: https://chromium-review.googlesource.com/943827
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#540991}
Reviewed-on: https://chromium-review.googlesource.com/954059
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/branch-heads/3359@{#83}
Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276}
[add] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/external/wpt/css/css-tables/width-distribution/td-with-subpixel-padding.html
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/linux/transforms/bounding-rect-zoom-expected.png
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/linux/transforms/bounding-rect-zoom-expected.txt
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/mac-mac10.12/transforms/bounding-rect-zoom-expected.png
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/mac/tables/mozilla_expected_failures/bugs/bug89315-expected.png
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/mac/transforms/bounding-rect-zoom-expected.png
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/mac/transforms/bounding-rect-zoom-expected.txt
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/win/transforms/bounding-rect-zoom-expected.png
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/LayoutTests/platform/win/transforms/bounding-rect-zoom-expected.txt
[modify] https://crrev.com/43780a522b4fb6a40bfa7b6ba25c5c608736a52c/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment