Skip to content

Commit

Permalink
[flex] Avoid layout when determining the intrinsic block-size.
Browse files Browse the repository at this point in the history
https://chromium-review.googlesource.com/c/chromium/src/+/5749947
Did some changes to correctly call kContent & kIntrinsic within flex
for the purposes of determining flex-basis.

This uncovered a bug where we'd layout a flex-item (with an
aspect-ratio, and a container-query container), and not correctly
relayout when the size changed.

This is the first part of the mitigation. E.g. when we have size
containment we don't need to run layout to determine the intrinsic
block-size.

There is a set of other issues in this area. But this mitigates the
regression for the moment.

Bug: 370480725
Change-Id: I8301a424fca86392c2ec1a7cfcf867142e413b31
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5901118
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: David Grogan <dgrogan@chromium.org>
Reviewed-by: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1363322}
  • Loading branch information
bfgeek authored and chromium-wpt-export-bot committed Oct 2, 2024
1 parent f458a7d commit 5e053f0
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<link rel="help" href="https://crbug.com/370480725">
<link rel="match" href="/css/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; width: 100px;">
<div style="aspect-ratio: 1; container-type: size;">
<div style="width:100%; height:100cqh; background: green;"></div>
</div>
</div>

0 comments on commit 5e053f0

Please sign in to comment.