commit 850aae4548ea835103da4adaa8475ff37135db5e parent 6e07bafeca84659e3ed68fc8bbbdaf8c2bf31f27 Author: Alison Maher <almaher@microsoft.com> Date: Thu, 9 Oct 2025 18:06:38 +0000 Bug 1992104 [wpt PR 55135] - [Masonry] Use growth limit to determine intrinsic auto repeat, a=testonly Automatic update from web-platform-tests [Masonry] Use growth limit to determine intrinsic auto repeat Per the issue brought up in [1], it was recommended to use the max content size instead of the min content size when determining the number of track sizes to ensure we don't end up sizing the rows based on the compressible replaced elements min content size for images. This change addresses this by using the growth limit of tracks during the initial track sizing pass for intrinsic auto repeats to determine the number of auto repeats. There were some tests that needed updating as a result, but the results seem reasonable enough. [1] https://github.com/w3c/csswg-drafts/issues/12563 Bug: 343257585 Change-Id: Ibc3d33f3c29cd6c60dca71bacc4c2d640b6e1991 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6991134 Reviewed-by: Kurt Catti-Schmidt <kschmi@microsoft.com> Commit-Queue: Alison Maher <almaher@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1522314} -- wpt-commits: 5ea1a2239aa29f1e1f97260785a9be36d266165a wpt-pr: 55135 Diffstat:
6 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/testing/web-platform/tests/css/css-grid/masonry/tentative/track-sizing/auto-repeat/intrinsic-auto-repeat/column-auto-repeat-auto-023-ref.html b/testing/web-platform/tests/css/css-grid/masonry/tentative/track-sizing/auto-repeat/intrinsic-auto-repeat/column-auto-repeat-auto-023-ref.html @@ -3,7 +3,7 @@ <style> .grid { display: grid; - grid-template-columns: auto auto auto; + grid-template-columns: auto; width: 400px; gap: 10px; } diff --git a/testing/web-platform/tests/css/css-grid/masonry/tentative/track-sizing/auto-repeat/intrinsic-auto-repeat/column-auto-repeat-auto-024.html b/testing/web-platform/tests/css/css-grid/masonry/tentative/track-sizing/auto-repeat/intrinsic-auto-repeat/column-auto-repeat-auto-024.html @@ -31,8 +31,7 @@ img { <script> test(function() { let image = document.getElementById("test"); - assert_less_than(image.getBoundingClientRect().width, 2); - assert_greater_than(image.getBoundingClientRect().width, 1); + assert_equals(image.getBoundingClientRect().width, 400); assert_approx_equals(image.getBoundingClientRect().width / image.getBoundingClientRect().height, 113 / 120, .006); }); </script> diff --git a/testing/web-platform/tests/css/css-grid/masonry/tentative/track-sizing/auto-repeat/intrinsic-auto-repeat/column-auto-repeat-auto-027.html b/testing/web-platform/tests/css/css-grid/masonry/tentative/track-sizing/auto-repeat/intrinsic-auto-repeat/column-auto-repeat-auto-027.html @@ -32,8 +32,7 @@ img { <script> test(function() { let image = document.getElementById("test"); - assert_less_than(image.getBoundingClientRect().width, 2); - assert_greater_than(image.getBoundingClientRect().width, 1); + assert_equals(image.getBoundingClientRect().width, 400); assert_equals(image.getBoundingClientRect().width / image.getBoundingClientRect().height, 1); }); </script> diff --git a/testing/web-platform/tests/css/css-grid/masonry/tentative/track-sizing/auto-repeat/intrinsic-auto-repeat/column-auto-repeat-auto-029-ref.html b/testing/web-platform/tests/css/css-grid/masonry/tentative/track-sizing/auto-repeat/intrinsic-auto-repeat/column-auto-repeat-auto-029-ref.html @@ -5,9 +5,9 @@ .grid { display: grid; background: gray; - grid-template-columns: repeat(2, 50px) 150px repeat(3, 100px); + grid-template-columns: repeat(2, 50px) 155px repeat(2, 125px); grid-template-rows: 100px 100px; - width: 500px; + width: 505px; height: 300px; font: 15px/1 Ahem; } diff --git a/testing/web-platform/tests/css/css-grid/masonry/tentative/track-sizing/auto-repeat/intrinsic-auto-repeat/column-auto-repeat-auto-029.html b/testing/web-platform/tests/css/css-grid/masonry/tentative/track-sizing/auto-repeat/intrinsic-auto-repeat/column-auto-repeat-auto-029.html @@ -11,7 +11,7 @@ background: gray; item-tolerance: 0; grid-template-columns: repeat(2, 50px) repeat(auto-fill, auto); - width: 500px; + width: 505px; height: 300px; font: 15px/1 Ahem; } diff --git a/testing/web-platform/tests/css/css-grid/masonry/tentative/track-sizing/auto-repeat/intrinsic-auto-repeat/column-auto-repeat-mixed-intrinsic-004-ref.html b/testing/web-platform/tests/css/css-grid/masonry/tentative/track-sizing/auto-repeat/intrinsic-auto-repeat/column-auto-repeat-mixed-intrinsic-004-ref.html @@ -6,7 +6,7 @@ display: masonry; background: gray; item-tolerance: 0; - grid-template-columns: repeat(2, 120px 50px 120px); + grid-template-columns: 265px 50px 265px; grid-template-rows: 100px 100px 100px; width: 580px; height: 300px;