From 8ea569e6477d2a583d3a7a2160853d41a77f95f3 Mon Sep 17 00:00:00 2001 From: Ian Kilpatrick Date: Wed, 3 Nov 2021 10:56:49 -0700 Subject: [PATCH] [GridFragmentation] Add MinSizeShouldEncompassIntrinsicSize. This flag will allow us to ensure we don't have content overflow, even if we have a stretch block-size applied to a grid-item. This will be used to "expand" the grid row according to: https://drafts.csswg.org/css-grid-1/#fragmentation-alg if required. Bug: 614667 Change-Id: I9d045996698a22ca8205296e8b16601288e63c53 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3246331 Commit-Queue: Ian Kilpatrick Reviewed-by: Kurt Catti-Schmidt Reviewed-by: Morten Stenshorne Reviewed-by: Alison Maher Cr-Commit-Position: refs/heads/main@{#937958} --- .../grid/grid-item-fragmentation-010.html | 13 +++++++++++++ .../grid/grid-item-fragmentation-011.html | 13 +++++++++++++ .../grid/grid-item-fragmentation-012.html | 13 +++++++++++++ .../grid/grid-item-fragmentation-013.html | 13 +++++++++++++ .../grid/grid-item-fragmentation-014.html | 14 ++++++++++++++ .../grid/grid-item-fragmentation-015.html | 13 +++++++++++++ .../grid/grid-item-fragmentation-016.html | 14 ++++++++++++++ .../grid/grid-item-fragmentation-017.html | 14 ++++++++++++++ 8 files changed, 107 insertions(+) create mode 100644 css/css-break/grid/grid-item-fragmentation-010.html create mode 100644 css/css-break/grid/grid-item-fragmentation-011.html create mode 100644 css/css-break/grid/grid-item-fragmentation-012.html create mode 100644 css/css-break/grid/grid-item-fragmentation-013.html create mode 100644 css/css-break/grid/grid-item-fragmentation-014.html create mode 100644 css/css-break/grid/grid-item-fragmentation-015.html create mode 100644 css/css-break/grid/grid-item-fragmentation-016.html create mode 100644 css/css-break/grid/grid-item-fragmentation-017.html diff --git a/css/css-break/grid/grid-item-fragmentation-010.html b/css/css-break/grid/grid-item-fragmentation-010.html new file mode 100644 index 00000000000000..bd57ef797ad2eb --- /dev/null +++ b/css/css-break/grid/grid-item-fragmentation-010.html @@ -0,0 +1,13 @@ + + + +Tests that a grid-item with a min-content min-track grows due to fragmentation. +

Test passes if there is a filled green square and no red.

+
+
+
+
+
+
+
+
diff --git a/css/css-break/grid/grid-item-fragmentation-011.html b/css/css-break/grid/grid-item-fragmentation-011.html new file mode 100644 index 00000000000000..e353537827bcb9 --- /dev/null +++ b/css/css-break/grid/grid-item-fragmentation-011.html @@ -0,0 +1,13 @@ + + + +Tests that a grid-item with auto track(s) grows due to fragmentation. +

Test passes if there is a filled green square and no red.

+
+
+
+
+
+
+
+
diff --git a/css/css-break/grid/grid-item-fragmentation-012.html b/css/css-break/grid/grid-item-fragmentation-012.html new file mode 100644 index 00000000000000..c3b206e26c5943 --- /dev/null +++ b/css/css-break/grid/grid-item-fragmentation-012.html @@ -0,0 +1,13 @@ + + + +Tests that a grid-item with a flexible track grows due to fragmentation. +

Test passes if there is a filled green square and no red.

+
+
+
+
+
+
+
+
diff --git a/css/css-break/grid/grid-item-fragmentation-013.html b/css/css-break/grid/grid-item-fragmentation-013.html new file mode 100644 index 00000000000000..a1e7106e239b12 --- /dev/null +++ b/css/css-break/grid/grid-item-fragmentation-013.html @@ -0,0 +1,13 @@ + + + +Tests that a grid-item with a minmax(0, auto) track inside an auto-grid grows due to fragmentation. +

Test passes if there is a filled green square and no red.

+
+
+
+
+
+
+
+
diff --git a/css/css-break/grid/grid-item-fragmentation-014.html b/css/css-break/grid/grid-item-fragmentation-014.html new file mode 100644 index 00000000000000..09c95d1840fee9 --- /dev/null +++ b/css/css-break/grid/grid-item-fragmentation-014.html @@ -0,0 +1,14 @@ + + + +Tests that a grid-item with a minmax(0, auto) track inside a non-auto-grid *doesn't* grow due to fragmentation. +

Test passes if there is a filled green square and no red.

+
+
+
+
+
+
+
+
+
diff --git a/css/css-break/grid/grid-item-fragmentation-015.html b/css/css-break/grid/grid-item-fragmentation-015.html new file mode 100644 index 00000000000000..6dd82de5822e3d --- /dev/null +++ b/css/css-break/grid/grid-item-fragmentation-015.html @@ -0,0 +1,13 @@ + + + +Tests that a grid-item with a minmax(0, 1fr) track inside an auto-grid grows due to fragmentation. +

Test passes if there is a filled green square and no red.

+
+
+
+
+
+
+
+
diff --git a/css/css-break/grid/grid-item-fragmentation-016.html b/css/css-break/grid/grid-item-fragmentation-016.html new file mode 100644 index 00000000000000..c16f740bd51dab --- /dev/null +++ b/css/css-break/grid/grid-item-fragmentation-016.html @@ -0,0 +1,14 @@ + + + +Tests that a grid-item with a minmax(0, 1fr) track inside a non-auto-grid *doesn't* grow due to fragmentation. +

Test passes if there is a filled green square and no red.

+
+
+
+
+
+
+
+
+
diff --git a/css/css-break/grid/grid-item-fragmentation-017.html b/css/css-break/grid/grid-item-fragmentation-017.html new file mode 100644 index 00000000000000..a5c1abeb122339 --- /dev/null +++ b/css/css-break/grid/grid-item-fragmentation-017.html @@ -0,0 +1,14 @@ + + + +Tests that a grid-item with a fixed track *doesn't* grow due to fragmentation. +

Test passes if there is a filled green square and no red.

+
+
+
+
+
+
+
+
+