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

Issue 789745 link

Starred by 11 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug-Regression



Sign in to add a comment

Uneven height of td element when using fractional heights on children

Reported by michalmm...@gmail.com, Nov 29 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36

Steps to reproduce the problem:
1. Create an html table in which table cells have various content (images / text).
2. Set font size with vw units.
3. Set size of images with vw units.
4. Notice in devtools that height of table cells differs.

Full working examples: 
1. https://stackoverflow.com/questions/47561966/chrome-td-height-when-using-vw
2. https://jsfiddle.net/Lh6wqts6/

What is the expected behavior?
Table cells within a row should have exact same height.

What went wrong?
Height of table cells differs slightly if in a single row there are cells with content of various height set with vw unit.

These differences are sub-pixel values (usually between 0.1 - 0.5px). At some screen resolutions, when this difference is particularly high (ca. 0.5px), this leads to clearly visible misaligned borders (see attachments).

Did this work before? Yes 61.0.3163.100

Does this work in other browsers? Yes

Chrome version: 62.0.3202.94  Channel: stable
OS Version: Ubuntu 14.04
Flash Version: 

Tested on Browserstack Win10 / Chrome 61 and works as expected.
Tested on Ubuntu 14.04 / Firefox 57 and works as expected.
 
selection1.png
11.6 KB View Download
selection2.png
11.9 KB View Download
selection3.png
10.5 KB View Download
Labels: Needs-Triage-M62

Comment 2 by shans@chromium.org, Nov 30 2017

Labels: Needs-Bisect
Status: Untriaged (was: Unconfirmed)
Components: Blink>Layout>Subpixel
Labels: -Pri-2 -Needs-Bisect hasbisect-per-revision Triaged-ET M-64 OS-Mac OS-Windows Pri-1
Owner: e...@chromium.org
Status: Assigned (was: Untriaged)
Able to reproduce the issue on Windows 10, mac 10.12.6 and Ubuntu 14.04 using chrome reported version #62.0.3202.94 and latest canary #64.0.3281.0.

Bisect Information:
=====================
Good build: 62.0.3169.0    Revision(490187)
Bad Build : 62.0.3170.0    Revision(490562)

Change Log URL: 
https://chromium.googlesource.com/chromium/src/+log/97eedd95bbffdf6b2a24494a599a5089bcad1f94..abc4634436dd4fc1b909ec04e589288464d432aa

From the above change log suspecting below change
Change-Id: I15850c55d54fbb0c885d4040be3c90ea2a51d7ca
Reviewed-on: https://chromium-review.googlesource.com/543141

eae@ - Could you please check whether this is caused with respect to author: karlo@ change, if not please help us in assigning it to the right owner.
Note: Assigning it to the reviewer of the issue as the author doesn't seems to be available since 30 days.

Thanks...!!
Cc: ligim...@chromium.org
Labels: -M-64 ReleaseBlock-Stable RegressedIn-62 M-65 Target-65 FoundIn-64 FoundIn-65 FoundIn-63
This is a recent regression, can we get a fix during M65 time frame?

Comment 5 by e...@chromium.org, Dec 14 2017

Owner: kojii@chromium.org
Would you mind taking a look at this when you get a chance kojii?

Comment 6 by kojii@chromium.org, Dec 19 2017

Labels: Needs-Feedback
I can see dev tools reporting different height, but can't reproduce visible misaligned borders in Canary. Some of the suspect was changed in  issue 771318  and I wonder if this is no longer reproducible.

Can you please:
1. Check with Canary and see if this is still reproducible?
2. If so, this isn't about the "vw" units, but about setting fractional length to the height of <img>. Can you tell us the computed height of <img>s when it reproduces? You can probably reproduce by replacing "vw" values with computed "px" values. It helps to reproduce without making my window size exactly the same as yours.

Comment 7 by kojii@chromium.org, Dec 19 2017

Cc: robho...@gmail.com

Comment 8 by robho...@gmail.com, Dec 19 2017

I can't reproduce the testcase either.
michalmmalik@ Ping! Could you please respond for the comment #6 ?

Thanks!
Hi all,

"I can see dev tools reporting different height, but can't reproduce visible misaligned borders in Canary."

Isn't it a sufficient indication of an incorrect behavior? Why would <td /> elements within a single row be of various height in the first place? Seeing misaligned lines is only a side-effect.

"1. Check with Canary and see if this is still reproducible?"

Just checked on Version 65.0.3298.3 (Official Build) dev (64-bit) / Ubuntu 16.04.
The issue is still reproducible.

"If so, this isn't about the "vw" units, but about setting fractional length to the height of <img>. Can you tell us the computed height of <img>s when it reproduces? You can probably reproduce by replacing "vw" values with computed "px" values. It helps to reproduce without making my window size exactly the same as yours."

See attached files.

Cheers,
Michal
Update: uploaded correct files.


img1.png
12.8 KB View Download
img2.png
14.1 KB View Download
Labels: -Pri-1 -ReleaseBlock-Stable Pri-3
Removing RBS as there's no user visible regression but only values in dev tools. Maybe JS getBoundingClientRect() is affected too, haven't checked yet, but that doesn't seem to qualify RBS/p1. Please feel free to change it back if this understanding doesn't look good.
I do not agree that there is no user-visible regression.

As I mentioned in my previous post, when using Canary, I still can *fully* reproduce the bug I described in the initial post. This includes visible misalignment of table lines (on some screen widths). Take a closer look at the recently uploaded images (down right cell of the table).
Components: -Blink>CSS
Labels: -M-65
#13:
> Take a closer look at the recently uploaded images (down right cell of the table).

Confirmed, thank you for pointing this out.
> Needs-Feedback

What kind of feedback do you need? Can I help you solve this problem, somehow?
Labels: -Needs-Feedback
Thank you for checking, no it was left over. Removed.
Cc: mstensho@chromium.org dgro...@chromium.org
Components: Blink>Layout>Table
Summary: Uneven height of td element when using fractional heights on children (was: Uneven height of td element when using vw unit to set height)
Attaching simplified test case (no need for vw or images). The test uses getBoundingClientRect().height on two sibling table cells differ by a fraction of a pixel. I checked, and I can see that the LayoutBox::frame_rect_ heights do actually differ.

I cannot reproduce the border glitch (with the jsfiddle demo), though.
tc.html
584 bytes View Download

Sign in to add a comment