From d56d139f37d8b652e8c820dcf40ff9cc582f5d93 Mon Sep 17 00:00:00 2001 From: Ian Kilpatrick Date: Fri, 2 Jul 2021 15:04:43 -0700 Subject: [PATCH] [wpt] Fix grid-item (no) aspect-ratio tests. Renaming scheme got lost, however basically: grid-item-no-aspect-ratio-stretch-4.html -> grid-item-aspect-ratio-stretch-1.html grid-item-no-aspect-ratio-stretch-5.html -> grid-item-aspect-ratio-stretch-2.html grid-item-no-aspect-ratio-stretch-6.html -> grid-item-aspect-ratio-stretch-3.html grid-item-no-aspect-ratio-stretch-7.html -> grid-item-aspect-ratio-stretch-4.html These tests all had a viewBox defining a valid aspect-ratio. Due to: https://github.com/w3c/csswg-drafts/issues/6286#issuecomment-866986544 These tests *should* have an aspect-ratio, and when stretched in one dimension, should reflect to the other dimension (if unconstrained). See: https://github.com/w3c/csswg-drafts/issues/5713#issuecomment-755791551 The below two tests basically just got renamed: grid-item-no-aspect-ratio-stretch-8.html -> grid-item-no-aspect-ratio-stretch-4.html grid-item-no-aspect-ratio-stretch-9.html -> grid-item-no-aspect-ratio-stretch-5.html grid-item-no-aspect-ratio-stretch-10.html -> grid-item-no-aspect-ratio-stretch-6.html But tests updated to correctly assert that the natural size would still be respected. To all these test-cases I also added "grid-template: 100% / 100%;" as there is further complexity when inside an auto row/column which is tested elsewhere. (Transferred minimum size for replaced elements with an aspect-ratio). Bug: 1114013 Change-Id: I062f67e291cc62fa63a53370595780dae16abf3b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3003564 Reviewed-by: David Grogan Reviewed-by: Kurt Catti-Schmidt Commit-Queue: Ian Kilpatrick Cr-Commit-Position: refs/heads/master@{#898351} --- .../grid-item-aspect-ratio-stretch-1-ref.html | 51 ++++++++++++++++++ ... => grid-item-aspect-ratio-stretch-1.html} | 8 +-- .../grid-item-aspect-ratio-stretch-2-ref.html | 51 ++++++++++++++++++ ... => grid-item-aspect-ratio-stretch-2.html} | 8 +-- .../grid-item-aspect-ratio-stretch-3-ref.html | 52 +++++++++++++++++++ ... => grid-item-aspect-ratio-stretch-3.html} | 9 ++-- ...grid-item-aspect-ratio-stretch-4-ref.html} | 10 ++-- ... => grid-item-aspect-ratio-stretch-4.html} | 6 ++- ...id-item-no-aspect-ratio-stretch-4-ref.html | 12 ++--- .../grid-item-no-aspect-ratio-stretch-4.html | 3 +- ...id-item-no-aspect-ratio-stretch-5-ref.html | 12 ++--- .../grid-item-no-aspect-ratio-stretch-5.html | 3 +- ...id-item-no-aspect-ratio-stretch-6-ref.html | 13 +++-- .../grid-item-no-aspect-ratio-stretch-6.html | 3 +- ...id-item-no-aspect-ratio-stretch-8-ref.html | 27 ---------- 15 files changed, 201 insertions(+), 67 deletions(-) create mode 100644 css/css-grid/alignment/grid-item-aspect-ratio-stretch-1-ref.html rename css/css-grid/alignment/{grid-item-no-aspect-ratio-stretch-8.html => grid-item-aspect-ratio-stretch-1.html} (71%) create mode 100644 css/css-grid/alignment/grid-item-aspect-ratio-stretch-2-ref.html rename css/css-grid/alignment/{grid-item-no-aspect-ratio-stretch-9.html => grid-item-aspect-ratio-stretch-2.html} (71%) create mode 100644 css/css-grid/alignment/grid-item-aspect-ratio-stretch-3-ref.html rename css/css-grid/alignment/{grid-item-no-aspect-ratio-stretch-10.html => grid-item-aspect-ratio-stretch-3.html} (71%) rename css/css-grid/alignment/{grid-item-no-aspect-ratio-stretch-7-ref.html => grid-item-aspect-ratio-stretch-4-ref.html} (79%) rename css/css-grid/alignment/{grid-item-no-aspect-ratio-stretch-7.html => grid-item-aspect-ratio-stretch-4.html} (78%) delete mode 100644 css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-8-ref.html diff --git a/css/css-grid/alignment/grid-item-aspect-ratio-stretch-1-ref.html b/css/css-grid/alignment/grid-item-aspect-ratio-stretch-1-ref.html new file mode 100644 index 00000000000000..1120e45f5ce96f --- /dev/null +++ b/css/css-grid/alignment/grid-item-aspect-ratio-stretch-1-ref.html @@ -0,0 +1,51 @@ + + +Reference: stretching works for replaced items with a fallback aspect ratio + + + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-8.html b/css/css-grid/alignment/grid-item-aspect-ratio-stretch-1.html similarity index 71% rename from css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-8.html rename to css/css-grid/alignment/grid-item-aspect-ratio-stretch-1.html index 933ddd0504efe9..909406f5e9e75e 100644 --- a/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-8.html +++ b/css/css-grid/alignment/grid-item-aspect-ratio-stretch-1.html @@ -1,11 +1,12 @@ -stretching works for replaced items with no aspect ratio +stretching works for replaced items with a fallback aspect ratio - + + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-9.html b/css/css-grid/alignment/grid-item-aspect-ratio-stretch-2.html similarity index 71% rename from css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-9.html rename to css/css-grid/alignment/grid-item-aspect-ratio-stretch-2.html index 367adae9eb74d5..f5b733029c267a 100644 --- a/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-9.html +++ b/css/css-grid/alignment/grid-item-aspect-ratio-stretch-2.html @@ -1,11 +1,12 @@ -stretching works for replaced items with no aspect ratio +stretching works for replaced items with a fallback aspect ratio - + + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-10.html b/css/css-grid/alignment/grid-item-aspect-ratio-stretch-3.html similarity index 71% rename from css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-10.html rename to css/css-grid/alignment/grid-item-aspect-ratio-stretch-3.html index 6d8d7e848c24d6..43202541b2eb14 100644 --- a/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-10.html +++ b/css/css-grid/alignment/grid-item-aspect-ratio-stretch-3.html @@ -1,11 +1,12 @@ -stretching works for replaced items with no aspect ratio +stretching works for replaced items with a fallback aspect ratio - + + -
-
-
-
-
-
-
-