flexbox-dyn-changePadding-1a.xhtml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. <!--
  7. This test checks that we reflow sufficiently when a grandchild of a
  8. flex container needs an incremental reflow. This test should end up
  9. rendering as a lime square, 100px by 100px.
  10. -->
  11. <html xmlns="http://www.w3.org/1999/xhtml"
  12. class="reftest-wait">
  13. <head>
  14. <style>
  15. #container {
  16. display: flex;
  17. flex-direction: column;
  18. width: 100px;
  19. }
  20. #item {
  21. background: red;
  22. }
  23. #tweakMe {
  24. height: 100px;
  25. background: orange;
  26. padding-left: 1px;
  27. }
  28. </style>
  29. <script>
  30. function tweak() {
  31. var tweakMe = document.getElementById("tweakMe");
  32. tweakMe.style.paddingLeft = "0";
  33. tweakMe.style.background = "lime";
  34. document.documentElement.removeAttribute("class");
  35. }
  36. window.addEventListener("MozReftestInvalidate", tweak, false);
  37. </script>
  38. </head>
  39. <body>
  40. <div id="container">
  41. <div id="item">
  42. <div id="tweakMe"></div>
  43. </div>
  44. </div>
  45. </body>
  46. </html>