flexbox-resizeviewport-1.xhtml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Any copyright is dedicated to the Public Domain.
  4. http://creativecommons.org/publicdomain/zero/1.0/
  5. -->
  6. <!-- Testcase to be sure a flex container gets reflowed properly when its
  7. iframe changes size. -->
  8. <html xmlns="http://www.w3.org/1999/xhtml"
  9. class="reftest-wait">
  10. <head>
  11. <style>
  12. iframe {
  13. width: 75px;
  14. height: 75px;
  15. }
  16. </style>
  17. <script>
  18. function setElementPropertyTo(id, propertyName, propertyValue) {
  19. var elem = document.getElementById(id);
  20. elem.style[propertyName] = propertyValue;
  21. }
  22. function tweak() {
  23. setElementPropertyTo("a", "width", "50px");
  24. setElementPropertyTo("b", "width", "125px");
  25. setElementPropertyTo("c", "height", "50px");
  26. setElementPropertyTo("d", "height", "125px");
  27. document.documentElement.removeAttribute("class");
  28. }
  29. window.addEventListener("MozReftestInvalidate", tweak, false);
  30. </script>
  31. </head>
  32. <body>
  33. <iframe id="a" src="flexbox-resizeviewport-1-helper.html"/>
  34. <iframe id="b" src="flexbox-resizeviewport-1-helper.html"/>
  35. <br/>
  36. <iframe id="c" src="flexbox-resizeviewport-1-helper.html"/>
  37. <iframe id="d" src="flexbox-resizeviewport-1-helper.html"/>
  38. </body>
  39. </html>