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 464495 2d9ecd8d27b6de6213a296b8f5f9e2a0cabb6af9
parent 464494 86c62ded3b663a3a847c86060b783f4f47fca913
child 464496 0bef32a92a04bc93914889b0bdddcd71aeb9a26a
push id35717
push useraciure@mozilla.com
push dateSun, 17 Mar 2019 09:45:26 +0000
treeherdermozilla-central@e0861be8d6c0 [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>