New issue
Advanced search Search tips

Issue 667057 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 79180



Sign in to add a comment

[css-grid] "Implied Minimum Size of Grid Items" for overflow:hidden items is wrong

Project Member Reported by mpalmg...@mozilla.com, Nov 19 2016

Issue description

Version: 56.0.2914.3 (Official Build) dev (64-bit)
OS: Linux

What steps will reproduce the problem?
(1) load the attached testcase
(2)
(3)

What is the expected result?
The two grids should look the same.

What happens instead?
The row height in the first grid is too large.
(illustrated by the height of the cyan colored item)

Relevant CSS Grid spec text:
https://drafts.csswg.org/css-grid/#min-size-auto
"
... also applies an automatic minimum size in the specified axis
to grid items whose 'overflow' is 'visible'.
"

The grey grid item has "overflow:hidden" so the "automatic minimum size"
part of "Implied Minimum Size of Grid Items" does NOT apply.

(I suspect that's what you're doing because if I remove
the "overflow:hidden" then I get the same result in Firefox.)
 
grid-item-auto-min-size-overflow-hidden.html
845 bytes View Download
Here's a testcase using overflow:auto, which is more realistically what
a web developer might do.
grid-item-auto-min-size-overflow-auto.html
696 bytes View Download

Comment 2 by r...@igalia.com, Nov 21 2016

Blocking: 79180
Cc: svil...@igalia.com jfernan...@igalia.com
Owner: r...@igalia.com
Status: Available (was: Untriaged)
Yes it seems it's wrong in both cases with overflow "hidden" and "auto",
thanks for reporting.

Comment 3 by r...@igalia.com, Nov 23 2016

Status: Started (was: Available)
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 24 2016

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

commit 0670a81ba8de8f6c7dbb4c34a613a5e1f1777a8d
Author: rego <rego@igalia.com>
Date: Thu Nov 24 19:40:45 2016

[css-grid] Implied minimum size only applies if overflow is visible

Before this was manged in LayoutBox, but since we removed that code in
https://codereview.chromium.org/2398043002, we were not longer verifying
if overflow is or not visible.

BUG= 667057 
TEST=fast/css-grid-layout/grid-item-overflow.html

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

[add] https://crrev.com/0670a81ba8de8f6c7dbb4c34a613a5e1f1777a8d/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-overflow-expected.html
[add] https://crrev.com/0670a81ba8de8f6c7dbb4c34a613a5e1f1777a8d/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-overflow.html
[modify] https://crrev.com/0670a81ba8de8f6c7dbb4c34a613a5e1f1777a8d/third_party/WebKit/Source/core/layout/LayoutGrid.cpp

Comment 5 by r...@igalia.com, Nov 24 2016

Status: Fixed (was: Started)

Sign in to add a comment