New issue
Advanced search Search tips

Issue 719445 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[css-grid] Baseline Alignment offset does not change auto-sized tracks' height when grid container has fixed height

Project Member Reported by jfernan...@igalia.com, May 8 2017

Issue description

Chrome Version: (trunk)
OS: all

What steps will reproduce the problem?
(1) Load the attached case
(2)
(3)

What is the expected result?

The test is rendered like the attached png.

What happens instead?

The magenta track doesn't grow when its grid item is moved down because of the baseline alignment offset. Hence, the item overflows and it's painted over the yellow track bellow.

 
baseline-auto-sized-tracks-issue.html
437 bytes View Download
baseline-auto-sized-tracks-issue.png
636 bytes View Download

Comment 3 Deleted

There is a patch almost ready, just pending of the last reviews. See issue https://crrev.com/2868283002 for details.

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 11 2017

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

commit 3d184fc5f831f45ca9a5f75f3d04f33e3f5dc2df
Author: jfernandez <jfernandez@igalia.com>
Date: Tue Jul 11 03:49:10 2017

[css-grid] Check if baseline alignment affects grid areas sizing

The bug this CL intend to fix has a very specific root cause; we were
wrongly assuming that we need to repeat the track sizing algorithm only
if baseline alignment may change the grid container's intrinsic size.

Actually, the spec states that we should run a new iteration of the
sizing algorithm if any of the grid items has changed its min-content
contribution. This affects to the grid item's container, hence the
grid area, but not necessarily to the grid container.

Since we were running the baseline alignment logic after the first run
of the tracks sizing algorithm, we were relying on the extra run to
adjust the grid areas' size based on the resulting baseline alignment
offsets.

This patch fixes the bug by comparing the grid areas's size with the
baseline extent of their items, triggering the extra tracks sizing cycle
when necessary.

BUG= 719445 

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

[add] https://crrev.com/3d184fc5f831f45ca9a5f75f3d04f33e3f5dc2df/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/self-baseline/grid-self-baseline-changes-grid-area-size-001.html
[add] https://crrev.com/3d184fc5f831f45ca9a5f75f3d04f33e3f5dc2df/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/self-baseline/grid-self-baseline-changes-grid-area-size-002.html
[add] https://crrev.com/3d184fc5f831f45ca9a5f75f3d04f33e3f5dc2df/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/self-baseline/grid-self-baseline-changes-grid-area-size-003.html
[add] https://crrev.com/3d184fc5f831f45ca9a5f75f3d04f33e3f5dc2df/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/self-baseline/grid-self-baseline-changes-grid-area-size-004.html
[add] https://crrev.com/3d184fc5f831f45ca9a5f75f3d04f33e3f5dc2df/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/self-baseline/grid-self-baseline-changes-grid-area-size-005.html
[add] https://crrev.com/3d184fc5f831f45ca9a5f75f3d04f33e3f5dc2df/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/self-baseline/grid-self-baseline-changes-grid-area-size-006.html
[add] https://crrev.com/3d184fc5f831f45ca9a5f75f3d04f33e3f5dc2df/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/self-baseline/grid-self-baseline-changes-grid-area-size-007.html
[add] https://crrev.com/3d184fc5f831f45ca9a5f75f3d04f33e3f5dc2df/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/self-baseline/grid-self-baseline-changes-grid-area-size-008.html
[add] https://crrev.com/3d184fc5f831f45ca9a5f75f3d04f33e3f5dc2df/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/self-baseline/grid-self-baseline-changes-grid-area-size-009.html
[add] https://crrev.com/3d184fc5f831f45ca9a5f75f3d04f33e3f5dc2df/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/self-baseline/grid-self-baseline-changes-grid-area-size-010.html
[add] https://crrev.com/3d184fc5f831f45ca9a5f75f3d04f33e3f5dc2df/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/self-baseline/grid-self-baseline-changes-grid-area-size-011.html
[add] https://crrev.com/3d184fc5f831f45ca9a5f75f3d04f33e3f5dc2df/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/alignment/self-baseline/grid-self-baseline-changes-grid-area-size-012.html
[modify] https://crrev.com/3d184fc5f831f45ca9a5f75f3d04f33e3f5dc2df/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
[modify] https://crrev.com/3d184fc5f831f45ca9a5f75f3d04f33e3f5dc2df/third_party/WebKit/Source/core/layout/LayoutGrid.h

Status: Fixed (was: Assigned)
This issue should be FIXED now.

Sign in to add a comment