New issue
Advanced search Search tips

Issue 685609 link

Starred by 2 users

Issue metadata

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

Blocking:
issue 79180



Sign in to add a comment

[css-grid] Issue with percentages in orthogonal items

Project Member Reported by r...@igalia.com, Jan 26 2017

Issue description


In the attached example we've an orthogonal item, if we set its width to 100%
the size of the grid container is wrongly computed.

Note that the track size is properly calculated and the column is 75px,
but the width of the container is 0px.
 
percentage-orthogonal-grid-item.html
234 bytes View Download
percentage-orthogonal-grid-item.png
5.8 KB View Download
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 30 2017

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

commit fe510c12d470f2227b0f7c63b94633618a37c7ab
Author: svillar <svillar@igalia.com>
Date: Thu Mar 30 15:44:58 2017

[css-grid] Improve intrinsic size computation with orthogonal flows

FrameView performs an initial pre-layout of orthogonal items so that
preferred logical widths could be computed even with orthogonal flows. The
problem is that pre-layout is done based on the render tree hierarchy
something that is not valid for grids. The reason why is not valid is
because the containers of grid items are the grid areas not the grid
container. That was causing incorrect intrinsic size computations of grid
containers with orthogonal items.

From now on we skip that pre-layout for orthogonal items and do it on demand
in the track sizing algorithm code once the grid areas (the override
containing blocks) are set. This change gives us much better results in
several cases apart from fixing some others that were plainly wrong (like
orthogonal items with percentage sizes).

BUG= 685609 

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

[modify] https://crrev.com/fe510c12d470f2227b0f7c63b94633618a37c7ab/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-track-sizing-with-orthogonal-flows.html
[modify] https://crrev.com/fe510c12d470f2227b0f7c63b94633618a37c7ab/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-track-sizing-with-percentages-and-orthogonal-flows.html
[modify] https://crrev.com/fe510c12d470f2227b0f7c63b94633618a37c7ab/third_party/WebKit/LayoutTests/fast/css-grid-layout/repeating-layout-must-produce-the-same-results.html
[modify] https://crrev.com/fe510c12d470f2227b0f7c63b94633618a37c7ab/third_party/WebKit/Source/core/frame/FrameView.cpp
[modify] https://crrev.com/fe510c12d470f2227b0f7c63b94633618a37c7ab/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.cpp
[modify] https://crrev.com/fe510c12d470f2227b0f7c63b94633618a37c7ab/third_party/WebKit/Source/core/layout/GridTrackSizingAlgorithm.h

Comment 2 by svil...@igalia.com, Mar 30 2017

Status: Fixed (was: Available)
Closing this now that it's fixed.

Sign in to add a comment