Bug 1527474 [wpt PR 15322] - [LayoutNG] Add percentage_resolution_block_size into the min/max pass., a=testonly
authorIan Kilpatrick <ikilpatrick@chromium.org>
Tue, 05 Mar 2019 11:08:56 +0000
changeset 522113 403d814ff267c988b216e3555ac46214e25b71e2
parent 522112 353a9e562d20e483eeca2f21b471422e0eafb0f4
child 522114 3b96582a3422d43e1162c99c947e1ffebe484a28
push id10871
push usercbrindusan@mozilla.com
push dateMon, 18 Mar 2019 15:49:32 +0000
treeherdermozilla-beta@018abdd16060 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1527474, 15322, 635619, 1456203, 631236
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1527474 [wpt PR 15322] - [LayoutNG] Add percentage_resolution_block_size into the min/max pass., a=testonly Automatic update from web-platform-tests [LayoutNG] Add percentage_resolution_block_size into the min/max pass. This was surprising to me! But the min/max sizes depend on the percentage resolution block-size, as replaced elements reflect this size into their width. This was working previously as the replaced element was manually computing the heights, but this adds it into the pass explicitly. This fixes it for absolute positioned objects which use the current final height as the input to this function. Eventually we'll want to cache based off this, and record if there is a replaced element with percentage block-size in the calculation chain. Bug: 635619 Change-Id: I6db9a90007b6c7d70f51d5ae1209ffba8a629e03 Reviewed-on: https://chromium-review.googlesource.com/c/1456203 Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by: Aleks Totic <atotic@chromium.org> Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Reviewed-by: Christian Biesinger <cbiesinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#631236} -- wpt-commits: bf3094004127a5b32edf8b80c8e4cc9bcad500d0 wpt-pr: 15322
testing/web-platform/tests/css/css-sizing/intrinsic-percent-replaced-001.html
testing/web-platform/tests/css/css-sizing/intrinsic-percent-replaced-002.html
testing/web-platform/tests/css/css-sizing/intrinsic-percent-replaced-003.html
testing/web-platform/tests/css/css-sizing/intrinsic-percent-replaced-004.html
testing/web-platform/tests/css/css-sizing/intrinsic-percent-replaced-005.html
testing/web-platform/tests/css/css-sizing/intrinsic-percent-replaced-006.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/intrinsic-percent-replaced-001.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes">
+<meta name="assert" content="Checks that a replaced element, with an aspect ratio, converts a percent height into an intrinsic width." />
+<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
+<style>
+#float { float: left; height: 100px; background: green; }
+canvas { height: 100%; }
+</style>
+<p>Test passes if there is a filled green square.</p>
+<div id=float>
+  <canvas width=10 height=10></canvas>
+</div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/intrinsic-percent-replaced-002.html
@@ -0,0 +1,14 @@
+<!-- quirks mode -->
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes">
+<meta name="assert" content="Checks that a replaced element, with an aspect ratio, converts a percent height into an intrinsic width." />
+<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
+<style>
+#float { float: left; height: 100px; background: green; }
+canvas { height: 100%; }
+</style>
+<p style="margin-top: 1em;">Test passes if there is a filled green square.</p>
+<div id=float>
+  <div>
+    <canvas width=10 height=10></canvas>
+  </div>
+</div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/intrinsic-percent-replaced-003.html
@@ -0,0 +1,17 @@
+<!-- quirks mode -->
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes">
+<meta name="assert" content="Checks that a replaced element, with an aspect ratio, converts a percent height into an intrinsic width." />
+<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
+<style>
+#container { height: 200px; }
+#float { float: left; height: 50%; background: green; }
+canvas { height: 100%; }
+</style>
+<p style="margin-top: 1em;">Test passes if there is a filled green square.</p>
+<div id=container>
+  <div id=float>
+    <div>
+      <canvas width=10 height=10></canvas>
+    </div>
+  </div>
+</div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/intrinsic-percent-replaced-004.html
@@ -0,0 +1,17 @@
+<!-- quirks mode -->
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes">
+<meta name="assert" content="Checks that a replaced element, with an aspect ratio, converts a percent height into an intrinsic width." />
+<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
+<style>
+#container { display: flex; height: 200px; }
+#float { float: left; height: 50%; background: green; }
+canvas { height: 100%; }
+</style>
+<p style="margin-top: 1em;">Test passes if there is a filled green square.</p>
+<div id=container>
+  <div id=float>
+    <div>
+      <canvas width=10 height=10></canvas>
+    </div>
+  </div>
+</div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/intrinsic-percent-replaced-005.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes">
+<meta name="assert" content="Checks that a replaced element, with an aspect ratio, converts a percent height into an intrinsic width." />
+<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
+<style>
+#container { position: relative; height: 100px; }
+#abs { position: absolute; top: 0; bottom: 0; background: green; }
+canvas { height: 100%; }
+</style>
+<p>Test passes if there is a filled green square.</p>
+<div id=container>
+  <div id=abs>
+    <canvas width=10 height=10></canvas>
+  </div>
+</div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-sizing/intrinsic-percent-replaced-006.html
@@ -0,0 +1,17 @@
+<!-- quirks mode -->
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes">
+<meta name="assert" content="Checks that a replaced element, with an aspect ratio, converts a percent height into an intrinsic width." />
+<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
+<style>
+#container { height: 100px; }
+#float { float: left; background: green; }
+canvas { height: 100%; }
+</style>
+<p style="margin-top: 1em;">Test passes if there is a filled green square.</p>
+<div id=container>
+  <div id=float>
+    <div>
+      <canvas width=10 height=10></canvas>
+    </div>
+  </div>
+</div>