mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-12 06:08:24 +02:00
Automatic update from web-platform-tests [FlexNG] Use previous constraint space for layout roots. Devtools had an issue where elements were sized at 0px height. This was caused by the relayout boundary logic not working correctly. In Devtools these elements had layout and size containment triggering ObjectIsRelayoutBoundary() to return true. The call to NGConstraintSpace::CreateFromLayoutObject for this flex-item was incorrect as it wasn't using the stretched size (as we don't set HasOverrideLogicalWidth(), etc). This refactors the various callers of NGConstraintSpace::CreateFromLayoutObject and create a new method UpdateInFlowBlockLayout which contains the previously (duplicated) logic. This new method will try and use the previous constraint space (if it is a layout root), instead of creating it. Bug: 845235 Change-Id: I52ddb9d58ae010305b980657bb434a30d5b7fbbb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2010983 Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by: David Grogan <dgrogan@chromium.org> Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#734420} -- wpt-commits: fb09ccb613400a3a0327967063cb1117cea96468 wpt-pr: 21308
14 lines
683 B
HTML
14 lines
683 B
HTML
<!DOCTYPE html>
|
|
<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
|
|
<link rel="help" href="https://drafts.csswg.org/css-flexbox/" />
|
|
<meta name="assert" content="Tests that certain dynamic changes don't lead to a flex item being sized as zero, instead of its stretched size." />
|
|
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
|
<div style="display: flex; width: 100px; height: 100px; background: red;">
|
|
<div style="contain: layout size; height: 100px; flex: 1; background: green;">
|
|
<div id="target"></div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
document.body.offsetTop;
|
|
document.getElementById('target').style.width = '1px';
|
|
</script>
|