[css-grid] Incorrect height when item has intrinsic aspect ratio and a definite width |
||||
Issue descriptionImplied Minimum Size section in the specs (https://drafts.csswg.org/css-grid/#min-size-auto) specifies how to compute the value of min-width|height: auto for items with intrinsic aspect ratios. We're doing it correctly if the height of the item is specified (the width is automatically computed using the intrinsic aspect ratio). The problem, as seen in the attached file, is that we don't do that for heights when the width is specified.
,
Mar 14 2016
,
Mar 18 2016
Attaching the same use case, but using fixed sized tracks. Defining a small cell 20x10, the last image is 50px height when it should be 25px height. Note that if you use "justify|align-items: start;" in this example, the issue is not happening anymore.
,
Mar 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f76b5035ab7d677198849bff6cd5c3aa17d78468 commit f76b5035ab7d677198849bff6cd5c3aa17d78468 Author: svillar <svillar@igalia.com> Date: Mon Mar 21 14:53:09 2016 [css-grid] Fix height computation for items with intrinsic aspect ratios We were not computing the height properly for items spanning content or flexible sized tracks having intrinsic aspect ratios because we were returning always the "natural" size, meaning that on an image of 100x50 we're always returning 50, even if the image had a specified width. This change allowed us also to remove a bunch of code imported from flexbox renderer which is actually not really needed in grid. BUG= 592975 Review URL: https://codereview.chromium.org/1778853002 Cr-Commit-Position: refs/heads/master@{#382287} [add] https://crrev.com/f76b5035ab7d677198849bff6cd5c3aa17d78468/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-automatic-minimum-intrinsic-aspect-ratio.html [add] https://crrev.com/f76b5035ab7d677198849bff6cd5c3aa17d78468/third_party/WebKit/LayoutTests/fast/css-grid-layout/resources/blue-100x50.png [modify] https://crrev.com/f76b5035ab7d677198849bff6cd5c3aa17d78468/third_party/WebKit/Source/core/layout/LayoutGrid.cpp [modify] https://crrev.com/f76b5035ab7d677198849bff6cd5c3aa17d78468/third_party/WebKit/Source/core/layout/LayoutGrid.h
,
Oct 6 2016
,
Oct 20 2016
Already fixed |
||||
►
Sign in to add a comment |
||||
Comment 1 by svil...@igalia.com
, Mar 9 2016