Bug 1466231 Part 2: Add a submitted WPT reftest. draft
authorBrad Werth <bwerth@mozilla.com>
Wed, 06 Jun 2018 13:21:31 -0700
changeset 807790 d262a5137a76da0ee96e9e33948fbd1b81a86c10
parent 807501 ed6cfee6f9dacb3b2ac970a20826c452c49d4b63
child 807791 d20f770bbd5fe62a92f552a804b5bffe63c2f871
child 807882 c8beb9e44c8131f84c0ef23fc8518e6473bc015d
push id113218
push userbwerth@mozilla.com
push dateFri, 15 Jun 2018 19:16:11 +0000
bugs1466231
milestone62.0a1
Bug 1466231 Part 2: Add a submitted WPT reftest. MozReview-Commit-ID: 4OtqxvM4Gen
layout/reftests/w3c-css/submitted/shapes1/float-should-push-ref.html
layout/reftests/w3c-css/submitted/shapes1/float-should-push.html
layout/reftests/w3c-css/submitted/shapes1/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/shapes1/float-should-push-ref.html
@@ -0,0 +1,72 @@
+<!DOCTYPE HTML>
+<meta charset="utf-8">
+<title>Reference: Ensure shape-outside floats that don't cover their margin-rect affect layout properly</title>
+<link rel="author" title="Brad Werth" href="mailto:bwerth@mozilla.com">
+<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
+
+<style>
+  body {
+    margin: 0px;
+    line-height: 1;
+  }
+
+  .container {
+    width: 300px;
+    height: 100px;
+    background: lightgray;
+  }
+
+  .too-wide {
+    display: inline-block;
+    width: 250px;
+    height: 20px;
+    background: lightblue;
+    clear: left;
+  }
+
+  .shape {
+    background: black;
+    width: 100px;
+    height: 100px;
+    float: left;
+  }
+
+  .spacer {
+    clear: left;
+    height: 30px;
+  }
+
+  .inset {
+    background: orange;
+  }
+
+  .polygon {
+    background: pink;
+  }
+
+  .image {
+    background: brown;
+  }
+
+</style>
+
+<p>All light blue bars should be pushed below the square floats, regardless of how those floats are defined.</p>
+
+<div class="container">
+<div class="shape inset">inset(1px) at top</div>
+<span class="too-wide"></span>
+</div>
+
+<div class="spacer"></div>
+
+<div class="container">
+<div class="shape polygon">polygon</div>
+<span class="too-wide"></span>
+</div>
+
+<div class="spacer"></div>
+
+<div class="container">
+<div class="shape image">image</div>
+<span class="too-wide"></span>
+</div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/shapes1/float-should-push.html
@@ -0,0 +1,77 @@
+<!DOCTYPE HTML>
+<meta charset="utf-8">
+<title>Ensure shape-outside floats that don't cover their margin-rect affect layout properly</title>
+<link rel="author" title="Brad Werth" href="mailto:bwerth@mozilla.com">
+<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
+<link rel="help" href="https://drafts.csswg.org/css-shapes-1/">
+<link rel="match" href="float-should-push-ref.html">
+<meta name="assert" content="Test that a too-wide inline block clear floats defined by shape-outside shapes that don't reach the top of the margin rect.">
+
+<style>
+  body {
+    margin: 0px;
+    line-height: 1;
+  }
+
+  .container {
+    width: 300px;
+    height: 100px;
+    background: lightgray;
+  }
+
+  .too-wide {
+    display: inline-block;
+    width: 250px;
+    height: 20px;
+    background: lightblue;
+  }
+
+  .shape {
+    background: black;
+    width: 100px;
+    height: 100px;
+    float: left;
+  }
+
+  .spacer {
+    clear: left;
+    height: 30px;
+  }
+
+  .inset {
+    background: orange;
+    shape-outside: inset(1px 0px 0px 0px);
+  }
+
+  .polygon {
+    background: pink;
+    shape-outside: polygon(0px 0px, 100px 0px, 100px 100px, 0px 100px);
+  }
+
+  .image {
+    background: brown;
+    shape-outside: linear-gradient(0deg, black, black 100%);
+  }
+
+</style>
+
+<p>All light blue bars should be pushed below the square floats, regardless of how those floats are defined.</p>
+
+<div class="container">
+<div class="shape inset">inset(1px) at top</div>
+<span class="too-wide"></span>
+</div>
+
+<div class="spacer"></div>
+
+<div class="container">
+<div class="shape polygon">polygon</div>
+<span class="too-wide"></span>
+</div>
+
+<div class="spacer"></div>
+
+<div class="container">
+<div class="shape image">image</div>
+<span class="too-wide"></span>
+</div>
--- a/layout/reftests/w3c-css/submitted/shapes1/reftest.list
+++ b/layout/reftests/w3c-css/submitted/shapes1/reftest.list
@@ -105,8 +105,9 @@ fuzzy(108,81) == shape-outside-ellipse-0
 == shape-outside-polygon-025.html shape-outside-polygon-025-ref.html
 fuzzy(101,2263) == shape-outside-polygon-032.html shape-outside-polygon-032-ref.html
 
 # Tests of shape-outside layout behavior with too-wide inline elements
 == float-retry-push-circle.html float-retry-push-ref.html
 fails == float-retry-push-image.html float-retry-push-ref.html
 == float-retry-push-inset.html float-retry-push-ref.html
 fails == float-retry-push-polygon.html float-retry-push-ref.html
+== float-should-push.html float-should-push-ref.html