Skip to content

Commit

Permalink
Correctly check if a column flex container has definite block-size.
Browse files Browse the repository at this point in the history
We used to get confused by flex containers with unresolvable percentage
block-size.

(cherry picked from commit 40e6ab6)

Bug: 1410949
Change-Id: I8497643a34e29526d865092962c13f0de5f7b7c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4203111
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Alison Maher <almaher@microsoft.com>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1098963}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4209390
Auto-Submit: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/branch-heads/5563@{#84}
Cr-Branched-From: 3ac59a6-refs/heads/main@{#1097615}
  • Loading branch information
mstensho authored and Chromium LUCI CQ committed Feb 1, 2023
1 parent 1a38412 commit 04a493e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2714,7 +2714,7 @@ bool NGFlexLayoutAlgorithm::MinBlockSizeShouldEncompassIntrinsicSize(

if (is_column_) {
bool can_shrink = item_style.ResolvedFlexShrink(Style()) != 0.f &&
!Style().LogicalHeight().IsAutoOrContentOrIntrinsic();
IsColumnContainerMainSizeDefinite();

// Only allow growth if the item can't shrink and the flex-basis is
// content-based.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1410949">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="columns:2; column-fill:auto; gap:0; width:100px; height:100px; background:red;">
<div>
<div style="display:flex; flex-flow:column; height:100%;">
<div style="overflow:clip; background:green;">
<div style="height:10px;"></div>
<div style="break-inside:avoid; height:100px;"></div>
</div>
</div>
</div>
</div>

0 comments on commit 04a493e

Please sign in to comment.