Bug 1466231 Part 3: Add a reftest. draft
authorBrad Werth <bwerth@mozilla.com>
Wed, 06 Jun 2018 13:21:31 -0700
changeset 805566 64108ceb99a3bb5b516f1fa78859b674f997002d
parent 805565 1e8d429ab6b1549ea547b573a2dbfb94ddbd1ac1
push id112697
push userbwerth@mozilla.com
push dateFri, 08 Jun 2018 00:14:56 +0000
bugs1466231
milestone62.0a1
Bug 1466231 Part 3: Add a reftest. MozReview-Commit-ID: 4OtqxvM4Gen
layout/reftests/floats/float-should-push-ref.html
layout/reftests/floats/float-should-push.html
layout/reftests/floats/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/floats/float-should-push-ref.html
@@ -0,0 +1,69 @@
+<!DOCTYPE HTML>
+<title>Reference Bug 1466231</title>
+
+<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/floats/float-should-push.html
@@ -0,0 +1,71 @@
+<!DOCTYPE HTML>
+<title>Testcase Bug 1466231 - Ensure shape-outside floats that don't cover their margin-rect affect layout properly</title>
+
+<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/floats/reftest.list
+++ b/layout/reftests/floats/reftest.list
@@ -1,9 +1,10 @@
 == border-box-wrap-around-float.html border-box-wrap-around-float-ref.html
+== float-should-push.html float-should-push-ref.html
 == other-float-outside-rule-3-left.html other-float-outside-rule-3-left-ref.html
 == other-float-outside-rule-3-right.html other-float-outside-rule-3-right-ref.html
 fails == other-float-outside-rule-3-left-2.html other-float-outside-rule-3-left-2-ref.html # bug 616334
 fails == other-float-outside-rule-3-right-2.html other-float-outside-rule-3-right-2-ref.html # bug 616334
 fails == other-float-outside-rule-7-left.html other-float-outside-rule-7-left-ref.html # bug 616334
 fails == other-float-outside-rule-7-right.html other-float-outside-rule-7-right-ref.html # bug 616334
 fuzzy-if(gtkWidget,1,10) == float-outside-block-push.html float-outside-block-push-ref.html # bug 815612
 == relative-float-1.html relative-float-1-ref.html