Truly independent web browser
Tests: Import the WPT css-sizing grid aspect-ratio tests
Andreas Kling3b01384f81e0
diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-043-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-043-ref.htmlnew file mode 100644index 00000000000..31acb1daa0a--- /dev/null+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-043-ref.html@@ -0,0 +1,3 @@+<!DOCTYPE html>+<p>Test passes if there is a filled green square that is 100px wide and 100px tall.</p>+<div style="width: 100px; height: 100px; background: green;"></div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-001.htmlnew file mode 100644index 00000000000..f7ac75618c1--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-001.html@@ -0,0 +1,22 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: grid item (ratio-dependent: inline)</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid;">+ <div style="background: green; height: 100px; aspect-ratio: 1/1;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-002.htmlnew file mode 100644index 00000000000..b2284c3e8f3--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-002.html@@ -0,0 +1,22 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: grid item (ratio-dependent: block)</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid;">+ <div style="background: green; width: 100px; aspect-ratio: 1/1;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-003.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-003.htmlnew file mode 100644index 00000000000..c3cdb415829--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-003.html@@ -0,0 +1,22 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: grid item (ratio-dependent: inline, on replaced elements)</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid;">+ <img src="support/20x50-green.png" style="height: 100px; aspect-ratio: 1/1;">+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-004.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-004.htmlnew file mode 100644index 00000000000..654ef828642--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-004.html@@ -0,0 +1,22 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: grid item (ratio-dependent: block, on replaced elements)</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid;">+ <img src="support/20x50-green.png" style="width: 100px; aspect-ratio: 1/1;">+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-005.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-005.htmlnew file mode 100644index 00000000000..d28be8726bc--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-005.html@@ -0,0 +1,23 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: grid item (ratio-dependent: inline, on replaced elements) with auto && ratio</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; grid-template-columns: repeat(2, min-content);">+ <img src="support/20x50-green.png" style="height: 100px; aspect-ratio: auto 1/1;">+ <div style="background: green; width: 60px; height: 100px;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-006.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-006.htmlnew file mode 100644index 00000000000..51f46d38078--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-006.html@@ -0,0 +1,23 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: grid item (ratio-dependent: block, on replaced elements) with auto && ratio</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; grid-template-columns: repeat(2, min-content);">+ <img src="support/20x50-green.png" style="width: 40px; aspect-ratio: auto 1/1;">+ <div style="background: green; width: 60px; height: 100px;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-007.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-007.htmlnew file mode 100644index 00000000000..ec35d4bba78--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-007.html@@ -0,0 +1,22 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: grid item (ratio-dependent: block) with larger row track size</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; grid-template-rows: 200px;">+ <div style="background: green; width: 100px; aspect-ratio: 1/1;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-008.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-008.htmlnew file mode 100644index 00000000000..cb72c98b049--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-008.html@@ -0,0 +1,22 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: grid container (ratio-dependent: inline)</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#layout-algorithm">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; height: 100px; aspect-ratio: 1/1;">+ <div style="background: green;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-009.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-009.htmlnew file mode 100644index 00000000000..33277bac347--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-009.html@@ -0,0 +1,22 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: grid container (ratio-dependent: block)</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#layout-algorithm">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; width: 100px; aspect-ratio: 1/1;">+ <div style="background: green;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-010.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-010.htmlnew file mode 100644index 00000000000..93b091e58cb--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-010.html@@ -0,0 +1,22 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: grid item (ratio-dependent: block) with larger row track size</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; grid-template-columns: 200px;">+ <div style="background: green; height: 100px; aspect-ratio: 1/1;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-011.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-011.htmlnew file mode 100644index 00000000000..3ccdf7d4fa6--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-011.html@@ -0,0 +1,22 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: grid item (ratio-dependent: block) with larger row track size</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; grid-template-columns: 200px;">+ <div style="background: green; height: 100px; aspect-ratio: 1/1; writing-mode: vertical-lr;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-012.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-012.htmlnew file mode 100644index 00000000000..df1583bf028--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-012.html@@ -0,0 +1,22 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: grid item (ratio-dependent: block) with larger row track size</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; grid-template-columns: 200px; grid-template-rows: 200px;">+ <div style="background: green; height: 50%; aspect-ratio: 1/1; writing-mode: vertical-lr;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-014.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-014.htmlnew file mode 100644index 00000000000..4783d27ceec--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-014.html@@ -0,0 +1,22 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: items stretched in one axis should respect aspect ratio with stretched size</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; grid-template-columns: 100px; grid-template-rows: 100px;">+ <div style="background: green; aspect-ratio: 1/1; justify-self: stretch;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-015.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-015.htmlnew file mode 100644index 00000000000..cdbb61350f4--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-015.html@@ -0,0 +1,22 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: grid track inline size should respect aspect-ratio and box-sizing</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#algo-track-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; grid-template-columns: auto; width: max-content; background: green;">+ <div style="height: 100px; aspect-ratio: 1/1; padding-top: 50px; box-sizing: border-box;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-017.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-017.htmlnew file mode 100644index 00000000000..11b67ccbd97--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-017.html@@ -0,0 +1,28 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: grid track size should respect aspect-ratio when using+ intrinsic size keywords in grid items with orthogonal writing mode</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#algo-track-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+ .item {+ aspect-ratio: 2/1;+ writing-mode: vertical-lr;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; grid-template-columns: auto; width: min-content; background: green;">+ <div class="item" style="width: 100px; height: min-content;"></div>+ <div class="item" style="width: 100px; height: 1%; min-height: min-content;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-018.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-018.htmlnew file mode 100644index 00000000000..0b9a6939c3d--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-018.html@@ -0,0 +1,25 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: items stretched in inline axis should ignore aspect ratio for inline axis</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; grid-template-columns: 100px; grid-template-rows: 50px;">+ <div style="height: 50px; aspect-ratio: 1/2; justify-self: stretch; background: green;"></div>+</div>+<div style="display: grid; grid-template-columns: 100px; grid-template-rows: 50px;justify-items: stretch">+ <div style="height: 50px; aspect-ratio: 1/2; justify-self: auto; background: green;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-019.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-019.htmlnew file mode 100644index 00000000000..35a1062ce02--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-019.html@@ -0,0 +1,25 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: items stretched in block axis should ignore aspect ratio for block axis</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; grid-template-columns: 100px; grid-template-rows: 50px;">+ <div style="width: 100px; aspect-ratio: 2/1; align-self: stretch; background: green;"></div>+</div>+<div style="display: grid; grid-template-columns: 100px; grid-template-rows: 50px; align-items: stretch">+ <div style="width: 100px; aspect-ratio: 2/1; align-self: auto; background: green;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-020.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-020.htmlnew file mode 100644index 00000000000..600977dc2bf--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-020.html@@ -0,0 +1,23 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: the inline size should be transferred from the block size.</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="help" href="https://drafts.csswg.org/css-grid/#transferred-size-suggestion">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; grid-auto-flow: column; grid-template-columns: minmax(auto, 50px); height: 100px;">+ <div style="height: 100px; aspect-ratio: 1/1; background: green;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-021.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-021.htmlnew file mode 100644index 00000000000..88d6a6bfa58--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-021.html@@ -0,0 +1,23 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: the block size should be transferred from the inline size.</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="help" href="https://drafts.csswg.org/css-grid/#transferred-size-suggestion">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; grid-template-rows: minmax(auto, 50px); width: 100px;">+ <div style="width: 100px; aspect-ratio: 1/1; background: green;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-022.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-022.htmlnew file mode 100644index 00000000000..870ec4a32de--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-022.html@@ -0,0 +1,25 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: grid track size should respect aspect-ratio when the+ ratio-dependent axis is the block axis</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#algo-track-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; width: 100px; background: green;">+ <div style="width: 100px; aspect-ratio: 2/1;"></div>+ <div style="width: 100px; aspect-ratio: 1/1; max-height: 25px;"></div>+ <div style="width: 100px; aspect-ratio: 1/.1; min-height: 25px;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-023.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-023.htmlnew file mode 100644index 00000000000..15851ef4417--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-023.html@@ -0,0 +1,27 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: grid track size should respect aspect-ratio when the+ ratio-dependent axis is the inline axis</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#algo-track-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="width: 100px;">+ <div style="display: grid; grid-auto-flow: column; height: 100px; background: green;">+ <div style="height: 100px; aspect-ratio: 1/2;"></div>+ <div style="height: 100px; aspect-ratio: 1/1; max-width: 25px;"></div>+ <div style="height: 100px; aspect-ratio: .1/1; min-width: 25px;"></div>+ </div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-024.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-024.htmlnew file mode 100644index 00000000000..b3e376cc013--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-024.html@@ -0,0 +1,26 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: grid track size should respect aspect-ratio when the+ ratio-dependent axis is the inline axis and the width of the container is+ min-content</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#algo-track-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; width: min-content; grid-auto-flow: column; height: 100px; background: green;">+ <div style="height: 100px; aspect-ratio: 1/2;"></div>+ <div style="height: 100px; aspect-ratio: 1/1; max-width: 25px;"></div>+ <div style="height: 100px; aspect-ratio: .1/1; min-width: 25px;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-025.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-025.htmlnew file mode 100644index 00000000000..3c1b92303d4--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-025.html@@ -0,0 +1,23 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: the minimum contribution of the grid items in+ inline axis for a percentage inline size and min-size:auto</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#min-size-auto">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; width: min-content; height: 100px; background: green;">+ <div style="height: 100px; width: 50%; aspect-ratio: 1/1;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-026.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-026.htmlnew file mode 100644index 00000000000..26d752e351a--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-026.html@@ -0,0 +1,23 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: the auto minimum contribution of the grid items in+ block axis with a percentage block size and min-size:auto</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#min-size-auto">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; height: min-content; width: 100px; background: green;">+ <div style="width: 100px; height: 50%; aspect-ratio: 1/1;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-027.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-027.htmlnew file mode 100644index 00000000000..c4c92758db1--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-027.html@@ -0,0 +1,25 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: zero intrinsic size for grid items with overflow:auto+ even with an aspect-ratio</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#min-size-auto">+<link rel="help" href="https://drafts.csswg.org/css-grid/#algo-content">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ #reference-overlapped-red {+ position: absolute;+ background-color: red;+ width: 100px;+ height: 100px;+ z-index: -1;+ }+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div id="reference-overlapped-red"></div>+<div style="display: grid; width: min-content; grid-auto-flow: column; height: 100px; background: green;">+ <div style="height: 100px; aspect-ratio: 2/1; overflow:auto"></div>+ <div style="height: 100px; aspect-ratio: 1/2; min-width: 100px; overflow:auto"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-030.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-030.htmlnew file mode 100644index 00000000000..729d5734345--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-030.html@@ -0,0 +1,9 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: A stretch alignment in the inline-axis is preferred over normal alignment in the block-axis.</title>+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../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="display: grid; grid-template: 200px / 100px;">+ <div style="aspect-ratio: 1/1; justify-self: stretch; background: green;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-031.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-031.htmlnew file mode 100644index 00000000000..741f3436cc0--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-031.html@@ -0,0 +1,9 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: A stretch alignment in the inline-axis is preferred over normal alignment in the block-axis.</title>+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../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="display: grid; grid-template: 50px / 100px;">+ <div style="aspect-ratio: 1/1; justify-self: stretch; background: green;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-032.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-032.htmlnew file mode 100644index 00000000000..7eb0d36198c--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-032.html@@ -0,0 +1,9 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: A stretch alignment in both axes (*not* normal alignment) causes the aspect-ratio to be ignored.</title>+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../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="display: grid; grid-template: 100px / 100px;">+ <div style="aspect-ratio: 2/1; align-self: stretch; justify-self: stretch; background: green;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-033.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-033.htmlnew file mode 100644index 00000000000..865a753446a--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-033.html@@ -0,0 +1,9 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: A stretch alignment in both axes (*not* normal alignment) causes the aspect-ratio to be ignored.</title>+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../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="display: grid; grid-template: 100px / 100px;">+ <div style="aspect-ratio: 1/2; align-self: stretch; justify-self: stretch; background: green;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-034.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-034.htmlnew file mode 100644index 00000000000..33139130ef5--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-034.html@@ -0,0 +1,9 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: A stretch alignment in one axis, and a definite length in the other causes the aspect-ratio to be ignored.</title>+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../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="display: grid; grid-template: 100px / 100px;">+ <div style="aspect-ratio: 2/1; align-self: stretch; width: 100%; background: green;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-035.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-035.htmlnew file mode 100644index 00000000000..81bb94c1932--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-035.html@@ -0,0 +1,9 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: A stretch alignment in one axis, and a definite length in the other causes the aspect-ratio to be ignored.</title>+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../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="display: grid; grid-template: 100px / 100px;">+ <div style="aspect-ratio: 1/2; align-self: stretch; width: 100%; background: green;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-036.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-036.htmlnew file mode 100644index 00000000000..5b10ab53826--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-036.html@@ -0,0 +1,9 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: A stretch alignment in one axis, and a definite length in the other causes the aspect-ratio to be ignored.</title>+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../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="display: grid; grid-template: 100px / 100px;">+ <div style="aspect-ratio: 2/1; height: 100%; justify-self: stretch; background: green;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-037.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-037.htmlnew file mode 100644index 00000000000..5e6ef5dd4af--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-037.html@@ -0,0 +1,9 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: A stretch alignment in one axis, and a definite length in the other causes the aspect-ratio to be ignored.</title>+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../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="display: grid; grid-template: 100px / 100px;">+ <div style="aspect-ratio: 1/2; height: 100%; justify-self: stretch; background: green;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-038.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-038.htmlnew file mode 100644index 00000000000..022754a88af--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-038.html@@ -0,0 +1,9 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: Prefer inline normal alignment over block normal alignment.</title>+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-item-sizing">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../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="display: grid; grid-template: 50px / 100px;">+ <div style="aspect-ratio: 1/1; background: green;"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-039.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-039.htmlnew file mode 100644index 00000000000..efbd97373ca--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-039.html@@ -0,0 +1,26 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: Test grid container's block size honoring automatic content-based minimum.</title>+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio-minimum">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />++<style>+ #container {+ display: grid;+ width: 100px;+ aspect-ratio: 2 / 1;+ background: green;+ /* height: auto */+ /* min-height: auto */+ }+ #item {+ width: 100%;+ height: 100px;+ }+</style>+<body>+ <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>+ <div id="container">+ <div id="item"></div>+ </div>+</body>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-040.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-040.htmlnew file mode 100644index 00000000000..922a57f2a17--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-040.html@@ -0,0 +1,30 @@+<!DOCTYPE html>+<html>+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+ .grid {+ display: grid;+ width: 100px;+ }++ .item {+ all: unset;+ aspect-ratio: 1 / 1;+ background-color: green;+ height: 100%;+ width: 100%;+ }+</style>++<p id="text">Test passes if there is a filled green square and <strong>no red</strong>.</p>++<div class="grid">+ <div id="item" class="item"></div>+</div>++<script>+item.style.padding = "10px";+document.body.offsetTop;+item.style.padding = "0px";+</script>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-042.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-042.htmlnew file mode 100644index 00000000000..ec2df7603e8--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-042.html@@ -0,0 +1,25 @@+<!DOCTYPE html>+<title>CSS aspect-ratio: Test that grid container's block size honors automatic content-based minimum, but capped by its maximum block-size</title>+<link rel="author" title="Ting-Yu Lin" href="mailto:[email protected]">+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio-minimum">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht">++<style>+#container {+ display: grid;+ inline-size: 100px;+ aspect-ratio: 2 / 1;+ background: green;+ max-block-size: 100px;+}+#item {+ inline-size: 100%;+ block-size: 200px;+}+</style>++<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>+<div id="container">+ <div id="item"></div>+</div>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-043.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-043.htmlnew file mode 100644index 00000000000..a26d90486e3--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-043.html@@ -0,0 +1,13 @@+<!DOCTYPE html>+<link rel="help" href="https://drafts.csswg.org/css-grid-2/#algo-grid-sizing">+<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-043-ref.html">+<meta name="assert" content="A grid item with aspect-ratio and a percentage height in an auto row gets narrower when the grid gets narrower.">+<p>Test passes if there is a filled green square that is 100px wide and 100px tall.</p>+<div id="grid" style="display: grid; width: 200px;">+ <div style="aspect-ratio: 1 / 1; height: 100%; background: green;"></div>+</div>+<script>+document.body.offsetHeight;+document.getElementById("grid").style.width = "100px";+</script>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-align-items-center.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-align-items-center.htmlnew file mode 100644index 00000000000..5add7862359--- /dev/null+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/grid-aspect-ratio-align-items-center.html@@ -0,0 +1,41 @@+<!DOCTYPE html>+<html>+<head>+<link rel="author" title="Sammy Gill" href="mailto:[email protected]">+<link rel="help" href="https://www.w3.org/TR/2021/WD-css-sizing-4-20210520/#aspect-ratio-automatic">+<meta name="assert" content="Grid has a definite block size computed using the inline size/aspect ratio and item is aligned accordingly (centered vertically).">+<link rel="match" href="../../../../../expected/wpt-import/css/css-sizing/aspect-ratio/../../reference/ref-filled-green-100px-square.xht" />+<style>+.grid {+ display: grid;+ aspect-ratio: 1/1;+ align-items: center;+ position: relative;+}+.item {+ width: 100px;+ height: 50px;+ background-color: green;+}+.abspos {+ position: absolute;+ width: 100px;+ height: 25px;+ background-color: green;+ align-self: start;+ z-index: -1;+}+</style>+</head>+<body>+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>+<div style="width: 100px">+ <div class="grid">+ <div class="abspos"></div>+ <div class="abspos" style="top: 75px;"></div>++ <div class="item"></div>+ </div>+</div>+</body>+</html>diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/support/20x50-green.png b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/support/20x50-green.pngnew file mode 100644index 00000000000..f7f6e67feeeBinary files /dev/null and b/Tests/LibWeb/Ref/input/wpt-import/css/css-sizing/aspect-ratio/support/20x50-green.png differ