Bug 1655602 [wpt PR 24773] - [FlexNG] Fix flex-item grid layout explosion., a=testonly

Automatic update from web-platform-tests
[FlexNG] Fix flex-item grid layout explosion.

When we had a column flex-item, which was also a grid, where the percent
template added up to something >100% on each layout the grid would grow
larger.

This was caused by some logic to fix relative-positioned children in:
https://chromium-review.googlesource.com/c/chromium/src/+/2093273

However when this value was read within layout, it could refer to the
previous layout. If numerous layouts occurred sequentially, this would
cause the layouts to grow unbounded.

This patch disables this path when read during layout for a flex-item
(in NG). During layout the flex-item should have a BoxLayoutExtraInput
set.

Bug: 1108928
Change-Id: I4d0d41755c9d33eb2b4c217ee6bfdb1acd48cbbf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2320418
Reviewed-by: David Grogan <dgrogan@chromium.org>
Commit-Queue: David Grogan <dgrogan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792193}

--

wpt-commits: f153a0513f12e53717c45b5bf1f1aaa2e3d02f87
wpt-pr: 24773
This commit is contained in:
Ian Kilpatrick 2020-07-30 13:06:07 +00:00 коммит произвёл moz-wptsync-bot
Родитель 0c6a0133c2
Коммит 46815c5b4c
1 изменённых файлов: 15 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,15 @@
<!DOCTYPE html>
<link rel="help" href="https://crbug.com/1108928">
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<p>Test passes if there is a filled green square.</p>
<div id="target">
<div style="display: flex; flex-direction: column">
<div style="display: grid; height: 0; flex: 1; grid-template-rows: minmax(100px, 200%);">
<div style="background: green;"></div>
</div>
</div>
</div>
<script>
document.body.offsetTop;
document.getElementById('target').style.width = '100px';
</script>