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

Issue 705256 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

devtools shows wrong height for table cell that holds a %height inline-block

Project Member Reported by dgro...@chromium.org, Mar 26 2017

Issue description

Chrome Version       : 57.0.2987.110 -> 59.0.3051.3 (current canary)
OS Version: at least Linux and Windows
URLs (if applicable) : https://jsfiddle.net/dgrogan/1vq4zy9a/
Other browsers tested:
Edge 13: OK
Firefox 55.0a1: OK

What steps will reproduce the problem?
1. Open https://jsfiddle.net/dgrogan/1vq4zy9a/
2. Inspect the table cell that holds the green div

What is the expected result?
Height is 104, accounting for the height between the baseline and the bottom edge of the td's content box. (FF shows 104, Edge shows 103.8)

What happens instead of that?
Height is 100

https://jsfiddle.net/dgrogan/1vq4zy9a/

There is also probably a layout issue, as it appears that the div overflows the top of the cell. But Edge does the same thing.

Changing the div's height to 100px instead of 100% makes Chrome correctly show the td height as 104: https://jsfiddle.net/dgrogan/1vq4zy9a/3/
 
ChromeShows100.png
2.3 KB View Download
FirefoxShows104.png
173 KB View Download
EdgeShows103.8.png
85.2 KB View Download
Cc: lushnikov@chromium.org
I think this might be working as intended. The div is overflowing the top of the box, and when a child overflows it's parent we don't increase the displayed height of the parent. If you put a background color on the table cell, it creates a 20x100 box. However the highlight devtools puts on the box is 104px.

Edge draws a 100px box if you put in a background color, but shows 103.8px as its height. Adding overflow hidden to the table cell cuts off the top in edge, but still shows 103.8px for the height.

Setting the div's height to 100px stops it from overflowing. I am not sure where the extra 4 pixels are coming from, but they are there.

@lushnikov do you know what the intended behavior should be?
Cc: -lushnikov@chromium.org
Components: -Platform>DevTools Blink>Layout
This is not a devtools issue, it's a layout problem. I believe it's chrome trying to recover from invalid states.

the td is a "display: table-cell;", the div is a "display: inline-block;".

If the td changes to "display: block" it works as expected or if the div is changed to some other displays it works.

If you toggle the "display: inline-block" on the div, it shows more issues (possibly the same issue, but easier to recreate?)

I am going to send it off to the layout team to further investigate.
Cc: allada@chromium.org
Components: -Blink>Layout Blink>Layout>Table
Status: Available (was: Untriaged)
Project Member

Comment 4 by sheriffbot@chromium.org, Apr 11 2018

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
Status: Available (was: Untriaged)

Sign in to add a comment