add reftests with relative-height-flexbox-in-an-iframe-whose-size-is-changing, to exercise NS_FRAME_CONTAINS_RELATIVE_HEIGHT bit-setting.
authorDaniel Holbert <dholbert@cs.stanford.edu>
Tue, 25 Sep 2012 12:50:00 -0700
changeset 1815 f636e0dcb8ef889462030c509f2f960004294ebf
parent 1814 76d6baf5d859c869988bcfb53e4273c818839f83
child 1816 8eaa959e559cb81d8ea0a3cf484ed2a1a4fbde97
push id1486
push userdholbert@mozilla.com
push dateTue, 25 Sep 2012 19:50:02 +0000
add reftests with relative-height-flexbox-in-an-iframe-whose-size-is-changing, to exercise NS_FRAME_CONTAINS_RELATIVE_HEIGHT bit-setting.
flexbox-reftests.patch
--- a/flexbox-reftests.patch
+++ b/flexbox-reftests.patch
@@ -1,10 +1,10 @@
 # HG changeset patch
-# Parent 16373b81e9bedecb18da1153153db7b6db4068c6
+# Parent ada8cefa0797c6f85cf20d62d2b8b72c4d581326
 # User Daniel Holbert <dholbert@cs.stanford.edu>
 Bug 666041: reftests
 
 diff --git a/layout/reftests/flexbox/ahem.css b/layout/reftests/flexbox/ahem.css
 new file mode 100644
 --- /dev/null
 +++ b/layout/reftests/flexbox/ahem.css
 @@ -0,0 +1,4 @@
@@ -13158,16 +13158,124 @@ new file mode 100644
 +    </style>
 +  </head>
 +  <body>
 +    <div class="containingBlock">
 +      <div class="flexbox"><div class="a fixedpos"/><div class="b"/></div>
 +    </div>
 +  </body>
 +</html>
+diff --git a/layout/reftests/flexbox/flexbox-resizeviewport-1-helper.html b/layout/reftests/flexbox/flexbox-resizeviewport-1-helper.html
+new file mode 100644
+--- /dev/null
++++ b/layout/reftests/flexbox/flexbox-resizeviewport-1-helper.html
+@@ -0,0 +1,31 @@
++<!--
++     Any copyright is dedicated to the Public Domain.
++     http://creativecommons.org/publicdomain/zero/1.0/
++-->
++<!-- Helper-file for reftest flexbox-resizeviewport-1.xhtml
++     Intentionally using quirks-mode (no doctype), so that
++     a 100% height will work. -->
++<html>
++  <head>
++    <style>
++      div.flexbox {
++        display: -moz-flex;
++        height: 100%;
++        border: 2px dashed black;
++      }
++      div.a {
++        -moz-flex: 1;
++        background: pink;
++      }
++      div.b {
++        -moz-flex: 1;
++        background: teal;
++      }
++    </style>
++  </head>
++  <body>
++    <div class="flexbox">
++      <div class="a"></div><div class="b"></div>
++    </div>
++  </body>
++</html>
+diff --git a/layout/reftests/flexbox/flexbox-resizeviewport-1-ref.xhtml b/layout/reftests/flexbox/flexbox-resizeviewport-1-ref.xhtml
+new file mode 100644
+--- /dev/null
++++ b/layout/reftests/flexbox/flexbox-resizeviewport-1-ref.xhtml
+@@ -0,0 +1,22 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<!--
++     Any copyright is dedicated to the Public Domain.
++     http://creativecommons.org/publicdomain/zero/1.0/
++-->
++<html xmlns="http://www.w3.org/1999/xhtml">
++  <head>
++    <style>
++      iframe {
++        width:  75px;
++        height: 75px;
++      }
++    </style>
++  </head>
++  <body onload="tweak()">
++    <iframe src="flexbox-resizeviewport-1-helper.html" style="width: 50px"/>
++    <iframe src="flexbox-resizeviewport-1-helper.html" style="width: 125px"/>
++    <br/>
++    <iframe src="flexbox-resizeviewport-1-helper.html" style="height: 50px"/>
++    <iframe src="flexbox-resizeviewport-1-helper.html" style="height: 125px"/>
++  </body>
++</html>
+diff --git a/layout/reftests/flexbox/flexbox-resizeviewport-1.xhtml b/layout/reftests/flexbox/flexbox-resizeviewport-1.xhtml
+new file mode 100644
+--- /dev/null
++++ b/layout/reftests/flexbox/flexbox-resizeviewport-1.xhtml
+@@ -0,0 +1,40 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<!--
++     Any copyright is dedicated to the Public Domain.
++     http://creativecommons.org/publicdomain/zero/1.0/
++-->
++<!-- Testcase to be sure a flex container gets reflowed properly when its
++     iframe changes size. -->
++<html xmlns="http://www.w3.org/1999/xhtml"
++      class="reftest-wait">
++  <head>
++    <style>
++      iframe {
++        width:  75px;
++        height: 75px;
++      }
++    </style>
++    <script>
++      function setElementPropertyTo(id, propertyName, propertyValue) {
++        var elem = document.getElementById(id);
++        elem.style[propertyName] = propertyValue;
++      }
++
++      function tweak() {
++        setElementPropertyTo("a", "width", "50px");
++        setElementPropertyTo("b", "width", "125px");
++        setElementPropertyTo("c", "height", "50px");
++        setElementPropertyTo("d", "height", "125px");
++        document.documentElement.removeAttribute("class");
++      }
++      window.addEventListener("MozReftestInvalidate", tweak, false);
++    </script>
++  </head>
++  <body>
++    <iframe id="a" src="flexbox-resizeviewport-1-helper.html"/>
++    <iframe id="b" src="flexbox-resizeviewport-1-helper.html"/>
++    <br/>
++    <iframe id="c" src="flexbox-resizeviewport-1-helper.html"/>
++    <iframe id="d" src="flexbox-resizeviewport-1-helper.html"/>
++  </body>
++</html>
 diff --git a/layout/reftests/flexbox/flexbox-sizing-horiz-1-ref.xhtml b/layout/reftests/flexbox/flexbox-sizing-horiz-1-ref.xhtml
 new file mode 100644
 --- /dev/null
 +++ b/layout/reftests/flexbox/flexbox-sizing-horiz-1-ref.xhtml
 @@ -0,0 +1,73 @@
 +<?xml version="1.0" encoding="UTF-8"?>
 +<!--
 +     Any copyright is dedicated to the Public Domain.
