New issue
Advanced search Search tips

Issue 612755 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 79180



Sign in to add a comment

[css-grid] Height percentages are not properly resolved for item's children

Project Member Reported by r...@igalia.com, May 18 2016

Issue description


This is very easy to reproduce, in a grid with just one cell (200px x 100px).
The item will be stretching by default, so it takes the whole size of the cell.
However if you've a child of the item with width and height 100%.
The child doesn't take the whole height, only the whole width.

See the attached example or check it live at:
http://jsbin.com/cinili/1/edit?html,css,output

It might be related with the definite/indefinite issues from this thread:
https://lists.w3.org/Archives/Public/www-style/2016Apr/0329.html
 
percentage-height-item-children.html
271 bytes View Download
percentage-height-item-children-current.png
2.3 KB View Download
percentage-height-item-children-expected.png
2.2 KB View Download

Comment 1 by r...@igalia.com, Jun 6 2016

Owner: r...@igalia.com
Status: Started (was: Available)
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 9 2016

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

commit 8df0592ed1d737d3d9db4b704ffe8d033f14ac28
Author: rego <rego@igalia.com>
Date: Thu Jun 09 18:54:46 2016

[css-grid] Fix percentage height on grid item's children

Grid items can be vertically stretched in that case
they store its height on LayoutBox::overrideLogicalContentHeight().
In order to resolve the percentage height on the grid item's children
we need to use that size.

BUG= 612755 
TEST=fast/css-grid-layout/percent-resolution-grid-item-children.html

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

[add] https://crrev.com/8df0592ed1d737d3d9db4b704ffe8d033f14ac28/third_party/WebKit/LayoutTests/fast/css-grid-layout/percent-resolution-grid-item-children.html
[modify] https://crrev.com/8df0592ed1d737d3d9db4b704ffe8d033f14ac28/third_party/WebKit/Source/core/layout/LayoutBox.cpp

Comment 3 by r...@igalia.com, Jun 9 2016

Status: Fixed (was: Started)
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 15 2016

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

commit 8df0592ed1d737d3d9db4b704ffe8d033f14ac28
Author: rego <rego@igalia.com>
Date: Thu Jun 09 18:54:46 2016

[css-grid] Fix percentage height on grid item's children

Grid items can be vertically stretched in that case
they store its height on LayoutBox::overrideLogicalContentHeight().
In order to resolve the percentage height on the grid item's children
we need to use that size.

BUG= 612755 
TEST=fast/css-grid-layout/percent-resolution-grid-item-children.html

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

[add] https://crrev.com/8df0592ed1d737d3d9db4b704ffe8d033f14ac28/third_party/WebKit/LayoutTests/fast/css-grid-layout/percent-resolution-grid-item-children.html
[modify] https://crrev.com/8df0592ed1d737d3d9db4b704ffe8d033f14ac28/third_party/WebKit/Source/core/layout/LayoutBox.cpp

Sign in to add a comment