Commit 247f8835 authored by Ian Kilpatrick's avatar Ian Kilpatrick Committed by moz-wptsync-bot
Browse files

Bug 1721673 [wpt PR 29739] - [GridNG] Re-compute grid with a forced initial...

Bug 1721673 [wpt PR 29739] - [GridNG] Re-compute grid with a forced initial block-size indefinite., a=testonly

Automatic update from web-platform-tests
[GridNG] Re-compute grid with a forced initial block-size indefinite.

Flexbox is able to force an item (the grid in this case) to have an
indefinite initial block-size. (See testcase for exact scenario).

Grid will typically re-compute the grid with the final used block-size.
The current behaviour might have a grid sized at 100px, but a single
auto track sized at 0px.

The complexity here is that we can't ignore indefinite initial
block-size as we need to compute the IntrinsicBlockSize correctly, as
flexbox will use this value in its algorithm.

The fix is to check when we have this flag set, and if this block-size
*is* definite (ignoring this flag) re-compute the grid in the outer
2nd-pass.

Bug: 1055258
Change-Id: I469ecc26c32ddc13a7285b8cb749eef17a317ec9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2994864


Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: David Grogan <dgrogan@chromium.org>
Reviewed-by: default avatarDavid Grogan <dgrogan@chromium.org>
Reviewed-by: default avatarKurt Catti-Schmidt <kschmi@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#904057}

--

wpt-commits: 297ea5f85e4a95fc2133731ddfdefcb456c469de
wpt-pr: 29739
parent d520b3d5
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
<!DOCTYPE html>
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/4852">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1055258">
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<p>Test passes if there is a filled green square.</p>
<div style="display: flex; flex-direction: column; min-height: 100px; width: 100px;">
  <div style="display: grid; flex: 1; background: red;">
    <div style="background: green;"></div>
  </div>
</div>