Bug 1207157 - patch 1 - Add reftest. r=jfkthame, a=lizzard
authorL. David Baron <dbaron@dbaron.org>
Sun, 27 Sep 2015 02:19:14 -0700
changeset 298178 743dd7362602126e385f0576e79ff15ad50488a9
parent 298177 cfa20e34ebeee168379e9d9690d4f19478e6294c
child 298179 92261c34551829207ef9c058eb6fdc66f30a9e6f
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame, lizzard
bugs1207157
milestone43.0a2
Bug 1207157 - patch 1 - Add reftest. r=jfkthame, a=lizzard
layout/reftests/floats/bfc-displace-4-ref.html
layout/reftests/floats/bfc-displace-4.html
layout/reftests/floats/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/floats/bfc-displace-4-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML>
+<title>Test of block formatting context displacement by floats</title>
+<style>
+
+.contain {
+  border: medium solid;
+  width: 400px;
+  height: 400px;
+  background: yellow;
+}
+
+.float {
+  float: left;
+  height: 20px;
+  background: blue;
+}
+
+.bfc {
+  float: left;
+  width: 200px;
+  height: 15px;
+  background: fuchsia;
+}
+
+</style>
+
+
+<div class="contain">
+  <div class="float" style="width: 200px"></div>
+  <div class="bfc"></div>
+</div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/floats/bfc-displace-4.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<title>Test of block formatting context displacement by floats</title>
+<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#floats">
+<meta name="assert" content="The border box of a table, a block-level replaced element, or an element in the normal flow that establishes a new block formatting context (such as an element with 'overflow' other than 'visible') must not overlap the margin box of any floats in the same block formatting context as the element itself.">
+<style>
+
+.contain {
+  border: medium solid;
+  width: 400px;
+  height: 400px;
+  background: yellow;
+}
+
+.float {
+  float: left;
+  clear: left;
+  height: 20px;
+  background: blue;
+}
+
+.bfc {
+  overflow: hidden;
+  width: 200px;
+  margin-right: 100px; /* ignored */
+  height: 15px;
+  background: fuchsia;
+}
+
+</style>
+
+
+<div class="contain">
+  <div class="float" style="width: 200px"></div>
+  <div class="bfc"></div>
+</div>
--- a/layout/reftests/floats/reftest.list
+++ b/layout/reftests/floats/reftest.list
@@ -38,16 +38,17 @@ fails == 345369-2.html 345369-2-ref.html
 == float-in-rtl-4d.html float-in-rtl-4-ref.html
 
 == bfc-displace-1a.html bfc-displace-1a-ref.html
 == bfc-displace-1b.html bfc-displace-1b-ref.html
 == bfc-displace-2a.html bfc-displace-2a-ref.html
 == bfc-displace-2b.html bfc-displace-2b-ref.html
 == bfc-displace-3a.html bfc-displace-3a-ref.html
 == bfc-displace-3b.html bfc-displace-3b-ref.html
+fails == bfc-displace-4.html bfc-displace-4-ref.html # bug 1207157
 == bfc-shrink-1.html bfc-shrink-1-ref.html
 
 # Testcases that involve vertical writing mode.
 #
 # XXX The default-preferences setting here can be removed after the
 #     pref has been made true by default for all channels (bug 1138384).
 
 default-preferences pref(layout.css.vertical-text.enabled,true)