@@ -14540,17 +14648,17 @@ new file mode 100644
 +  <div class="flexbox"><input type="reset"></div>
 +  <div class="flexbox"><input type="submit"></div>
 +</body>
 +</html>
 diff --git a/layout/reftests/flexbox/reftest.list b/layout/reftests/flexbox/reftest.list
 new file mode 100644
 --- /dev/null
 +++ b/layout/reftests/flexbox/reftest.list
-@@ -0,0 +1,152 @@
+@@ -0,0 +1,154 @@
 +# Tests for dynamic modifications to flexboxes
 +# (with existing [div | span | text] inside the flexbox, and new content
 +# inserted adjacent to that existing content.)
 +== flexbox-dyn-insertAroundDiv-1.xhtml flexbox-dyn-insertAroundDiv-1-ref.xhtml
 +== flexbox-dyn-insertAroundDiv-2.xhtml flexbox-dyn-insertAroundDiv-2-ref.xhtml
 +fails-if(Android) == flexbox-dyn-insertAroundDiv-3.xhtml flexbox-dyn-insertAroundDiv-3-ref.xhtml
 +
 +== flexbox-dyn-insertAroundSpan-1.xhtml flexbox-dyn-insertAroundText-1-ref.xhtml
@@ -14665,16 +14773,18 @@ new file mode 100644
 +== flexbox-horiz-mbp-1-reverse.xhtml     flexbox-horiz-mbp-1-reverse-ref.xhtml
 +== flexbox-horiz-mbp-1-rtl.xhtml         flexbox-horiz-mbp-1-reverse-ref.xhtml
 +== flexbox-horiz-mbp-1-rtl-reverse.xhtml flexbox-horiz-mbp-1-ref.xhtml
 +== flexbox-horiz-mbp-2a.xhtml            flexbox-horiz-mbp-2-ref.xhtml
 +== flexbox-horiz-mbp-2b.xhtml            flexbox-horiz-mbp-2-ref.xhtml
 +== flexbox-horiz-mbp-3.xhtml             flexbox-horiz-mbp-3-ref.xhtml
 +== flexbox-horiz-mbp-3-reverse.xhtml     flexbox-horiz-mbp-3-reverse-ref.xhtml
 +
++# Tests for flexbox in an iframe that gets resized.
++== flexbox-resizeviewport-1.xhtml flexbox-resizeviewport-1-ref.xhtml
 +
 +# Tests for sizing of flex containers, e.g. under min/max size constraints
 +== flexbox-sizing-horiz-1.xhtml flexbox-sizing-horiz-1-ref.xhtml
 +== flexbox-sizing-vert-1.xhtml  flexbox-sizing-vert-1-ref.xhtml
 +
 +== flexbox-table-fixup-1a.xhtml flexbox-table-fixup-1-ref.xhtml
 +== flexbox-table-fixup-1b.xhtml flexbox-table-fixup-1-ref.xhtml
 +